Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am handled a Python script to re-use a part of it.
I have to options.
Modify Python script and and catch its STDOUT or write the whole code as  
a Perl module.
Is there any other way to include Python code on a Perl script;

Re: python

On Friday, September 20, 2013 11:31:32 AM UTC-4, George Mpouras wrote:
Quoted text here. Click to load it

Have you tried writing a Perl script that calls the Python script?

Does the Python script return data values? Perhaps it writes to an output f
ile that you can open and munge in Perl.

You can also try writing a shell script that (1) runs the Python script, (2
) saves the output in a particular place, and (3) runs the Perl script that
 accepts the output as input.

I find that Perl and Python are good at different things. Ideally, you shou
ld use the same language for the same task, just as a matter of sanity, rew
riting as necessary in the language you choose. However, I don't object to  
having a process that uses different languages to handle different parts, a
nd I have some processes that use Perl, ColdFusion, Visual Basic, and even  
Transact/SQL (Microsoft DTS) for different parts.


Re: python

Στις 20/9/2013 22:04, ο/η ccc31807 έγραψε:
Quoted text here. Click to load it

there is the Inline::Python
too late now (i rewrite it to Perl) no one mention it , thanks ...

Site Timeline