Python Forum
How do I run a program without any relationship to it?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I run a program without any relationship to it?
#1
I see that there are many ways to launch a program from Python, but I cannot find specifically what I am looking for.

I need to be able to run a program and not have any ties to it. I don't care what happens after it launches. I don't need a return code, or to monitor it, or have any knowledge of it whatsoever.

On Windows and the solution doesn't need to be cross platform. And using a library is fine.

What are my options?

Thank you.
Reply
#2
Do you want to run a python script without a console or any kind of window, or do you want a Python program to run another program?
Reply
#3
So, I think you are asking how to launch a program from within python? If correct, would look at the sub process module
Reply
#4
I currently have a Python console running in an infinite loop with a 1 second sleep.
I may, at some point, make it windowless, but for now I am monitoring it via the console.

So, at certain times, I wish the console to run things. Those things could be another python script, an executable, a PowerShell script or whatever one could imagine. But the main thing being that it have no relation to the Python application that launched it. And this is only for the fact that I am concerned about memory issues if things don't get cleaned up.

Thank you, Jef. I will look into the sub process module.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I make a plot representing connection relationship with python matplotlib? Berlintofind 1 1,970 May-08-2020, 09:27 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

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