Re: Compiled version of Python 2.3.5 for Windows CE?

"Luke Dunstan" <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
----- Original Message ----- 
From: "Jeffrey Barish" <[email protected]>
To: <[email protected]>
Sent: Saturday, January 07, 2006 3:38 AM
Subject: [PythonCE] Compiled version of Python 2.3.5 for Windows CE?


> Thank you for the additional information.  The description of
> PythonCE-2.3.5-20051223-setup.exe in the release notes says that the 
> program
> registers the .cab file and allows easy installation, but doesn't mention
> that it includes the binary.  Maybe that's obvious to people who know 
> Windows
> CE better than I do.

Perhaps the wording can be improved, but have you ever installed source code 
from an .exe file or a Windows CE .cab file? I haven't.

> I have managed to install PythonCE-2.3.5.  There is an icon and tapping it
> runs python 2.3.5.  I can import wx and Pyro.  However, when I tap on one 
> of
> my programs (using file explorer), I now get the message:
>
> The file 'xxx' cannot be opened.  Either it is not signed with a trusted
> certificate, or one of its components cannot be found.  You might need to
> reinstall or restore this file.

I haven't seen this specific error message but I assume it is due to .py 
files not being properly associated with python.exe.

> Did I do something wrong in the installation?
> -- 
> Jeffrey Barish

No, I simply haven't added the file associations to the CAB installer yet. I 
will try to do this for the next release but in the mean time copy the 
attached setup-registry.py to your PDA, run Python and then type:

execfile('\\program files\\python\\setup-registry.py')

The script can be placed anywhere though, this is just an example path.

Luke

_______________________________________________
PythonCE mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythonce
setup-registry.py (text/plain, 754 B)
#
#	Setup the registry to allow us to double click on python scripts
#
from _winreg import *
import sys

print "Setting up registry to allow\ndouble clicking of Python files to work"

#
#	Create the registry entries for ".py" and ".pyc" extensions
#
for Name in (".py", ".pyc"):
    Key = CreateKey(HKEY_CLASSES_ROOT, Name)
    SetValue(Key, None, REG_SZ, "Python.File")
    CloseKey(Key)

#
#	Create HKEY_CLASSES_ROOT\Python.File\Shell\Open\Command = "\Program Files\Python\Lib\Python.exe" "%1"
#
Key = CreateKey(HKEY_CLASSES_ROOT, "Python.File")
for Name in ("Shell","Open","Command"):
  New_Key= CreateKey(Key, Name)
  CloseKey(Key)
  Key = New_Key
SetValue(Key, None, REG_SZ, '"' + sys.executable + '" "%1"')
CloseKey(Key)

import time
time.sleep(5)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.