On Tue, Mar 12, 2013 at 9:43 AM, Stefan Seifert <n...@detonation.org> wrote:

> # create a Python foo.Bar object and make it look like a Bar object in
> Perl:
> my $bar = py_new_object('Bar', 'foo', 'Bar', 'constructor arg 1');
> $bar->baz();
>

So here's my shot at this:

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.

Keep in mind all of my experience lies with Perl, and I have basically zero
experience with Python, so I may be misunderstanding how Python
packages/classes are referenced.

When I do py_study_package, PyKotaConfig clearly shows up as a class,
though.

Kind Regards,
Christopher

Reply via email to