[Tutor] Executing shell commands
Phil
phillor9 at gmail.com
Sat Feb 15 22:46:28 EST 2020
On 16/2/20 12:47 pm, boB Stepp wrote:
Thank you Bob for your reply.
> subprocess.call("ls", "/home/phil/Downloads/*.gpx", shell=True)
Adding shell=True to .call() or .run() generates the following:
Traceback (most recent call last):
File "/home/phil/Python/waypoints.py", line 6, in <module>
subprocess.run("ls", "/home/phil/Downloads/*.gpx", shell=True)
File "/usr/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.7/subprocess.py", line 702, in __init__
raise TypeError("bufsize must be an integer")
TypeError: bufsize must be an integer
Anyway, you've given me something to think about, I'll experiment further.
--
Regards,
Phil
More information about the Tutor
mailing list