[Tutor] gui

Essah Mitges e_mitges at hotmail.com
Wed Jun 10 23:23:07 CEST 2009


thx lol fixed part of the problem

----------------------------------------
> To: tutor at python.org
> From: lie.1296 at gmail.com
> Date: Wed, 10 Jun 2009 13:24:48 +1000
> Subject: Re: [Tutor] gui
>
> Essah Mitges wrote:
>> 1.
>> Traceback (most recent call last):
>> 2.
>> File "C:\Users\John Doe\Desktop\D-Day\back.py", line 47, in 
>> 3.
>> main()
>> 4.
>> File "C:\Users\John Doe\Desktop\D-Day\back.py", line 37, in main
>> 5.
>> elif sbut.clicked(k.pos):
>> 6.
>> File "C:\Users\John Doe\Desktop\D-day\but.py", line 200, in clicked
>> 7.
>> subprocess.Popen(["D-Day", "Destruction.py"])
>> 8.
>> File "C:\Python26\lib\subprocess.py", line 595, in __init__
>> 9.
>> errread, errwrite)
>> 10.
>> File "C:\Python26\lib\subprocess.py", line 804, in _execute_child
>> 11.
>> startupinfo)
>> 12.
>> WindowsError: [Error 2] The system cannot find the file specified
>>
>> The error in readable form
>
> Readable doesn't mean it have to be colored and line numbered, although
> this is more readable than the previous one -- at least on a newsreader
> that supports HTML -- it's better to keep messages in plain text (i.e.
> not only unformatted text but change the newsreader's settings to pure,
> plain text)
>
> All right to the problem, the problem is not related to pygame at all;
> it's in your subprocess.Popen() call. The traceback says that
> subprocess.Popen cannot find the executable/script that would be run.
>
> A quick look at the traceback:
> subprocess.Popen(["D-Day", "Destruction.py"])
>
> That line is executing an executable/script named "D-Day" and pass an
> argument "Destruction.py" to it. Probably not something you wanted to
> do. What you want to do is something like:
>
> subprocess.Popen(["D-Day\Destruction.py"])
>
> or perhaps:
> subprocess.Popen(["python", "D-Day\Destruction.py"])
>
> depending on whether the file association is setup correctly and whether
> the shell's search path is set to search python's install directory.
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

_________________________________________________________________
Internet explorer 8 lets you browse the web faster.
http://go.microsoft.com/?linkid=9655582


More information about the Tutor mailing list