<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thomas Heller wrote:
<blockquote cite="midvewhj084.fsf@python.net" type="cite">
<pre wrap="">Fuzzyman <a class="moz-txt-link-rfc2396E" href="mailto:fuzzyman@voidspace.org.uk"><fuzzyman@voidspace.org.uk></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">Stewart Midwinter wrote:
</pre>
<blockquote type="cite">
<pre wrap="">David, there should be a script that edits the registry for you, and
it comes with a shortcut to help run it. Which version of PythonCE
did you install?
</pre>
</blockquote>
<pre wrap="">It didn't work for me. The one supplied seem to need running on the PC
(using cereg.exe) not the PocketPC - and it defines various *extra*
entries as well. It didn't work for me yet anyway.
I haven't yet taken the manual steps described to get it working. I was
re-installing over a previous install.
</pre>
</blockquote>
<pre wrap=""><!---->
Here is the script that I used (maybe it is from Luke):
#
#        Setup the registry to allow us to double click on python scripts
#
from _winreg import *
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\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, "\"\\Program Files\\Python\\Python.exe\" \"%1\"")
CloseKey(Key)
import time
time.sleep(5)
I did run it with 'execfile(r"\My Documents\Scripts\setup-registry.py")'
on the pocket PC itself, from within Python.
What I didn't achieve so far was to associate a useful icon with .py
files, maybe someone could post the registry entries for that?
</pre>
</blockquote>
This associates '.py' with Python. There was a separate distribution of
Tk/Tkinter posted to the group recently (or at least a URL).<br>
<br>
This was purportedly more recent than other versions available for
download. This distribution had a Tcl script to transfer the files to
the PocketPC, this script 'hung' on me, so I followed the manual
instructions. As part of this it included a batch file (that needed
editing appropriately) to setup the registry entries on the PocketPC so
that Python can find the install of Tk.<br>
<br>
It uses ``cereg.exe`` run on the PC (AFAICT) to make the registry
entries. It's possible of course that it ought to be run on the
PocketPC - maybe I'll try that. (It certainly didn't work for me, but
then it didn't report errors either, which you would expect if you try
to run a PocketPC application on the desktop).<br>
<br>
All the best,<br>
<br>
<br>
Fuzzyman<br>
<a class="moz-txt-link-freetext" href="http://www.voidspace.org.uk/python/index.shtml">http://www.voidspace.org.uk/python/index.shtml</a><br>
<br>
<br>
<br>
<blockquote cite="midvewhj084.fsf@python.net" type="cite">
<pre wrap="">Thomas
</pre>
</blockquote>
<br>
</body>
</html>