zubinmehta
zubinmehta

Reputation: 4533

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?

Upvotes: 7

Views: 470

Answers (2)

Thomas K
Thomas K

Reputation: 40330

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.

Upvotes: 6

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798456

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.

Upvotes: 0

Related Questions