|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to call perl script from Python? How to call perl script from Python? I am new with Python. I want to know If I can run a Perl script from Python? Please give me an example for doing this if its possible? Thanks in advance. |
#2
| |||
| |||
Re: How to call perl script from Python? Hi, Do you have installed Perl engine & Python? Only python can't parse perl script. If yes then its really easy. GO ahead. |
#3
| |||
| |||
Re: How to call perl script from Python? Actually what I want to do is, pipe an email text which is in a tring to the perl script & store the result in another variable. IS this possible? Please let me know how to do so? Can I use OS.system for this I hope I can but not sure actually. My system only have Python. |
#4
| |||
| |||
Re: How to call perl script from Python? Use subprocess. Here is the Python script: Code: #!/usr/bin/python import subprocess var = "hello" pipe = subprocess.Popen(["./x.pl", var], stdout=subprocess.PIPE) result = pipe.stdout.read() print result Code: #!/usr/bin/perl use strict; use warnings; my $name = shift; print "hello $name!\n"; |
![]() |
|
Tags: call perl script, python |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Perl VS Python | Trance Maniac | Software Development | 6 | 06-10-2010 11:01 PM |
Is it possible to execute Perl script within another script? | RasMus | Software Development | 2 | 21-07-2009 10:57 PM |
Need Perl script to execute from another. | beelow | Software Development | 2 | 20-06-2009 09:17 AM |
Training on scripting languages perl,python,Tcl/Tk in Mumbai | jagori566 | Education Career and Job Discussions | 2 | 20-05-2009 06:43 PM |
Title of a Perl CGI script | !const | Software Development | 2 | 26-03-2009 11:43 PM |