Python::Object is a Perl module that encapsulate Python objects.
SYNOPSIS
my $dict = Python::dict(foo => 42);
# attribute access
print $dict->foo, "n"; # get
$dict->bar(84);
# boolean context
if ($dict) {
# ...
}
# automatic stringify
print $dict
Instances of the Python::Object class encapulate objects within the python interpreter. All builtin python datatypes as well as user defined classes, instances, extention types, and functions are python objects.
Various functions in the Python:: namespace provide means for creation and maniplation of Python::Object instances. See Python for details.
The Python::Object class provide AUTOLOAD and overload features that make it convenient to use python objects as if they where native perl objects. A python sequence object (like a list or a tuple) can basically be treated as if it was a perl array. A python mapping object can be treaded as a hash, and callable objects can be called directly as if they where perl code references. Python objects also turn into strings if used in string context or into a reasonable test in boolean context.
Product's homepage
Requirements:
· Perl