Prashant Shukla
Prashant Shukla

Reputation: 762

Spawning a process

What exactly does the line

spawn a process that would run it autonomously

means, please explain.

Language Python

Server Linux

An example will be better for understanding.

Upvotes: 0

Views: 309

Answers (1)

Tom Karzes
Tom Karzes

Reputation: 24052

It means to create a subprocess that does something ("runs it") independently of your main python process. You can read up on the Python subprocess module for details. Without knowing your exact needs, it's hard to suggest what is specifically best for you, but here's an extremely simple example:

import subprocess

subprocess.call("/bin/date")

This will run /bin/date, and the output will go to standard error.

Upvotes: 1

Related Questions