Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Python Programming/Extending with Perl

From Wikibooks, open books for an open world
<Python Programming
Previous: Extending with ctypesIndexNext: Extending with R


It is possible to call Perl functions and modules in Python. One way to do that is thePyPerl Module. It is not developed actively any more and for it to work in newer versions, one has to usethis version and apply the patches.

importperlperl.eval("use lib './' ")perl.require('Module::ModuleName')obj=perl.callm("new",'Module::ModuleName')obj['_attr1']=9obj['_attr2']=42obj.fxn1()

It is thus possible to handle Perl objects, change their attributes and calltheir methods.

See also

[edit |edit source]
Previous: Extending with ctypesIndexNext: Extending with R
Retrieved from "https://en.wikibooks.org/w/index.php?title=Python_Programming/Extending_with_Perl&oldid=3677810"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp