[Tutor] gui further explained

Wayne srilyk at gmail.com
Wed Jun 10 02:11:03 CEST 2009


On Tue, Jun 9, 2009 at 6:49 PM, Essah Mitges <e_mitges at hotmail.com> wrote:

>
> What I am trying to do is start my pygame game from my pygame menuI do not
> think I am using the right code to do this I am trying to use the subprocess
> module to open a child window with the game inside of it but python doesn't
> like thatThe second thing that i'd like to know how I could list the content
> of a text file inside a pygame window(this is a different file)Traceback
> (most recent call last):  File "C:\Users\John Doe\Desktop\D-Day\back.py",
> line 47, in     main()  File "C:\Users\John Doe\Desktop\D-Day\back.py", line
> 37, in main    elif sbut.clicked(k.pos):  File "C:\Users\John
> Doe\Desktop\D-day\but.py", line 200, in clicked
>  subprocess.Popen(["D-Day", "Destruction.py"])  File
> "C:\Python26\lib\subprocess.py", line 595, in __init__    errread, errwrite)
>  File "C:\Python26\lib\subprocess.py", line 804, in _execute_child
>  startupinfo)WindowsError: [Error 2] The system cannot find the file
> specified
>

As far as I can tell, since your error formatting was lost, is that Popen
can't find the the file.

The other problem is that what you're thinking of really makes no sense.
Pygame doesn't need (and shouldn't) run a program "inside" the window. You
should have all of your game processes available to the main program and
when you want to start the game it should just be a part of it - not a
subprocess.

HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090609/15994d31/attachment-0001.htm>


More information about the Tutor mailing list