Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Perl playing nice with Python

by tomazos (Deacon)
on Oct 04, 2005 at 08:53 UTC ( #497160=perlquestion: print w/replies, xml ) Need Help??

tomazos has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I have just started a new job and have been handed two systems to integrate.

One is a complex testing script (for embedded systems) written in Perl.

The other is a batch processing web server written in Python.

Basically I need to get Perl and Python "talking to each other".

I was wondering if anything is available for the purposes of calling Perl from Python and visa-versa?

Do you have any general advice on integrating Perl and Python systems?


Update: Thanks for the responses. I think what I want is an "Inline::Perl" for Python. Does such a beast exist? Has someone embedded a Perl interpretter in Python?

Replies are listed 'Best First'.
Re: Perl playing nice with Python
by adrianh (Chancellor) on Oct 04, 2005 at 09:28 UTC
Re: Perl playing nice with Python
by blazar (Canon) on Oct 04, 2005 at 09:15 UTC
    Some of the options described in perldoc perlipc {may,should} still apply. Provided that you find out how to do the corresponding stuff in Python, that is. Communicating over a socket or even through a named pipe (assuming you're under *NIX here) should be no trouble at all...
Re: Perl playing nice with Python
by Perl Mouse (Chaplain) on Oct 04, 2005 at 09:26 UTC
    That depends on what you mean by "calling each other". It could be as simple as "system", if you want to call one program from the other. Or you might want to communicate over a pipe, socket or message queue. Or exchange information using files or databases. Or do you want to call procedures in each other? Then you might want SOAP or even RPC. Or do you want to embed one in the other? That's possible too - Parrot isn't quite ready yet, but go read "man perlembed".
    Perl --((8:>*
Re:Perl playing nice with Python
by bioMan (Beadle) on Oct 04, 2005 at 15:20 UTC

    If you are working in Windows ActiveState has a perl/python integration project called PyPerl.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://497160]
Approved by Corion
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2023-11-30 07:24 GMT
Find Nodes?
    Voting Booth?

    No recent polls found