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

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to