开发者

Can I call Perl from within python?

I have searched a lot and I have understood that there exists inline::Python for putting in python code within Perl.. But I am looking for some means by which I can access modules and functions written 开发者_如何转开发in Perl by not writing any Perl code, through a python code.

Maybe, I am asking for too much?


I believe this is the sort of thing that the Parrot project aims to allow. It's a VM that's supposed to be able to run various dynamic languages, including Python and Perl. I've no idea how ready it is for real use, though, and I've never seen any instructions for people wanting to use Parrot, rather than develop it.


You could use Python's language services to parse Perl and generate a Python AST (with an appropriate FFI for any modules written in C), but I have not seen such an undertaking before.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜