473,399 Members | 3,401 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,399 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 1930
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.