python

Discussion in 'Perl Misc' started by George Mpouras, Sep 20, 2013.

  1. 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;
    George Mpouras, Sep 20, 2013
    #1
    1. Advertising

  2. George Mpouras

    ccc31807 Guest

    On Friday, September 20, 2013 11:31:32 AM UTC-4, George Mpouras wrote:
    > I am handled a Python script to re-use a part of 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 file 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 thataccepts the output as input.

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

    CC.
    ccc31807, Sep 20, 2013
    #2
    1. Advertising

  3. Στις 20/9/2013 22:04, ο/η ccc31807 έγÏαψε:
    > On Friday, September 20, 2013 11:31:32 AM UTC-4, George Mpouras wrote:
    >> I am handled a Python script to re-use a part of 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 file 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 should use the same language for the same task, just as a matter of sanity, rewriting as necessary in the language you choose. However, I don't object to having a process that uses different languages to handle different parts, and I have some processes that use Perl, ColdFusion, Visual Basic, and even Transact/SQL (Microsoft DTS) for different parts.
    >
    > CC.
    >




    there is the Inline::python
    too late now (i rewrite it to Perl) no one mention it , thanks ...
    George Mpouras, Sep 23, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    740
  2. Paul Moore
    Replies:
    0
    Views:
    610
    Paul Moore
    Mar 1, 2008
  3. Martin v. Löwis
    Replies:
    0
    Views:
    650
    Martin v. Löwis
    Mar 1, 2008
  4. Senthil Kumaran
    Replies:
    0
    Views:
    570
    Senthil Kumaran
    Jan 17, 2011
  5. R. David Murray
    Replies:
    0
    Views:
    750
    R. David Murray
    Jan 17, 2011
Loading...

Share This Page