RE: Inline::Python but vice versa
[email protected] ("Konovalov, Vadim") Sat, 13 Dec 2014 13:39:36 +0000
| Newsgroups | perl.inline |
|---|---|
| Message-ID | <[email protected]> |
From: Stefan Seifert [mailto:[email protected]]=20 > On Saturday 13 December 2014 12:44:22 Konovalov, Vadim wrote: >=20 > > A hopefully simple question, > > Is it possible to use Perl from Python? > >=20 > > All I want to do - to script some editor with perl, whereas only=20 > > python scripting is available...=20 >=20 > You mean your editor is written in Perl and you want to > allow for your users to script it in Python and these > Python scripts should be able to call back into Perl to for > example call API methods? No,=20 There is existing editor (e.g. sublime or maybe KIG - KDE 2D-geometry) which is scripted by python already, but I want to use Perl from there. What I actually want - is a module inside vanilla python that allows me to = run Perl, ... I've read "Using-Perl-inside-Python-inside-Perl" but seems to me this isn't= exactly what helps me in this situation. Yet I already used Perl-inside-Python-inside-Perl :) The cool stuff possible with Inline::Python is that I can write fully funct= ional application with Qt, whereas Qt used via Python (perlQt are all stale= ) and I was able to do this way - use Inline Python =3D> <<'EOS'; ....... self.pushButton =3D QtGui.QPushButton("&Foo Button") ..... self.pushButton.clicked.connect(perl.qwerty); ...... EOS my $app =3D get_app(); my $w =3D init_some_window(); sub qwerty { $w->{pushButton}->setText('['.$w->{pushButton}->text().']'); } $app->exec_(); Really really really cool stuff :) Have a nice day, Vadim.