473,289 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Inline::Python, pyperl, etc.

The group I work with is trying to be language agnostic between Python
and perl. We are trying to make it so that we are able to call our
various APIs from one language or the other without having to care* what
language the API was written in.

I've been looking into:

Inline::Python 0.22
http://search.cpan.org/~neilw/Inline....22/Python.pod

PyPerl 1.0.1
http://wiki.python.org/moin/PyPerl

The interest in these projects seems to have died off about 2001,
however. That, or they simply haven't needed to be updated for the last
few Python versions.

I've bumped into some snags with pyperl (can't import perl2.so? But
it's right there in site-packages/ !), and I'm wondering if it's bitrot
or a config error on my end.

Similarly, with Inline::Python I end up getting strings passed into my
python code when I expect integers (I posted about this on
in****@perl.org, but things seem pretty dead over there).

Is anyone actually using any of this stuff?

Thanks for any feedback,
Eli

[*] Obviously this is a golden ideal. We're willing to make compromises
to get things to work.
Aug 24 '05 #1
3 1925
Eli Stevens (WG.c) enlightened us with:
I've bumped into some snags with pyperl (can't import perl2.so? But
it's right there in site-packages/ !), and I'm wondering if it's bitrot
or a config error on my end.


If the .so file is as old as you described, it's probably linked to an
old version of python. Try recompiling it.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Aug 24 '05 #2
Sybren Stuvel wrote:
Eli Stevens (WG.c) enlightened us with:
I've bumped into some snags with pyperl (can't import perl2.so? But
it's right there in site-packages/ !), and I'm wondering if it's bitrot
or a config error on my end.

If the .so file is as old as you described, it's probably linked to an
old version of python. Try recompiling it.


The perl2.so is not old though; it was built as part of the pyperl
install I just did. Since the file ended up at (without needing any
prompting from me):

/usr/local/lib/python2.4/site-packages

I'm fairly confident that it's linked against python 2.4. But still:

$$$ ll /usr/local/lib/python2.4/site-packages
total 1968
drwxr-sr-x 2 root staff 4096 Aug 24 00:36 .
drwxr-sr-x 19 root staff 12288 Aug 20 00:42 ..
-rw-r--r-- 1 root staff 119 Aug 20 00:42 README
-rw-r--r-- 1 root staff 1672 Mar 6 2001 dbi.py
-rw-r--r-- 1 root staff 2248 Aug 24 00:36 dbi.pyc
-rw-r--r-- 1 root staff 8289 Mar 6 2001 dbi2.py
-rw-r--r-- 1 root staff 10292 Aug 24 00:36 dbi2.pyc
-rwxr-xr-x 1 root staff 40249 Aug 24 00:36 perl.so
-rwxr-xr-x 1 root staff 1895597 Aug 24 00:36 perl2.so
-rw-r--r-- 1 root staff 3566 Mar 6 2001 perlmod.py
-rw-r--r-- 1 root staff 4236 Aug 24 00:36 perlmod.pyc
-rw-r--r-- 1 root staff 1310 Mar 6 2001 perlpickle.py
-rw-r--r-- 1 root staff 1358 Aug 24 00:36 perlpickle.pyc

$$$ python
Python 2.4.1 (#1, Aug 20 2005, 00:41:20)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import perl Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: perl2.so not found import sys
for line in sys.path: print line ....

/home/elis/edit/external/pyperl-1.0.1
/usr/local/lib/python24.zip
/usr/local/lib/python2.4
/usr/local/lib/python2.4/plat-linux2
/usr/local/lib/python2.4/lib-tk
/usr/local/lib/python2.4/lib-dynload
/usr/local/lib/python2.4/site-packages


But again, I'm not so much interested in fixing this specific problem;
I'm wanting to know if anyone is actually using Inline::Python or PyPerl
in any real sense. If they are dead projects that will have to factor
into our decision to use them or something else.

Thanks for the input,
Eli
Aug 24 '05 #3

Eli Stevens (WG.c) wrote:
PyPerl 1.0.1
http://wiki.python.org/moin/PyPerl

The interest in these projects seems to have died off about 2001,
however. That, or they simply haven't needed to be updated for the last
few Python versions.

I've bumped into some snags with pyperl (can't import perl2.so? But
it's right there in site-packages/ !), and I'm wondering if it's bitrot
or a config error on my end.

Similarly, with Inline::Python I end up getting strings passed into my
python code when I expect integers (I posted about this on
in****@perl.org, but things seem pretty dead over there).

Is anyone actually using any of this stuff?


I made some patches to pyperl and the unit testing suite some months
ago. At least basic functionality is working again. Have a look at the
zope-perl mailing list.
I don't know if I announced a single source tar.gz on this mailing list
but if you have still some interest in this I can mail you the package.

fs
Sep 1 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
42
by: Fred Ma | last post by:
Hello, This is not a troll posting, and I've refrained from asking because I've seen similar threads get all nitter-nattery. But I really want to make a decision on how best to invest my time....
1
by: mg | last post by:
Hello, While trying to compile Python 2.5 from the nighlty CVS image, it raises the following errors on HP-UX. This disables me the use of HP-UX for some projects: Compilation flags: export...
2
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c...
23
by: Shane Hathaway | last post by:
Here's a heretical idea. I'd like a way to import modules at the point where I need the functionality, rather than remember to import ahead of time. This might eliminate a step in my coding...
19
by: Riko Wichmann | last post by:
hi everyone, I'm googeling since some time, but can't find an answer - maybe because the answer is 'No!'. Can I call a function in python inline, so that the python byte compiler does...
3
by: David Bear | last post by:
I have a hash function written by another organization that I need to use. It is implemented in perl. I've been attempting to decode what they are doing in their hash function and it is taking way...
26
by: brenocon | last post by:
Hi all -- Compared to the Python I know and love, Ruby isn't quite the same. However, it has at least one terrific feature: "blocks". Whereas in Python a "block" is just several lines of...
0
by: Chris | last post by:
I have an old application that has an embedded Perl interpreter exposing an API. However, all the code I have needs to use the API is in Python. What's the easiest way access my Python code from...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.