in reply to Proper usage of Inline::Python

Try https://metacpan.org/pod/Inline::Python#The-Do-it-yourselfers-Guide-to-Inline::Python
my $client = Inline::Python::Object->new('__main__', 'Client');
Or something like this but correct :)
my $client = py_new_object( 'Client', 'hyperdex.client', 'Class', ... +);

Replies are listed 'Best First'.
Re^2: Proper usage of Inline::Python
by OverlordQ (Hermit) on Oct 12, 2014 at 09:59 UTC

    That's what I tried.

    py_eval('import hyperdex.client'); my $client = Inline::Python::Object->new('hyperdex.client','Client');
    Gives me:
    exceptions.TypeError: __cinit__() takes exactly 2 positional arguments (0 given) at line 1060
    Which makes it seem, oh, I'll just add the two parameters. However:
    py_eval('import hyperdex.client'); my $client = Inline::Python::Object->new('hyperdex.client','Client','1 +27.0.0.1',1982);
    Gives me the
    Can't bless non-reference value at /usr/local/lib/perl/5.14.2/Inline/Python.pm line 317.
    error again.