Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

This module provides a way to execute perl statements in a parallel perl process.

Project Description

A priori, it is a strange idea to execute pieces of perl code from a python program, unless you have to use an existing perl API and you want to write as less perl code as possible. In this case (and only it, in my opinion), perlprocess may help you. See VMPython as an example of use.

When a perlprocess object is created, a separate process is launched, running a small perl script that expects commands on STDIN. If a string is given as parameter to the perlprocess constructor, it is used as a prolog for the perl script. It is usefull mainly to declare use clauses or some useful functions.

When invoking the run(command) method of the perlprocess object, the command is sent to the perl process as a string containing eventually several perl statements, eventually among several lines. This string is evaluated, the result is printed on stdout. If an error occurs (perl variable $@ not empty), PerlRuntimeError is raised. If you define a perl variable of any kind in the perl process, this variable remains alive until you undefine it.

Release History

Release History

This version
History Node

0.1

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting