2024-06-09 19:52:54 发布
网友
我正在用Python创建一个程序来监听varios用户交互并记录它们。我有以下要求/限制:
我一直在读关于subprocess的文章,但我似乎找不到任何关于如何同时停止两者的东西。如果有人知道Erlang/Elixir,我需要一个等价的spawn_link。在
subprocess
spawn_link
谢谢!在
回答标题中的问题(对于来自google的访问者):there are robust solutions on Linux, Windows using OS-specific APIs and less robust but more portable ^{}-based solutions。在
要解决您的特定问题(它是XY problem):使用守护进程线程而不是进程。在
线程将允许在不阻塞GUI的情况下执行I/O,code example(即使您选择的GUI不提供异步)。I/O API,如tkinter's ^{}或gtk's ^{})。在
回答标题中的问题(对于来自google的访问者):there are robust solutions on Linux, Windows using OS-specific APIs and less robust but more portable ^{}-based solutions 。在
要解决您的特定问题(它是XY problem):使用守护进程线程而不是进程。在
线程将允许在不阻塞GUI的情况下执行I/O,code example(即使您选择的GUI不提供异步)。I/O API,如tkinter's ^{} 或gtk's ^{} )。在
相关问题 更多 >
编程相关推荐