开发者

How can I create a Python wrapper around Perl code?

开发者 https://www.devze.com 2023-03-19 00:37 出处:网络
I\'m hoping to write a Python wrapper around an existing Perl API for a site I\'m intending to build using the RESTful web services framework. Has anyone been able to do this (build a Python-to-Perl w

I'm hoping to write a Python wrapper around an existing Perl API for a site I'm intending to build using the RESTful web services framework. Has anyone been able to do this (build a Python-to-Perl wrapper) with much success?

I have seen the page here htt开发者_StackOverflow社区p://wiki.python.org/moin/IntegratingPythonWithOtherLanguages#Perl, which details a few available packages, but I wasn't sure if anyone had any experience with using these and if any is better than an other?

Any pros and cons please? :-D


Use subprocess

subprocess.Popen( "perl some_code.pl" )

Works really well.


PyPerlish is no longer developed and Inline::Python is for using python code in perl, so... I'd go with PyPerl.

0

精彩评论

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

关注公众号