[python-win32] Running a script
Steve Holden
steve at holdenweb.com
Tue Sep 20 11:48:10 CEST 2005
Roger Shuttleworth wrote:
> Hello
>
> Windows XP SP2.
>
> I am a Python novice. I downloaded an application called rtf2xml that
> converts RTF files to XML. I have Python 2.4 installed, and updated my
> path to include c:\python24. The application has the following folder
> structure:
>
> rtf2xml-1.2 (contains setup.py, which I have installed using the python
> setup.py install command)
> rtf2xml (contains a bunch of .py files)
> scripts (contains rtf2xml.py and a test file called hello_world.rtf)
>
> The documentation says that I should be in the command prompt window and
> simply type:
> rtf2xml hello_world.rtf
>
> I've tried this but I get various errors, such as:
> rtf2xml is not recognized as an internal or external command...
> python: can't open file...[errno 13] permission denied
>
> Please can someone tell me (i) what directory I have to be in, and (ii)
> what the command line should be? I tried from various folders, with and
> without "python" in front, but nothing works.
>
Some basic information that might help:
http://www.python.org/doc/faq/windows.html
It sounds as though your instructions might be a git Unix-xentric. In
the Windows environment a program ordinarily has to be something.py or
something.pyw to be recognised as a Python program, whereas in
Unix/Linux the interpreter is often identified by the "shebang" line
(#!/usr/bin/python, or whatever).
Get back to the list if none of hte FAQ advice helps.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.pycon.org
More information about the Python-win32
mailing list