How do you share data between a parent and forked child process in Python?

后端 未结 5 2030
北恋
北恋 2020-12-10 13:23

I\'m pretty sure one would do this using the os.plock(op) function, but I have no idea how. Also, if there\'s a better way, I\'d be grateful to find out. Code snippets are v

5条回答
  •  悲&欢浪女
    2020-12-10 13:35

    You have two options: os.popen* in the os module, or you can use the subprocess module to the same effect. The Python manual has pretty documentation and examples for popen and subprocess.

提交回复
热议问题