coder_girl has asked for the wisdom of the Perl Monks concerning the following question:

Hi, new programmer here! I need to have access to a set of Python libraries (Dendropy) in my Perl code. I found a module on CPAN called Inline that I thought might do the trick, but I've no clue how to go about doing this. Can someone please help? Also, if there's something that might be more useful for accomplishing this would you mind pointing me in the right direction? Oh, and since I am VERY new to programming please don't use too many big words :-) Thanks!

Replies are listed 'Best First'.
Re: Using Python Libraries
by GrandFather (Saint) on Sep 02, 2010 at 04:25 UTC

    Maybe one or some of the CPAN phylogenetic offerings may be of use? If you are a new programmer then not fighting with 'foreign' libraries on top of learning enough programming to solve your problem is likely to be a distinct advantage!

    I apologise for all the big (length($word) > 6) words like phylogenetic and programmer :-)

    Update: fixed CPAN link (thanks mr_mischief)

    True laziness is hard work
Re: Using Python Libraries
by aquarium (Curate) on Sep 02, 2010 at 04:26 UTC
    if you're not absolutely tied to the python libraries--which makes things a little complicated--might be easier to use BioPerl perl package instead. depending on which platform you're on, adding the package or specific module from it to perl is done a little differently. at least i think that the BioPerl package has what you're looking for, i.e. Bio::PhyloNetwork module in it.
    i think that's the easiest way..rather than trying to call python routines from perl or worse doing IPC between a python and perl program. sorry about the acronym..it's short though :)
    if you let us know if you're on windows/linux/unix/mac etc and which version of perl you're on, then someone might help with installing your preferred module for perl.
    browse/search in cpan for phylogenetic and have a look at the documentation there, to see if a module suits.
    the hardest line to type correctly is: stty erase ^H
Re: Using Python Libraries
by ikegami (Patriarch) on Sep 02, 2010 at 04:45 UTC
    There's a working example at the top of Inline::Python. What seems to be the problem?