[Tutor] UPDATED: Question on how to open other programs and files

David david at abbottdavid.com
Mon Feb 9 04:55:26 CET 2009


Hi wrote:
> Re: Question on how to open other programs and files

Here is one way;

#!/usr/bin/python
import subprocess
print "Starting Adobe Reader "

def startReader():
	myreader = "acroread"
	fname = "test.pdf"
	print "Loading ", fname

	subprocess.call([myreader, fname])

def main():
	startReader()

if __name__ == "__main__":
	main()
-- 
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu



More information about the Tutor mailing list