Re: Running Inline::Python in a CGI script

[email protected] (Chris Nighswonger)
Newsgroups perl.inline
Message-ID <CAP3yOon3LR8hQQcigwpDAHDDFcxvcQzpnkM1wdLAqA7R0mtNhA@mail.gmail.com>
On Tue, Mar 12, 2013 at 11:15 AM, Chris Nighswonger <
[email protected]> wrote:

> use Inline::Python qw( py_new_object );
>
> my $pykota_conf = py_new_object("config", "pykota.config", "PyKotaConfig",
> '/etc/pykota/');
>
> print "Admin mail for the AP400N: " . $pykota_conf->getAdminMail('AP400N')
> . "\n";
>
> And here's what it says when I execute it at the cli:
>
> root@biblios:/usr/share/webmin/pykota (0.02_pre_alpha *)#
> ./PyKotaConfig.cgi
> 'PyKotaConfig' is not a callable object at
> /usr/local/lib/perl/5.14.2/Inline/Python.pm line 317.
>
>
This call appears to work fine when executed in Python:

root@biblios:/usr/share/webmin/pykota (0.02_pre_alpha *)# python -c 'import
pykota.config; config = pykota.config.PyKotaConfig("/etc/pykota"); print
config.getAdminMail("AP400N");'
[email protected]
root@biblios:/usr/share/webmin/pykota (0.02_pre_alpha *)#

So is it a syntax problem in my py_new_object call or is it a bug in
Inline::Python?

Kind Regards,
Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.