[PythonCE] Running Python program without getting Python CE window
Luke Dunstan
coder_infidel at hotmail.com
Thu Mar 2 11:54:31 CET 2006
The normal .py association on Windows is done with a couple of registry
values:
1. Create a key: HKEY_CLASSES_ROOT\.py
2. Set the default value of this key to: Python.File
3. Create a key: HKEY_CLASSES_ROOT\Python.File\shell\open\command
4. Set the default value to: "C:\Python24\python.exe" "%1" %*
Windows CE is the same but the command might be: "\Program
Files\PythonCE\python.exe" "%1"
You could make .pyw work on WinCE by creating a key HKCR\.pyw and another
like HKCR\Python.File.NoShell, with the appropriate command line. In fact I
may do this in the next version of the PythonCE installer.
There are several ways to edit the registry. I've used two:
1. Total Commander, a free file manager for WinCE that includes a registry
editor
2. Remote Registry Editor from MS eMbedded Visual C++
I've also used this command line console:
http://www.symbolictools.de/public/pocketconsole/
Luke
----- Original Message -----
From: "Jeffrey Barish" <jeff_barish at earthlink.net>
To: <pythonce at python.org>
Sent: Thursday, March 02, 2006 10:35 AM
Subject: [PythonCE] Running Python program without getting Python CE window
----- Original Message -----
From: "Jeffrey Barish" <jeff_barish at earthlink.net>
To: <pythonce at python.org>
Sent: Friday, February 24, 2006 11:08 AM
Subject: [PythonCE] Running Python program without getting Python CE window
> > Whenever I run a Python application, I get a window titled "Python CE"
that
> > seems to capture stdout. Is it called the console? I would like to run
my
> > application without getting that window. I had the impression that this
> > window would not appear if I ran the application using pythonw. To that
> > end, I changed the first line of my application to
> >
> > #! /usr/bin/env pythonw
> >
> > (instead of /usr/bin/env/python). Changing this line has no effect in
> > either CE or XP. What is the correct procedure?
>
> As somebody else mentioned, that is a Unix-specific feature. In Windows XP
> you can rename the file to .pyw to run it automatically with pythonw.exe.
> On
> Windows CE there is no standard way but this might help:
>
> python /nopcceshell program.py
>
> Luke
Forgive my continued ignorance. Changing the extension works fine in XP to
suppress the console window, but I don't understand how to enter the command
you suggested in CE. Did you find a console for CE that permits you to type
in commands? Does CE come with one (that I have been unable to locate)?
I also posted a related question last week, but I never saw my message in
the
digest (which happens frequently). I am also wondering what the procedure
is
for attaching an icon to my application so that I can run the application by
tapping the icon? And, to be precise, what I would like is to run my Python
program in such a way that the console window does not appear. Perhaps
tapping the icon would run the command that you suggested above.
--
Jeffrey Barish
_______________________________________________
PythonCE mailing list
PythonCE at python.org
http://mail.python.org/mailman/listinfo/pythonce
More information about the PythonCE
mailing list