Python Forum
How could i change the python interpreter path of os.system()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How could i change the python interpreter path of os.system()
#3
Don't try to modify your environment, instead modify your program.
import sys
from subprocess import Popen


proc = Popen([sys.executable, "your_script.py"])
return_value = proc.wait()  # this call blocks until the program has been finished
Don't use os.system, it's deprecated since years.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: How could i change the python interpreter path of os.system() - by DeaD_EyE - Sep-02-2020, 06:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mac default python interpreter Viewpoint8455 2 939 Oct-13-2022, 06:25 AM
Last Post: perfringo
  change backslash into slash in a path paul18fr 7 2,433 Jul-21-2022, 04:26 PM
Last Post: deanhystad
  Python Interpreter ankitdixit 4 2,719 Jun-10-2022, 12:37 PM
Last Post: katy1234
Photo Visual studio code unable to color syntax on python interpreter tomtom 4 6,952 Mar-02-2022, 01:23 AM
Last Post: tomtom
  How to set Tab size to 4 in Python interpreter? zzzhhh 1 1,867 Jan-18-2022, 12:11 PM
Last Post: snippsat
  readline.parse_and_bind() does not work in start-up script of Python interpreter zzzhhh 0 1,540 Jan-18-2022, 11:05 AM
Last Post: zzzhhh
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,229 Sep-09-2021, 01:25 PM
Last Post: Yoriz
Exclamation "System cannot find path specified"(Geany) kiwi99 2 3,910 Mar-18-2021, 07:37 PM
Last Post: kiwi99
  Change icons of system rizzla 1 1,935 Jan-28-2021, 03:30 PM
Last Post: Marbelous
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,697 Jan-11-2021, 06:30 PM
Last Post: ykumar34

Forum Jump:

User Panel Messages

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