开发者

Daemon process which accepts arguments and returns results

This is the scenario.

Run a python script in background. Call this开发者_JAVA百科 script using perl with arguments and returns a result to stdout.

How do I write this python script ?

Basically the question is how do I pass arguments to a running program ? Is this possible (via threads/subprocess/etc/., ) ? else how do I approach this problem ?


This might be a good usage for something like thrift. You can invoke methods of the python script which runs as a server. No need to resort to capturing stdout, you can just have the python script return a string to the caller.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜