同时从并行shell脚本调用Python脚本

时间:2022-12-24 17:28:48

I have a question about the Python Interpreter. How does is treat the same script running 100 times, for example with different sys.argv entries? Does it create a different memory space for each script or something different?

我对Python解释器有疑问。如何处理相同的脚本运行100次,例如使用不同的sys.argv条目?它是为每个脚本或不同的东西创建不同的内存空间吗?

System is Linux , CentOS 6.5. Is there any operational limit that can be observed and tuned?

系统是Linux,CentOS 6.5。是否有任何可以观察和调整的操作限制?

1 个解决方案

#1


1  

You won't have any problem with what you're trying to do. You can call the same script in parallel a lot of times, with different input arguments. (sys.argv entries). For each run, a new memory space will be allocated.

你要做的事情不会有任何问题。您可以使用不同的输入参数多次并行调用相同的脚本。 (sys.argv条目)。对于每次运行,将分配新的内存空间。

#1


1  

You won't have any problem with what you're trying to do. You can call the same script in parallel a lot of times, with different input arguments. (sys.argv entries). For each run, a new memory space will be allocated.

你要做的事情不会有任何问题。您可以使用不同的输入参数多次并行调用相同的脚本。 (sys.argv条目)。对于每次运行,将分配新的内存空间。