Python Forum
what i would like to add to subprocess.Popen()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what i would like to add to subprocess.Popen()
#2
Use the cwd= keyword argument of subprocess.Popen() and other functions, for example

>>> import subprocess as sp
>>> import os
>>> sp.run(['ls'], cwd=os.path.expanduser('~'))
Reply


Messages In This Thread
RE: what i would like to add to subprocess.Popen() - by Gribouillis - Aug-21-2023, 09:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pipe(s) in = subprocess.Popen() Skaperen 0 1,835 Feb-13-2021, 11:48 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020