开发者

Running Python scripts from Perl scripts

I have a complex state mach开发者_如何学Pythonine in Perl which would be call the perl library module supporting different functionality. Each of the library modules are called sequentially based on state machine in perl.

But now I have one of the library module (consisting of many API) in python scripts which is needs to be called from perl state machine.

Please suggest me as to how can I call the sub-routines in python from the perl state-machine.


There is an Inline::Python on CPAN, but personally I have been unable to get that to work. Other than that, you can't. You will need to create a wrapper script (in Python) which does the calls you need and call that as a separate process. Depending on how the app is structured, you might have to pass data through some language neutral IPC mechanism like sockets or pipes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜