Newbie: Running a script on WindowsXP
Steve Holden
sholden at holdenweb.com
Tue Apr 23 13:09:03 EDT 2002
"billludden" <billludden at email.msn.com> wrote in message
news:#dmZtdu6BHA.1188 at cpimsnntpa03...
> Hi,
>
> I am trying to figure out how to run a Python21 script
> from the "Run" box on WindowsXP Home edition.
> When I run it, the Command Prompt box just briefly
> flashes on the screen and closes itself. I have tried
> using the -i option like you would use in Windows 98
> but it doesn't seem to work. I also tried appending
> Autoexec with:
> SET PATH=.........;C:\PROGRA~1\PYTHON21
>
> Does anyone understand what I'm doing wrong?
> (incidentally, I had the same problem with "hello world"
> when I tried it in C)
>
> Thank you!
> Bill
>
Probably you aren't giving the interpreter the correct full path to the
program file. On my Win2K machine,
python -i C:/Steve/Projects/Python/test9.py
gives the expected behavior, and I see (last few lines of) the output in a
terminated command window. But
python -i nosuchprogram.py
just flashes up a command window long enough to display (I am presuming)
python: can't open file 'nosuchprogram.py"
which, sadly, only takes a few tens of milliseconds. Arguably this is a bug
in the response to the -i flag.
regards
Steve
--
home: http://www.holdenweb.com/
Python Web Programming:
http://pydish.holdenweb.com/pwp/
More information about the Python-list
mailing list