Re: [Zope-Perl] call subroutine by pyperl

2010-03-31 Thread Tommy Ditlev Henriksen
I look at it some time ago, and had some problems with pointer errors.

I decided to use an JSON gw instead.

If any interrest Ill be happy to share!
 kr
 Tommy

On Wed, Mar 31, 2010 at 3:23 PM, DmitriKo  wrote:

> Hey, Kenny.
>
> I offer to stop wasting your time on that cool by marginal solution.
>
> Please use old good tools for inter program communication.
>
> $ perl test.pm | python test.py
>
> as example where output from test.pm come to sys.stdin in python test.py
>
> use json, xml, text ... with easy.
>
> --
> DmitriKo
>
> On Wed, Mar 31, 2010 at 4:01 PM, Kenny 
> wrote:
> > Dear all,
> >
> > I have a question about pyperl.
> >
> > there is a perl module test.pm:
> > #! /usr/bin/perl
> > package tset
> > sub Cal {
> > my ($v1,$v2)=...@_;
> > my $result=$v1+$v2;
> > }
> > print "this is a test \n";
> > 1;
> >
> > And there is a python file that calls the module above,
> > import perl
> > perl.require("test");
> > #perl.call("Usage","test1.pl")
> > #perl.call("test::Usage", "1")
> > b=perl.call("test::Cal", 1, 1)
> > print b
> >
> > when run, I got a error message shown below: (can anyone tell me the
> reason?
> > many thanks)
> > ##error message
> > ke...@kenny-laptop:~/Desktop$ python test.py
> > it is a test
> > 2
> > *** glibc detected *** python: free(): invalid pointer: 0xb7d7b1a0 ***
> > === Backtrace: =
> > /lib/tls/i686/cmov/libc.so.6[0xb7e02a85]
> > /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e064f0]
> > /usr/lib/python2.5/site-packages/perl2.so[0xb7cc772d]
> > python[0x80855a9]
> > python(PyDict_SetItem+0x6e)[0x8086f8e]
> > python(_PyModule_Clear+0x158)[0x8088bf8]
> > python(PyImport_Cleanup+0x152)[0x80de3d2]
> > python(Py_Finalize+0xbf)[0x80ea41f]
> > python(Py_Main+0x468)[0x8058d68]
> > python(main+0x22)[0x80587f2]
> > /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7dad450]
> > python[0x8058761]
> > === Memory map: 
> > 08048000-0814 r-xp  08:05 2613978/usr/bin/python2.5
> > 0814-08165000 rw-p 000f7000 08:05 2613978/usr/bin/python2.5
> > 08165000-08284000 rw-p 08165000 00:00 0  [heap]
> > b790-b7921000 rw-p b790 00:00 0
> > b7921000-b7a0 ---p b7921000 00:00 0
> > b7a44000-b7a4e000 r-xp  08:05 1409036/lib/libgcc_s.so.1
> > b7a4e000-b7a4f000 rw-p a000 08:05 1409036/lib/libgcc_s.so.1
> > b7a5b000-b7a68000 r-xp  08:05 3008570
> > /usr/local/lib/perl/5.8.8/auto/Python/Object/Object.so
> > b7a68000-b7a69000 rw-p c000 08:05 3008570
> > /usr/local/lib/perl/5.8.8/auto/Python/Object/Object.so
> > b7a69000-b7a8a000 rw-p b7a69000 00:00 0
> > b7a8a000-b7b6b000 r--p  08:05 2638705
> > /usr/lib/locale/en_US.utf8/LC_COLLATE
> > b7b6b000-b7b74000 r-xp  08:05 1426495
> > /lib/tls/i686/cmov/libcrypt-2.7.so
> > b7b74000-b7b76000 rw-p 8000 08:05 1426495
> > /lib/tls/i686/cmov/libcrypt-2.7.so
> > b7b76000-b7b9d000 rw-p b7b76000 00:00 0
> > b7b9d000-b7cb8000 r-xp  08:05 2613267
> /usr/lib/libperl.so.5.8.8
> > b7cb8000-b7cbd000 rw-p 0011a000 08:05 2613267
> /usr/lib/libperl.so.5.8.8
> > b7cbd000-b7cbf000 rw-p b7cbd000 00:00 0
> > b7cbf000-b7ccb000 r-xp  08:05 705539
> > /usr/lib/python2.5/site-packages/perl2.so
> > b7ccb000-b7ccc000 rw-p b000 08:05 705539
> > /usr/lib/python2.5/site-packages/perl2.so
> > b7ccc000-b7ccd000 r-xp  08:05 705537
> > /usr/lib/python2.5/site-packages/perl.so
> > b7ccd000-b7cce000 rw-p  08:05 705537
> > /usr/lib/python2.5/site-packages/perl.so
> > b7cce000-b7cd5000 r--s  08:05 2622378
> > /usr/lib/gconv/gconv-modules.cache
> > b7cd5000-b7d14000 r--p  08:05 2638706
> > /usr/lib/locale/en_US.utf8/LC_CTYPE
> > b7d14000-b7d97000 rw-p b7d14000 00:00 0
> > b7d97000-b7ee r-xp  08:05 1426493
> > /lib/tls/i686/cmov/libc-2.7.so
> > b7ee-b7ee1000 r--p 00149000 08:05 1426493
> > /lib/tls/i686/cmov/libc-2.7.so
> > b7ee1000-b7ee3000 rw-p 0014a000 08:05 1426493
> > /lib/tls/i686/cmov/libc-2.7.so
> > b7ee3000-b7ee6000 rw-p b7ee3000 00:00 0
> > b7ee6000-b7f09000 r-xp  08:05 1426497
> > /lib/tls/i686/cmov/libm-2.7.so
> > b7f09000-b7f0b000 rw-p 00023000 08:05 1426497
> > /lib/tls/i686/cmov/libm-2.7.so
> > b7f0b000-b7f0d000 r-xp  08:05 1426512
> > /lib/tls/i686/cmov/libutil-2.7.so
> > b7f0d000-b7f0f000 rw-p 1000 08:05 1426512
> > /lib/tls/i686/cmov/libutil-2.7.so
> > b7f0f000-b7f1 rw-p b7f0f000 00:00 0
> > b7f1-b7f12000 r-xp  08:05 1426496
> > /lib/tls/i686/cmov/libdl-2.7.so
> > b7f12000-b7f14000 rw-p 1000 08:05 1426496
> > /lib/tls/i686/cmov/libdl-2.7.so
> > b7f14000-b7f28000 r-xp  08:05 1426507
> > /lib/tls/i686/cmov/libpthread-2.7.so
> > b7f28000-b7f2a000 rw-p 00013000 08:05 1426507
> > /lib/tls/i686/cmov/libpthread-2.7.so
> > b7f2a000-b7f2c000 rw-p b7f2a000 00:00 0
> > b7f2d000-b7f2e000 rw-p b7f2d000 00:00 0
> > b7f2e000-b7f2f000 r--p  08:05 2638723
> > /usr/lib/locale/en_US.utf8/LC_NUMERIC
> > b7f2f0

Re: [Zope-Perl] call subroutine by pyperl

2010-03-31 Thread DmitriKo
Hey, Kenny.

I offer to stop wasting your time on that cool by marginal solution.

Please use old good tools for inter program communication.

$ perl test.pm | python test.py

as example where output from test.pm come to sys.stdin in python test.py

use json, xml, text ... with easy.

--
DmitriKo

On Wed, Mar 31, 2010 at 4:01 PM, Kenny  wrote:
> Dear all,
>
> I have a question about pyperl.
>
> there is a perl module test.pm:
> #! /usr/bin/perl
> package tset
> sub Cal {
> my ($v1,$v2)=...@_;
> my $result=$v1+$v2;
> }
> print "this is a test \n";
> 1;
>
> And there is a python file that calls the module above,
> import perl
> perl.require("test");
> #perl.call("Usage","test1.pl")
> #perl.call("test::Usage", "1")
> b=perl.call("test::Cal", 1, 1)
> print b
>
> when run, I got a error message shown below: (can anyone tell me the reason?
> many thanks)
> ##error message
> ke...@kenny-laptop:~/Desktop$ python test.py
> it is a test
> 2
> *** glibc detected *** python: free(): invalid pointer: 0xb7d7b1a0 ***
> === Backtrace: =
> /lib/tls/i686/cmov/libc.so.6[0xb7e02a85]
> /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e064f0]
> /usr/lib/python2.5/site-packages/perl2.so[0xb7cc772d]
> python[0x80855a9]
> python(PyDict_SetItem+0x6e)[0x8086f8e]
> python(_PyModule_Clear+0x158)[0x8088bf8]
> python(PyImport_Cleanup+0x152)[0x80de3d2]
> python(Py_Finalize+0xbf)[0x80ea41f]
> python(Py_Main+0x468)[0x8058d68]
> python(main+0x22)[0x80587f2]
> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7dad450]
> python[0x8058761]
> === Memory map: 
> 08048000-0814 r-xp  08:05 2613978    /usr/bin/python2.5
> 0814-08165000 rw-p 000f7000 08:05 2613978    /usr/bin/python2.5
> 08165000-08284000 rw-p 08165000 00:00 0  [heap]
> b790-b7921000 rw-p b790 00:00 0
> b7921000-b7a0 ---p b7921000 00:00 0
> b7a44000-b7a4e000 r-xp  08:05 1409036    /lib/libgcc_s.so.1
> b7a4e000-b7a4f000 rw-p a000 08:05 1409036    /lib/libgcc_s.so.1
> b7a5b000-b7a68000 r-xp  08:05 3008570
> /usr/local/lib/perl/5.8.8/auto/Python/Object/Object.so
> b7a68000-b7a69000 rw-p c000 08:05 3008570
> /usr/local/lib/perl/5.8.8/auto/Python/Object/Object.so
> b7a69000-b7a8a000 rw-p b7a69000 00:00 0
> b7a8a000-b7b6b000 r--p  08:05 2638705
> /usr/lib/locale/en_US.utf8/LC_COLLATE
> b7b6b000-b7b74000 r-xp  08:05 1426495
> /lib/tls/i686/cmov/libcrypt-2.7.so
> b7b74000-b7b76000 rw-p 8000 08:05 1426495
> /lib/tls/i686/cmov/libcrypt-2.7.so
> b7b76000-b7b9d000 rw-p b7b76000 00:00 0
> b7b9d000-b7cb8000 r-xp  08:05 2613267    /usr/lib/libperl.so.5.8.8
> b7cb8000-b7cbd000 rw-p 0011a000 08:05 2613267    /usr/lib/libperl.so.5.8.8
> b7cbd000-b7cbf000 rw-p b7cbd000 00:00 0
> b7cbf000-b7ccb000 r-xp  08:05 705539
> /usr/lib/python2.5/site-packages/perl2.so
> b7ccb000-b7ccc000 rw-p b000 08:05 705539
> /usr/lib/python2.5/site-packages/perl2.so
> b7ccc000-b7ccd000 r-xp  08:05 705537
> /usr/lib/python2.5/site-packages/perl.so
> b7ccd000-b7cce000 rw-p  08:05 705537
> /usr/lib/python2.5/site-packages/perl.so
> b7cce000-b7cd5000 r--s  08:05 2622378
> /usr/lib/gconv/gconv-modules.cache
> b7cd5000-b7d14000 r--p  08:05 2638706
> /usr/lib/locale/en_US.utf8/LC_CTYPE
> b7d14000-b7d97000 rw-p b7d14000 00:00 0
> b7d97000-b7ee r-xp  08:05 1426493
> /lib/tls/i686/cmov/libc-2.7.so
> b7ee-b7ee1000 r--p 00149000 08:05 1426493
> /lib/tls/i686/cmov/libc-2.7.so
> b7ee1000-b7ee3000 rw-p 0014a000 08:05 1426493
> /lib/tls/i686/cmov/libc-2.7.so
> b7ee3000-b7ee6000 rw-p b7ee3000 00:00 0
> b7ee6000-b7f09000 r-xp  08:05 1426497
> /lib/tls/i686/cmov/libm-2.7.so
> b7f09000-b7f0b000 rw-p 00023000 08:05 1426497
> /lib/tls/i686/cmov/libm-2.7.so
> b7f0b000-b7f0d000 r-xp  08:05 1426512
> /lib/tls/i686/cmov/libutil-2.7.so
> b7f0d000-b7f0f000 rw-p 1000 08:05 1426512
> /lib/tls/i686/cmov/libutil-2.7.so
> b7f0f000-b7f1 rw-p b7f0f000 00:00 0
> b7f1-b7f12000 r-xp  08:05 1426496
> /lib/tls/i686/cmov/libdl-2.7.so
> b7f12000-b7f14000 rw-p 1000 08:05 1426496
> /lib/tls/i686/cmov/libdl-2.7.so
> b7f14000-b7f28000 r-xp  08:05 1426507
> /lib/tls/i686/cmov/libpthread-2.7.so
> b7f28000-b7f2a000 rw-p 00013000 08:05 1426507
> /lib/tls/i686/cmov/libpthread-2.7.so
> b7f2a000-b7f2c000 rw-p b7f2a000 00:00 0
> b7f2d000-b7f2e000 rw-p b7f2d000 00:00 0
> b7f2e000-b7f2f000 r--p  08:05 2638723
> /usr/lib/locale/en_US.utf8/LC_NUMERIC
> b7f2f000-b7f3 r--p  08:05 2637982
> /usr/lib/locale/en_US.utf8/LC_TIME
> b7f3-b7f31000 r--p  08:05 2637983
> /usr/lib/locale/en_US.utf8/LC_MONETARY
> b7f31000-b7f32000 r--p  08:05 2646018
> /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
> b7f32000-b7f33000 r--p  08:05 2638724
> /usr/lib/locale/en_US.utf8/LC_PAPER
> b7f33000-b7f34000 r--p  08:05 2638722
> /usr/lib/locale/en_US.utf8/LC_NAME
> b7f34000-b

Re: [Zope-Perl] Pyperl, SunOS x86 5.10

2009-03-29 Thread Felix Schwarz

Tommy Ditlev Henriksen schrieb:

Thanks for the quick respons, unfortunatly I have some other constraints, so
cant level down in version.

Do you have any hints on where start on below my_perl error?


No unfortunately not too many. First of all pyperl consists of two big 
subsystems (include Python in Perl and the other way round) so you can 
probably focus only on one them.


Furthermore I noticed a few years ago that pyperl uses quite a lot of old, 
deprecated functions. I replaced some of them. Just as a general advice: 
Probably it would be good if you just use some kind of dvcs (hg, git, ...) so 
 that we can merge different trees easily.


fs




smime.p7s
Description: S/MIME Cryptographic Signature
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Pyperl, SunOS x86 5.10

2009-03-23 Thread Tommy Ditlev Henriksen
Dear Felix,

Thanks for the quick respons, unfortunatly I have some other constraints, so
cant level down in version.

Do you have any hints on where start on below my_perl error?

thanks in advance & kr

2009/3/23 Felix Schwarz 

> Tommy Ditlev Henriksen schrieb:
>
>> I sincerly hope someone here on this list is able to help me, I am
>> starting
>> to run out of hope, which is not a nice thing at all??
>>
>> Iam trying to install Pyperl on Solaris x86 5.10:
>> Active Perl , v5.10.0
>> Python2.5
>>
>
> Basically pyperl is unmaintained for several years now. I guess it does not
> work with a modern version of Perl (and Python). So if you really need it,
> either:
> a) Use a somewhat older operating system like RHEL 4 with Python 2.3 and
>   Perl 5.8 - that should work.
> b) Hack pyperl to make it compatible with the latest versions of
> Python/Perl.
>
> sorry for no being too helpful.
> fs
>
>
> ___
> Zope-perl maillist  -  Zope-perl@zope.org
> http://mail.zope.org/mailman/listinfo/zope-perl
>
>


-- 
Tommy Ditlev Henriksen
email: tommydit...@gmail.com
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Pyperl, SunOS x86 5.10

2009-03-23 Thread Felix Schwarz

Tommy Ditlev Henriksen schrieb:

I sincerly hope someone here on this list is able to help me, I am starting
to run out of hope, which is not a nice thing at all??

Iam trying to install Pyperl on Solaris x86 5.10:
Active Perl , v5.10.0
Python2.5


Basically pyperl is unmaintained for several years now. I guess it does not 
work with a modern version of Perl (and Python). So if you really need it, either:

a) Use a somewhat older operating system like RHEL 4 with Python 2.3 and
   Perl 5.8 - that should work.
b) Hack pyperl to make it compatible with the latest versions of Python/Perl.

sorry for no being too helpful.
fs



smime.p7s
Description: S/MIME Cryptographic Signature
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Installing pyperl on Mac OS X?

2007-01-19 Thread Daryl Spitzer

I don't know why I didn't see that.  It's working now.  Thank you very
much Felix.

--
Daryl


On 1/19/07, Felix Schwarz <[EMAIL PROTECTED]> wrote:

Daryl Spitzer schrieb:
> I installed pyperl-1.0.1 (apparently) without error, but `python
> test.py` fails: pdb tells me that "import perl" results in
> "ImportError: perl2.so not found".  I get the same message if I try
> "import perl" in the Python interpreter.  So I guess it didn't install
> properly.
>
> Does anyone have any troubleshooting suggestions?

This is expected if you don't use 1.0.1c but 1.0.1. See
http://wiki.python.org/moin/PyPerl for a download link.

fs


___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Installing pyperl on Mac OS X?

2007-01-19 Thread Felix Schwarz

Daryl Spitzer schrieb:

I installed pyperl-1.0.1 (apparently) without error, but `python
test.py` fails: pdb tells me that "import perl" results in
"ImportError: perl2.so not found".  I get the same message if I try
"import perl" in the Python interpreter.  So I guess it didn't install
properly.

Does anyone have any troubleshooting suggestions?


This is expected if you don't use 1.0.1c but 1.0.1. See 
http://wiki.python.org/moin/PyPerl for a download link.


fs
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: PyPerl MULTI_PERL Problem

2006-12-12 Thread Pedro Algarvio, aka, s0undt3ch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pedro Algarvio, aka, s0undt3ch wrote:
> > Both codes are available on net:
> > ISPMan- http://ispman.cvs.sourceforge.net/ispman/
> > ISPManCCP - http://ccp.ufsoft.org/browser
> >
> > That way you can look at how I'm using PyPerl, and also point me to some
> >  bad usage of if  ;)

P.S.:
PyPerl is initialized on:
  http://ccp.ufsoft.org/browser/trunk/ispmanccp/lib/app_globals.py
And used mostly on:
  http://ccp.ufsoft.org/browser/trunk/ispmanccp/lib/ispman_helpers.py

Anywhere you see *g.ispman* that's actually a ref to ISPMan's perl module.

- --
Pedro Algarvio
   __ ___  ___ ______ __
|   Y   .'  _|   _   .-.'  _|  |_   .-..-.
|.  |   |   _|   1___|  _  |   _|   _|__|  _  |   _|  _  |
|.  |   |__| |   |_|__| ||__|_|__| |___  |
|:  1   ||:  1   | |_|
|::.. . ||::.. . |  ufs [AT] ufsoft [DOT] org
`---'`---'ufs [AT] sapo [DOT] pt
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFfzgHniPxVTX2hA4RAl8MAJ9q/XA1V5ZQTw5WySs8AuuGvd8itQCfSdlZ
Toc316Qm6BRzGkWirczepNY=
=rLGU
-END PGP SIGNATURE-
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: Python pyperl

2006-04-02 Thread anand d

hi,
Thankz for the solution.We went through the example in /t and solved the problem.We no longer face problem while importing and using standard perl modules.However we r not able to import and use user-defined perl module. We use,

perl.require('User-defined.pm file')
perl.call('Userdefined::function','args')

However it gives an error of
perl.PerlError: Undefined subroutine &main::'function' called.


Could please tell where pyperl searches for the .pm file by default.i.e. in which directory should we copy our User-defined perl file so that pyperl finds  functions written in the .pm file


Anand
GNOWSYS TEAM










On Fri, 31 Mar 2006 Felix Schwarz wrote :
>
>anand  d schrieb:
>  perl.require("POSIX")
> > 1
>  x=perl.call('import') # import is a function in POSIX.pm
> > Traceback (most recent call last):
> >   File "", line 1, in ?
> > perl.PerlError: Undefined subroutine &main::import called.
>
>[EMAIL PROTECTED] pyperl-1.0.1c]$ perldoc POSIX  | grep import
>[EMAIL PROTECTED] pyperl-1.0.1c]$
>
>I don't see a POSIX::import function in perldoc. Please show us your
>Perl code you try to write. Is it something like:
>
>
>require POSIX;
>import POSIX;
>print clock(),"\n";
>
>
>This can be achieved by:
>import perl
>perl.require("POSIX")
>perl.eval('import POSIX; print clock(),"\n";')
>
>If you find bugs, please provide a testcase for it (see the 't'
>directory for examples).
>
>--
>Felix
>
>___
>Zope-perl maillist  -  Zope-perl@zope.org
>http://mail.zope.org/mailman/listinfo/zope-perl




___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: Python pyperl

2006-03-30 Thread anand d

hi,

Your pyperl 1.0.1c is working perfect ,Thankz

However we encountered a certain error which has abruptly stopped our Progress.

When a module is required ,
we use perl.require(module)
and the function in that module can be directly used with command
perl.call(function).

This was working fine for some time , when suddenly pyperl started giving error that it could not find the function even though the required module was loaded . 


>>> perl.require("POSIX")
1
>>> x=perl.call('import') # import is a function in POSIX.pm
Traceback (most recent call last):
  File "", line 1, in ?
perl.PerlError: Undefined subroutine &main::import called.



It seems it is not able to find the function and by default searches in "&main"

The error occured just after we restarted Zope.Before this, it was working fine.We guess it might have to do something with the path environment set for perl.
We were up all nite trying to figure out a soultion but in vain.
plz help us out.


Anand 
GNOWSYS TEAM

On Sun, 26 Mar 2006 Felix Schwarz wrote :
>
>anand  d wrote:
> > I am using Debian as OS and pyperl version 1.0.1
>
>1.0.1 or 1.0.1c? You need 1.0.1c.
>
> > On Fri, 24 Mar 2006 Felix Schwarz wrote :
>...full quote snipped...
>
>Please read http://learn.to/quote
>Thank you very much.
>
>--
>Felix
>
>___
>Zope-perl maillist  -  Zope-perl@zope.org
>http://mail.zope.org/mailman/listinfo/zope-perl




___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: Python pyperl

2006-03-25 Thread anand d

  
I am using Debian as OS and pyperl version 1.0.1

On Fri, 24 Mar 2006 Felix Schwarz wrote :


> > I am attempting to install pyperl and am having an issue where it
> > can't find perl2.so even though perl2.so is available in
> > /python/site-packages.
>
>Again: Which Un*x/Linux distribution are you using? What is the *exact*
>version number of your pyperl?
>
>The error is expected if you are using an old version of pyperl!
>
>Nevertheless I put some patches together. The tar.gz is not an
>official release.
>
>See http://www.felix-schwarz.name/files/opensource/pyperl/
>
>--
>Felix
>
>___
>Zope-perl maillist  -  Zope-perl@zope.org
>http://mail.zope.org/mailman/listinfo/zope-perl




___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Error in pyperl

2006-03-24 Thread Felix Schwarz

anand  d wrote:
> I am attempting to install pyperl and I am having an issue where it
> can't find perl2.so even though the file is available in
> .../python/site-packages/

Which version of pyperl do you use on which operating system?
I published a new tar gz which should solve these problems...

-- 
Felix

___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] ?

2006-01-04 Thread Felix Schwarz
Hi Tim,

Tim Hoelscher wrote:
> Just as a follow-up to my post a few weeks ago: Felix
> Schwartz forwarded me his patched distro which he had gotten
> to compile with recent versions of Perl and Python. I was
> able to get this compiled with no problem and currently our
> testers are putting it through its paces to see if it is
> production-worthy. It is actually looking pretty good so
> far.

:-)

> While I don't have the bandwidth to actively maintain this
> code, I would be willing to try my hand at precompiling some
> binaries for major versions of Perl and Python.

Same here. If my patched version of pyperl passes your internal tests,
maybe I should release that version officially. After that, binary
versions seem to be a good idea.

-- 
Felix

___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


RE: [Zope-Perl] ?

2005-12-14 Thread Goddard Lee
> There actually are people on this list; I'm kind of
> surprised there isn't more activity, but such is life...

Perhaps things will pick up after the festivitie?

Cheers
Lee
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] ?

2005-12-14 Thread Tim Hoelscher
Hi Lee -

There actually are people on this list; I'm kind of
surprised there isn't more activity, but such is life...

Just as a follow-up to my post a few weeks ago: Felix
Schwartz forwarded me his patched distro which he had gotten
to compile with recent versions of Perl and Python. I was
able to get this compiled with no problem and currently our
testers are putting it through its paces to see if it is
production-worthy. It is actually looking pretty good so
far. As I mentioned before, my group has been re-organized
and integrated with a Perl-centric group with a large body
of Perl code. Making a case for Python means being able to
use that Perl code, and it looks like this could actually
happen.

While I don't have the bandwidth to actively maintain this
code, I would be willing to try my hand at precompiling some
binaries for major versions of Perl and Python. As I
understand it, the compilation problems were the major
hurdle to this code becoming more widely-used. Would there
be interest in this? Maybe maintaining an up-to-date
Solaris/Linux/Windows binary for the latest ActiveState
releases or something like that?

- Tim



|-+>
| |   Jeff Bachtel |
| |   <[EMAIL PROTECTED]|
| |   >|
| |   Sent by: |
| |   zope-perl-bounces|
| |   @zope.org|
| ||
| ||
| |   12/14/2005 10:15 |
| |   AM   |
|-+>
  
>--|
  | 
 |
  |   To:   zope-perl@zope.org  
 |
  |   cc:   
         |
  |   Subject:  Re: [Zope-Perl] ?   
 |
  
>--|




Noone here but us chickens.

On Wed, Dec 14, 2005 at 02:02:02PM +0100, Goddard Lee wrote:
> Is there anybody out there...?
>
> Lee Goddard
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl



___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] ?

2005-12-14 Thread Jeff Bachtel
Noone here but us chickens.

On Wed, Dec 14, 2005 at 02:02:02PM +0100, Goddard Lee wrote:
> Is there anybody out there...?
> 
> Lee Goddard
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: Possible PyPerl Patches?

2005-11-17 Thread Tim Hoelscher
Hi Felix -

Yes, I would very much appreciate anything you have. If I
make any progress getting things built and running I will
gladly share that information with the list. I would be very
pleased to see this in widespread use. Frankly, I am
surprised that interest in PyPerl has dried up at all. It
may be that my situation is more unique than I assumed, or
that others have found better ways of resolving
inter-language dependencies and interoperability.

In any case, thanks or the quick reply. I look forward to
receiving the updated code!

- Tim Hoelscher



|-+>
| |   Felix Schwarz|
| |   <[EMAIL PROTECTED]|
| |   b.de>|
| |   Sent by: |
| |   zope-perl-bounces|
| |   @zope.org|
| ||
| ||
| |   11/16/2005 04:04 |
| |   PM   |
|-+>
  
>--|
  | 
 |
  |   To:   zope-perl@zope.org  
 |
  |   cc:   
 |
  |   Subject:  [Zope-Perl] Re: Possible PyPerl Patches?
 |
  
>--|




Hi Tim,

Tim Hoelscher wrote:
> I ran across a post (on another list) from July in which
> Felix (Schwartz) mentions some patches to the PyPerl
distro
> to squash the perl2.so import bug that appears after
> compilation. I haven't been able to find this on
> http://wiki.python.org/moin/PyPerl; this is where I
> downloaded the original source and the latest version is
in
> fact the one I already have. Is there a patched version
> somewhere that I am missing?

I have a (more or less) working version here with some
additional
fixes I didn't published. Gisele Aas mailed me that he does
not have
the time to maintain pyperl actively...

If there is interest in pyperl I could package my fixes so
that it
will be easier to start with. As I'm busy with my masters
thesis,
this would take 2-3 days.

--
Felix

___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl



___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: Weird output in pyperl

2005-07-11 Thread Jeff Bachtel
On Mon, Jul 11, 2005 at 08:16:54PM +0100, Felix Schwarz wrote:
> Hi Jeff,
> 
> Jeff Bachtel wrote:
> > On Mon, Jul 11, 2005 at 07:24:29PM +0100, Felix Schwarz wrote:
> >>
> >> Where would you start looking given my bug description?
> 
> > I'd check for some error being returned by popen. I'd have callee
> > touch a file (inside Perl) to make sure evaluation was happening
> > properly. Given all of that, I'd start looking to see what file
> > descriptors were being given to child processes and piped, to see if
> > that was getting mangled.
> 
> Thanks for your comments. After some tests I found out, that...
> * perl.eval is being executed. "system('touch pyperl.felix.log');"
>   creates a new file as expected.
> * My problem has something to do with buffering. After eval'ing this
>   code
> print 'Perl\n';
> system('touch pyperl.felix.log');
>   the "Perl" string appeared in caller.py. I figured out that "$| = 1;"
>   before the Perl print has the same effect.
> 
> Therefore I think that pyperl should force the Perl interpreter to
> flush all buffers before returning to Python. And there is another
> bug: The order of the items is reversed.

Have you tried running pclose? My pipe-fu isn't great, but the unix
manpage indicates this can be used to close the stream, which might
(or might not) force the flushing of the associated buffered output.

The unix manpage for the popen libc call might give you further ideas
on things to try. I didn't deeply investigate how Perl was invoked by
pyperl, and whether the idea of forcing Perl into an unbuffered mode
is feasible.

> 
> I expected
>   Python
>   Perl
>   eval exit code: ...
> The first and the last one are printed by Python code the last one by
> Perl code. But the output is:
>   Perl
>   Python
>   eval exit code: ...
> 
> That means that all Python buffers should be flushed before entering
> the Perl eval, right?
> 
> Does anybody have any experience with Un*x popen and buffering? If I
> run callee.py separately the order of the items is okay. Only
> executing it with popen reveals the bug.

I don't believe this is a bug so much as an artifact of the way popen
and its buffering work. The difference between, in this case, being
that the behaviour is deterministic but painful to the user.

jeff

> 
> -- 
> Felix
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Re: Weird output in pyperl

2005-07-11 Thread Jeff Bachtel
On Mon, Jul 11, 2005 at 07:24:29PM +0100, Felix Schwarz wrote:
> Hi Jens,
> 
> Jeff Bachtel wrote:
> > I wish I could be more help... I don't have any FC boxes, and that
> > pyperl stuff is tricky enough that it takes me a ridiculous amount of
> > poking to debug it.
> 
> I don't think that "my" bug is FC specific. You already had some
> debugging sessions with pyperl: Where would you start looking given my
> bug description?

I'd check for some error being returned by popen. I'd have callee
touch a file (inside Perl) to make sure evaluation was happening
properly. Given all of that, I'd start looking to see what file
descriptors were being given to child processes and piped, to see if
that was getting mangled.

jeff

> 
> -- 
> Felix
> 
> ___
> Zope-perl maillist  -  Zope-perl@zope.org
> http://mail.zope.org/mailman/listinfo/zope-perl

-- 
Jeff Bachtel  ([EMAIL PROTECTED],TAMU)http://www.cepheid.org/~jeff
"For centuries, man had watched  [finger [EMAIL PROTECTED] for PGP key]
the clouds; now, they were watching him." -  S. Sachs
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] Weird output in pyperl

2005-07-10 Thread Felix Schwarz
Hi Dick,

Dick Madden wrote:
>Yes, this is a very quiet list. I managed to get pyperl running on
> Debian and gentoo ok. I left a note in Jan 2005 section of the list.

Yes, I saw your post when reading all old posts.

> You'll notice I gave up on building a threaded version.

As far as I can tell my Perl and Python version are threaded. As the
test suite doesn't pass I can't really say if everything is working.
Some very simple examples are okay though.

> Sounds like you got farther than I did for threaded.

I used Jeff's patch for FreeBSD (April 2005) because it was much
smaller than James' (I think James did reformat parts of the code
which increased patch size).

> Did you try using the ActiveState versions of python/perl? I didn't.

Neither did I. I used Fedora Perl 5.8.3 and Fedora Python 2.3.?.

-- 
Felix

___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


Re: [Zope-Perl] PATCH - FreeBSD, Perl 5.8.6

2005-04-20 Thread Jeff Bachtel
Replying to myself - I also improved the error reporting if the
perl.so/perl2.so dl hack is used - that was annoying to track down.

On Wed, Apr 20, 2005 at 06:43:32PM -0500, Jeff Bachtel wrote:
> I also define PERL_EXT  at one point to avoid a cxio error.
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl