#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Isle of dogs
    Posts
    68
    Rep Power
    10

    Interfacing Python with Perl


    I have some modules implemented in perl but my project is in python. What can I do so I can use those modules. Plus perl has some nice text manipulation featues I like.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Your not in an easy position. Ideally I would just rewrite the perl modules in Python, so naturally that's what I would suggest. There was also a project designed to convert Python to perl a while ago, though I can't find it now.

    There is another way of course, use Pythons & perls SOAP modules to create a web-service from the parts of the too languages .NET works like this apparently.

    You might want to do a proper search on google on these subjects,

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    You might find this interesting: http://www.crazy-compilers.com/bridgekeeper/
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Isle of dogs
    Posts
    68
    Rep Power
    10

    Thank,s


    Originally Posted by Tkinter_Bell
    I have some modules implemented in perl but my project is in python. What can I do so I can use those modules. Plus perl has some nice text manipulation featues I like.
    Thanks for your help, I think that it is best that I stick with Python. It seems to me that the best features of perl are not would be nice but it is not worth the hasle. But I am surprised that Python and Perl are not bed buddies just like VB.Net and C# are.
  8. #5
  9. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    But I am surprised that Python and Perl are not bed buddies just like VB.Net and C# are.
    VB.Net and C# are only buddies because they share a common core (the .NET framework with it's intermediate run time language) - it also helps that they were developed by just one company. They can only make use of code written in other languages within the context of that framework.

    In contrast Perl and Python are totally seperate developments and there is no over arching group that dictates their interoperation.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    624
    Rep Power
    34
    Plus perl has some nice text manipulation featues I like.
    As well as the standard string operations, python has regular expressions support (import re), also strings being lists of characters, list comprehensions, itertools, generators and other modules support many more options for string manipulation and verification.

    Perhaps if you gave some examples we could come up with some Python ideas to do the same things?
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Colorado, USA
    Posts
    68
    Rep Power
    10

    Try pyPerl


    You can try pyPerl-
    I made an attempt, but had a hard time. You may have better luck

    PyPerl at python.org
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Isle of dogs
    Posts
    68
    Rep Power
    10
    Originally Posted by sfb
    As well as the standard string operations, python has regular expressions support (import re), also strings being lists of characters, list comprehensions, itertools, generators and other modules support many more options for string manipulation and verification.

    Perhaps if you gave some examples we could come up with some Python ideas to do the same things?
    Thanks but no thanks, It would have been nice to use Perl because it is less verbose then Python or any other language while handling regular expressions. Regex is a part of Perls syntax.

    I will stick to python to save any hasle

IMN logo majestic logo threadwatch logo seochat tools logo