February 17th, 2004, 11:11 AM
Perl in Python ?
Just a quick question that popped up in my head last night.
Is there anyh way to import Perl modules ? Or, like, ANY other language's modules or equivalent ?
I fail to see how it would be possible, but until some time ago I thought Python files couldn't be converted to executables so...
Time is the greatest of teachers ; sadly, it kills all of its students.
- Hector Berlioz
February 17th, 2004, 11:48 AM
Nope, there's not. You can write C modules for Python with something like Pyrex, though. In general, there's no way of doing what you want until something like Parrot gets finished.
February 17th, 2004, 12:11 PM
I know there is support for calling perl code in Python using the 'perl' module packaged with ActiveStates ActivePython, whether or not this allows you to import perl module into Python remains to be see since i havnt used it.
February 17th, 2004, 12:17 PM
Actually Strike there is already an environment designed to let you do this kind of thing i.e. multiple language interaction ... DotNET. Looking forward to Parrot though.
February 17th, 2004, 01:24 PM
.NET isn't pertinent to the discussion because there are no Python bindings for it. I don't even think there are Perl bindings for it.
February 17th, 2004, 04:03 PM
February 17th, 2004, 04:15 PM
First link: that package is very experimental, not to mention very old. Hardly something to be considered usable for the general public.
Second link: the only thing it mentions are "research protoypes" and it links to an "exploratory implementation" which is even older than the first link
Third link: is a redirect to an implementation of something that allows ASPX to use Perl... not quite a full .NET platform for Perl.
And if there's a .NET hook in Parrot ... well, unless I'm sorely mistaken Parrot isn't released yet. So, all of this stuff is very beta and not recommended for general use.
February 17th, 2004, 04:50 PM
Experimental but useable since i've messed around with it a little in the past so Python has one useable .NET port for now and ActiveState are looking into the problem so i'm expecting to see something good there one day .
The third... i have no idea what you're talking about, there is a basic Python version for parrot is all i was saying . Why port parrot to .NET hehe?
If you download the souce-code you'll see a bit about Python in there along with some other languages
February 17th, 2004, 05:06 PM
February 17th, 2004, 08:43 PM
If you search google for 'perthon' there is something that converts python to perl
Tho better to steer clear of perl neway
February 17th, 2004, 08:58 PM
lazy_yogi: Why are you telling people that it is better to just steer clear of perl? I'm not agreeing or disagreeing. I'm just curious.
February 17th, 2004, 10:46 PM
February 18th, 2004, 04:19 AM
Looks like Strike said it . The fact remains; there are a lot of useful perl scripts. The challenge to us all is to provide equivalent but better functionality. Any (clean) suggestions?
I once had to tweak cvsweb for local use. I still have nightmares
February 18th, 2004, 05:34 AM
Must be the only one here (besides chief) without a terminal dislike for perl .
Anyway could you not use SOAP to bridge the language gap? Its a bit of a hack admitadly but it could work pretty well if somone wrote a module to make functions in a module/classes/variables accessable via another lang. Just an idea.
February 23rd, 2004, 08:51 AM
Actually, there are:
Not ancient experimental ones either, they are even in active development and up to 1.0-beta3 release.
>>> import CLR
>>> from CLR.System.Windows.Forms import MessageBox
>>> MessageBox.Show("Hi There %s" % ("Fred"))
Pythons xmlrpclib and C#s www.xml-rpc.net