use
Test;
use
Data::Dumper;
BEGIN { plan
tests
=> 3 }
ok(py_eval(
"print('Hello from Python!')"
),
undef
);
py_eval(
<<'END');
class Foo:
def __init__(self):
print("Foo() created!")
def apple(self):
print("Doing an apple!")
def funky(a):
print(a)
END
ok(py_call_function(
"__main__"
,
"funky"
,{
neil
=>
'happy'
}),
undef
);
my
$o
= py_call_function(
"__main__"
,
"Foo"
);
ok(
$o
->apple,
undef
);
Dumper
$o
;
Dumper
$o
->apple;