[Tutor] gui further explained

Essah Mitges e_mitges at hotmail.com
Wed Jun 10 02:18:38 CEST 2009


lol i was trying to open it while keeping my menu open to have it in a different window

________________________________
> From: srilyk at gmail.com
> Date: Tue, 9 Jun 2009 19:11:03 -0500
> Subject: Re: [Tutor] gui further explained
> To: e_mitges at hotmail.com
> CC: tutor at python.org
>
> On Tue, Jun 9, 2009 at 6:49 PM, Essah Mitges> 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
>

_________________________________________________________________
Windows Live helps you keep up with all your friends, in one place.
http://go.microsoft.com/?linkid=9660826


More information about the Tutor mailing list