[Tutor] mamelauncher (fwd)

Alan G alan.gauld at freenet.co.uk
Wed Sep 14 09:21:51 CEST 2005

> There actually seems to be a bit of a problem in the
> interaction with the system when it launches mame.
> If I run this:
> import os
> def run_mame_selection(selection):
>    os.system("C:\\mame096b\\mame.exe"+ selection)
> #main
> selection = " tnzs"
> run_mame_selection(selection)
> raw_input()
> mame reports files missing, but I can launch the game
> manually- I suspect that this is some sort of error
> that occurs normally but is bypassed on launch and
> that  my one-shot attempt to launch the thing cannot
> handle. I think I need to have a wee look at
> subprocess!

Subprocess is not likely to help. This is more likely to 
do with getting the right command set up for system to execute.

How did you get on with Danny's suggestions for launching Pacman?

When you launch it directly are you in the same directory 
as the game? Could it be looking for files in the current 
directory and not finding them where the python script lives?

Switching to Subprocess might have a few advantages later, 
but for now is simply going to distract from the real problem.

Also can you post the error messages you get, its much easier 
for us to figure out where the errors are occuring if we see 
the full error text.

Alan G

More information about the Tutor mailing list