[PythonCE] Problem calling python

Luke Dunstan coder_infidel at hotmail.com
Wed Apr 12 17:13:19 CEST 2006

While you are debugging this, please be aware that unlike most operating 
systems, Windows CE has no concept of a "current directory" at all. The 
command prompt gives the illusion of a current directory for convenience but 
once you start another program it will have no way of knowing what the 
command prompt current directory was. PythonCE also emulates a current 
directory for compatibility with other Python platforms but it is always 
"\Temp" when you start PythonCE. You can see what the current (emulated) 
directory is using os.getcwd().


----- Original Message ----- 
From: "Ali Sabil" <hybrid at tuxfamily.org>
To: "Luke Dunstan" <coder_infidel at hotmail.com>
Sent: Wednesday, April 12, 2006 1:13 AM
Subject: Re: [PythonCE] Problem calling python

> Hi again
>> Running python from the command prompt works for me. Did you type the
>> full path to hello.py? If so what is the exact command you used and
>> what was the "current directory" in the command prompt?
> i didn't use a full path, hello.py was in the current directory, i
> didn't try to run it with an absolute path. i'll try now and report.
> The command i used before is python hello.py , hello.py being in the cwd
>> Try quoting the individual arguments instead of all of them as a group:
>> @="\"\\Program Files\\Python24\\python.exe\" \"%1\" \"%2\" \"%3\"
>> \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\""
>> I haven't tried it yet though...
> Okey i'll give it a try ... i will also try to use %* or whatever it is
>>> I get the same exact effect when clicking on hello.py ... now if i use
>>> [HKEY_CLASSES_ROOT\pyfile\Shell\Open\Command]
>>> @="\"\\Program Files\\Python24\\python.exe\" \"%1\""
>>> It works, or at least almost, since it complains about import failure
>>> for some modules.
>>> The problem now is that i cannot run python from a shell, and i need
>>> this to build a .bat that setup the environment.
>>> Concerning the import failure, i don't know, but it's weird since the
>>> same code works perfectly on my linux box.
>> What modules? Where are they located, etc?
> I am trying to get xmppd (http://nuweb.org/index) to run under winCE, i
> managed to build the only dependency to xmppd (which is tlslite), now i
> have problems with python itself :/ (btw i built python from sources for
> winCE 5.0 under an x86 platform)
> Thank you very much
> --
> Ali

More information about the PythonCE mailing list