From: Stefan Seifert [mailto:[email protected]]
> On Saturday 13 December 2014 12:44:22 Konovalov, Vadim wrote:
>
> > A hopefully simple question,
> > Is it possible to use Perl from Python?
> >
> > All I want to do - to script some editor with perl, whereas only
> > python scripting is available...
>
> 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,
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
functional application with Qt, whereas Qt used via Python (perlQt are all
stale) and I was able to do this way -
use Inline Python => <<'EOS';
.......
self.pushButton = QtGui.QPushButton("&Foo Button")
.....
self.pushButton.clicked.connect(perl.qwerty);
......
EOS
my $app = get_app();
my $w = init_some_window();
sub qwerty {
$w->{pushButton}->setText('['.$w->{pushButton}->text().']');
}
$app->exec_();
Really really really cool stuff :)
Have a nice day,
Vadim.