[Tutor] I don't know why this program doesn't run

Dave Angel d at davea.name
Sat Sep 22 01:47:10 CEST 2012


On 09/21/2012 07:34 PM, Gina wrote:
> I don't know why this program doesn't run, but if you know, please
> tell me.
> -thanks
>

So what happens when you try?  "Doesn't run" covers a multitude of
possibilities.

First one:

python Car Salesperson.py
python: can't open file 'Car': [Errno 2] No such file or directory
davea at think:~/temppython$

The fix for this one is to put quotes around the script name.  Or to
escape the blanks.  Or even better to rename the file so it doesn't have
spaces in it.


Please be specific.  You're running some OS, you launch some particular
version of Python, you give it some commandline, and you get some
unexpected result.  Use a lot of copy/paste and it's not too painful.

-- 

DaveA



More information about the Tutor mailing list