Opening a file with system default application

tac-tics tactics40 at gmail.com
Fri Jun 23 12:37:24 EDT 2006


BartlebyScrivener wrote:
> don't know Jython, but in Python, I think you want:
>
> import os
>
> os.system('mytextfile.txt')
>
> Whatever file you reference should open in the application associated
> with it. At least that's the way it works on Win XP
>
> rd

I didn't think about that. It would probably break like mad under *nix
that fine. This will solve my issue.

Thanks =-)

Even still, does anyone know if there is a more platform indepedent way
to do this?




More information about the Python-list mailing list