Post

PythonPython

s
sri kanth

Posted on 24th April 2024|902 views

0
votes

Call Perl From Python

How to call Perl script from python?

I have a Perl script which I wan to request from a python script. Here is my code

var = "/your/file/path/"

pipe = subprocess.Popen(["./uireplace.pl", var], stdin=subprocess.PIPE) pipe.stdin.write(var) 

pipe.stdin.close()

 

Answers
P
Sowjanya Kodiganti

Posted on 24th April 2024

var = "/any/file/path/" 

pipe = subprocess.Popen(["perl", "uireplace.pl", var])

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos