[PythonCE] Problem calling python

Luke Dunstan coder_infidel at hotmail.com
Tue Apr 11 17:10:28 CEST 2006


----- Original Message ----- 
From: "Ali Sabil" <hybrid at tuxfamily.org>
To: <pythonce at python.org>
Sent: Tuesday, April 11, 2006 2:54 AM
Subject: [PythonCE] Problem calling python


> Hi all,
>
> I have some trouble running python files.
>
> If i open a shell (or whatever you call it) and type: python hello.py
> it starts python then says :
>
> Traceback(innermost last)
> NULL:NULL

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?

>
> If i edit the registry thingies, and associate .py with python with
> something like this :
>
> [HKEY_CLASSES_ROOT\pyfile\Shell\Open\Command]
> @="\"\\Program Files\\Python24\\python.exe\" \"%1 %2 %3 %4 %5 %6 %7 %8 
> %9\""
>

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...

> 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?

Luke

>
> Thank you for your help
>
> --
> Ali
>


More information about the PythonCE mailing list