K
K
Kwad2020-05-14 20:38:11
Python
Kwad, 2020-05-14 20:38:11

How to make python not wait for os.system?

How to make python not wait for this command:

os.system("python D:/srv/main.py --no-interface --port {} --ip 127.0.0.1".format(task.task))

I tried to do it myself, but a bunch of arguments lead astray.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-05-14
@Kwad

Use the subprocess module .

N
Nazar Tropanets, 2020-05-15
@nazartropanets

Perhaps asyncio will help you.
Very good and reliable library for asynchronous tasks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question