running non-python progs from python

Spiffy spiffy at worldnet.att.net
Tue Dec 9 17:44:14 EST 2003


"Diez B. Roggisch" <deets_noospaam at web.de> wrote in message
news:br5hu8$em2$01$1 at news.t-online.com...
> > Here is the code used to call it from Python:
> > import os
> > filename = "C:\Python22\Canyon.mid"
> > os.system("C:\Python22\playb.exe%s"%filename)
> > ...this causes a dos box to appear which promptly hangs and does
nothing,
> > at which time Python stops responding. Vartiations on this will cause
the
> > dos box to appear with the message "Bad command or file name".
> >
>
> Looks like there is a space missing -
>
> os.system("C:\Python22\playb.exe %s"%filename)
>                                 ^
>
> Diez
>
     There is no space missing. That is the name of the file on my comp.






More information about the Python-list mailing list