I have a python function as
import commands
output=commands.getputput("ls -l")
print output
return output
I need to get this return value from python function from my perl script
my($command)=`$python_script_path`;
print $command;
My problem is that by printing the ouput in python i can get my results on screen but i actually require this output in Perl script as well so I would rather return it. How can I achieve it ? Also please note I do not want to use inline python. thanks!!
$commandvariable?$commandcommandsmodule is deprecated in favor ofsubprocess.