Python Forum
Spawning a new process that is not attached to python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spawning a new process that is not attached to python
#1
I am trying to write a code that executes a certain number of files in a directory. However, I do not want these files to be attached to python (aka python is the parent application) and I want them to have a completely different process group. Here is the code I am currently stuck on.

for x in os.listdir():
subprocess.Popen(x, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP)
Reply
#2
to start with, line 2 is not indented.
Reply
#3
It is in the actual program... not sure why it is not here.
Reply
#4
When I launch the external program, I do not want it to launch as a child process if that makes sense.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Question about Creating an Automated Process in Python Supratik1234 0 712 Jan-13-2023, 08:29 PM
Last Post: Supratik1234
  Python multiprocessing Pool apply async wait for process to complete sunny9495 6 6,220 Apr-02-2022, 06:31 AM
Last Post: sunny9495
  Process the image on the Python HTTP server Aleks 0 3,153 Dec-02-2021, 11:43 PM
Last Post: Aleks
  How to to tie the execution of one process to another inside a loop in Python ignorant_wanderer 0 2,018 Jul-11-2020, 03:44 AM
Last Post: ignorant_wanderer
  win32 API: Launch Application to RDP session from background process python script rangeshgupta 0 2,091 May-28-2020, 09:41 PM
Last Post: rangeshgupta
  My objective is to get the shape parameters of the particles in attached image chad221 0 1,755 Oct-26-2019, 10:27 AM
Last Post: chad221
  How to background another process in Python? Kalet 2 2,463 Oct-21-2019, 05:17 AM
Last Post: newbieAuggie2019
  How to sharing object between multiple process from main process using Pipe Subrata 1 3,618 Sep-03-2019, 09:49 PM
Last Post: woooee
  changing the process command line arguments in python Skaperen 3 2,946 Aug-19-2019, 02:40 PM
Last Post: wavic
  random behavriour when handle process termination signal in Python hamzeah 2 1,990 Jul-31-2019, 07:32 AM
Last Post: hamzeah

Forum Jump:

User Panel Messages

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