win32: execute a file just like a double-click

Greg Krohn ("X", "@") "gkrohnXvolucris.8m.com".replace
Wed Jul 31 13:57:00 EDT 2002


"Bob Roberts" <bobnotbob at byu.edu> wrote in message
news:c4e6b17d.0207310941.72463497 at posting.google.com...
> From within python, is there any way to "execute" a file just like you
> double-clicked on it?  For example, if you "execute" a .mp3, winamp
> plays it.  If you "execute" a .txt, it opens in notepad.

os.system('start python_theme_song.mp3')

Greg





More information about the Python-list mailing list