I want to call a python/pygame program from inside another. I do this with the os.startfile(minigame1) command. But when the program launches it first runs a python command line window and then opens the minigame in a seperate window. How can I make both programs share the same pygame window? Thank you in advance
If it is at all possible for two instances of a Pygame program to share a common display, then try using pygame.display.get_surface() to get the display surface- this will return None if the display isn't already initialized.
Another issue you will have to overcome in your project is the fact that calling pygame.event.get() (or a similar method) in one program will hide it from the other, so you will have to share the pygame.event.Events between the two programs.
This would only work if you can get the two programs to share the same window though; if Pygame's written so that separate Python processes will have separate Pygame windows, then I doubt you'll be able to get around that without changing up the Pygame source.
Two python/pygame programs to run in the same window