On Wed, Dec 21, 2016 at 9:37 PM, Jim Byrnes <jf_byr...@comcast.net> wrote:
> Python 3.4 on Ubuntu
>
> If I was going to open a libreoffice calc file from the terminal I would go:
> libreoffice --calc /home/path/to/myfile.ods.
>
> How would I do this from Python?

My first thought was:

import os

os.system(insert_your_command)

But looking at the documentation
(https://docs.python.org/3/library/os.html#os.system) it says it is
preferable to use the subprocess module with documentation here:
https://docs.python.org/3/library/subprocess.html#replacing-os-system

It makes me wonder if I should go back and revisit some code I wrote
as I used the os.system()approach.  But was this option available in
Py 2.4.4?  I'll have to check.


-- 
boB
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to