How can I run a program?

phil hunt zen19725 at zen.co.uk
Sat Jul 30 09:02:08 EDT 2005


On 30 Jul 2005 03:33:14 -0700, Lad <python at hope.cz> wrote:
>Hello,
>I am running Python on XP and have a problem with
>a  program  if its name consists '-' for example:
>my-program.py
>When I try to run a program with such name
>I get the error :
>
>Traceback (most recent call last):
>  File "<interactive input>", line 1, in ?
>NameError: name 'my' is not defined
>
>Python thinks that the name of program is my.py only
>but the name is my-program.py
>
>What is a solution?

Have you tried renaming it so it doesn't have a "-" in it?

-- 
Email: zen19725 at zen dot co dot uk





More information about the Python-list mailing list