Open file in default app and exit in Windows

stephen.boulet at gmail.com stephen.boulet at gmail.com
Wed Jan 28 10:50:12 EST 2015


I am using the following to open a file in its default application in Windows 7:

from subprocess import call

filename = 'my file.csv'
call('"%s"' % filename, shell=True)

This still leaves a python process hanging around until the launched app is closed. Any idea how to get around?



More information about the Python-list mailing list