[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] wxpython and pygame



hi again

another question.
I am still trying to use both wxpython and pygame together.
reasons : I need to be able to have menus (contextual and pulldown) but also to detect file drop actions into the stage if possible.

I also need to access some system functionality like open a "file open" dialogue box or "save as" etc...
My project is an strange application that is somewhere between a game and a "normal" software.

I am not sure if I could achive this just by using wxpython but look sto me more complex and so far i like pygame better.

The main problem i find is that because pygame is not imported in the headers of the program if i define some classes that use pygame within some of the methods (like any sprite) then i get errors coz pygame hasnt been defined yet.
I have been doing al kinds of experiments with no luck.
Then if i define pygame on the headers the wxpython open up in another window. This could actually suit very well what i am doing but doesnt seem to be very stable and i guess its just a very naughty way to do things.
Anyone has an example of integrating both wxpython and pygame that is not the one in the wiki?

An alternative to this would be to run two separated programs, one containing the pygame and the other running the wxpython gui and get them comunicating but i guess there are thousand of methods to achive this. Thats why i am trying to run an exe from python in paralel to the main python app.

i am not sure that i have explained very well my problem but i dont think i can do better, sorry.

thanks for the help!!


--
enrike ::