List Info

Thread: Python pyperl




Python pyperl
user name
2006-03-31 06:01:40

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):
&nbsp; File "<stdin>&quot;, 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 :
>
&gt;anand&nbsp; d wrote:
&gt; > I am using Debian as OS and pyperl version 1.0.1
>;
>1.0.1 or 1.0.1c? You need 1.0.1c.
&gt;
> > 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&nbsp; -  Zope-perlzope.org
>http://mail.zope.org/mailman/listinfo/zope-perl



Middle5?PARTNER=3">Middle5?OAS_query=null&PARTNER=3" BORDER=0 VSPACE=0 HSPACE=0>
Python pyperl
user name
2006-03-31 18:27:47
anand  d schrieb:
>>>> perl.require("POSIX")
> 1
>>>> x=perl.call('import') # import is a
function in POSIX.pm
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> perl.PerlError: Undefined subroutine &main::import
called.

[fsworkstation pyperl-1.0.1c]$ perldoc POSIX  | grep
import
[fsworkstation 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-perlzope.org
http:
//mail.zope.org/mailman/listinfo/zope-perl
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )