|
Ive installed pythonce and Tkinter on a pocketpc 2003 2nd edition. And it runs
any python scripts on it. I want to be able to connect to a python file on a share and have it run the python file but in Internet explorer it just opens the python file as a text file. So i downloaded a registry editor on the pocketpc to try and change the way IE opens the file. Either to open it up in a save as dialog box and the run the python file like it would do for say an mp3 file or to run the python file directly in IE somehow. However im not sure what needs to be changed in the registry. In the python file I tried adding a BroswerFlag to the .py under file associations but that didnt seem to work. Any help would be appreciated on whether this can be done. _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
|
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? S _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
|
Stewart Midwinter wrote:
>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? > > > > 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. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml >S >_______________________________________________ >PythonCE mailing list >[hidden email] >http://mail.python.org/mailman/listinfo/pythonce > > > _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
|
Fuzzyman <[hidden email]> writes:
> Stewart Midwinter wrote: > >>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? >> >> >> >> > 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. 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? Thomas _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
|
Thomas Heller wrote:
This associates '.py' with Python. There was a separate distribution of Tk/Tkinter posted to the group recently (or at least a URL).Fuzzyman [hidden email] writes: 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. 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). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml Thomas _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
Thomas Heller wrote:This associates '.py' with Python. There was a separate distribution of Tk/Tkinter posted to the group recently (or at least a URL).Fuzzyman [hidden email] writes: Hmm... for some reason I misread this post and thought we were talking about Tk/Tkinter. Sorry about that. Anyway, I still have a problem - but I can always manually add the registry entries. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml All the best, _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
|
In reply to this post by midtoad
On Tuesday 17 January 2006 20:34, Stewart Midwinter wrote:
> 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? > > > S I installed the files from Python-2.3.4-arm-PPC2003.zip and Tkinter-Files.zip onto the pocketpc. I already had to edit that registry install file and where to put the folders to get it to work as it didnt put a lib folder in the python folder when i extracted it so i just changed that line in the registry file. When i click on a .py file it runs the file fine. However if i click on the file within Internet Explorer it opens a .py file as a text file. How can i change the file associations within IE so that it either runs the .py file when i click on it or it allows me to download the .py file and run it then. I cannot find a way to edit these things in IE in the registry. Is there a better broswer to download on the pocketpc or is there a way to do what i want on IE. >Thomas Heller wrote: >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? If you look at MP3FILE on the registry for example it has a folder called DefaultIcon which has a Default value in it called "wmplayer.exe,-2001" So id say the script for entering in for Python.File would be something like Key = CreateKey(HKEY_CLASSES_ROOT, "Python.File") for Name in ("DefaultIcon"): New_Key= CreateKey(Key, Name) CloseKey(Key) Key = New_Key SetValue(Key, None, REG_SZ, "Link to the icon you want to represent Python") CloseKey(Key) You probably know this but just in case _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
|
In reply to this post by midtoad
Ok i figured it out. Sorry it was apaches fault in the end. My bad.
I hadnt the mime-types set up for python files in apache. In /etc/apache2/mime.types i had to add "application/python py". Im not a 100% sure if thats totally correct but it looks right and now on IE on the PocketPC when i click on the .py file it gives me the save then run dialog box. So thanks anyway. _______________________________________________ PythonCE mailing list [hidden email] http://mail.python.org/mailman/listinfo/pythonce |
| Powered by Nabble | Edit this page |
