On Jan 7, 2008 3:25 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
Btw, I would like to work on the Python integration but still no idea how. If anyone has any experiences with that or know a good resource of documentation, feel free to post it(in a new thread please).
First let me qualify this by saying I know absolutely nothing about Python, but...
It looks like there is some basic documentation here:
http://docs.python.org/ext/ext.html
It might also be interesting to cram the Geany headers into SWIG, and see what comes out the other end:
I downloaded this "lunatic" thing, and it looks *very* cool, but the concept of loading an interpreter inside another intreperter inside a plugin inside an application might take me a little time to digest:
http://labix.org/lunatic-python
Good Luck!
- Jeff
On Mon, 7 Jan 2008 19:10:23 -0600, "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
It looks like there is some basic documentation here:
http://docs.python.org/ext/ext.html
It might also be interesting to cram the Geany headers into SWIG, and see what comes out the other end:
I played with SWIG but never came to anything useful. Unfortunately for some reason I deleted all my test things and so I can't really say what I had tried and how. Shame on me.
I downloaded this "lunatic" thing, and it looks *very* cool, but the concept of loading an interpreter inside another intreperter inside a plugin inside an application might take me a little time to digest:
Huh, C -> Python -> Lua? I guess there are better ways to waste CPU time ;-). Maybe "cat /dev/urandom | bzip2 >/dev/null".
Regards, Enrico
On Jan 9, 2008 7:56 AM, Enrico Tröger enrico.troeger@uvena.de wrote:
Huh, C -> Python -> Lua? I guess there are better ways to waste CPU time ;-). Maybe "cat /dev/urandom | bzip2 >/dev/null".
I'm not so sure it would be that much of a problem, most scripts probably won't be doing a lot of lengthy CPU-intensive operations anyway, especially when compared to all the refreshing/repainting/signal-handling work that a GUI application is doing anyway.
The advantage is that the interface is already defined and documented.
Starting from scratch with a Python plugin, I guess you would have three options:
* Generate a "raw" binding to the plugin API, exposing all the messy details to script authors.
* Start from scratch with your own higher-level wrapper around the plugin API.
* Model the Python plugin after the Lua one, possibly some things might even be usable as-is, or with some modification. At least the documentation would probably only need some minor changes.
* Some combination of the above three routes.
- Jeff
On Wed, 9 Jan 2008 13:46:07 -0600, "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
On Jan 9, 2008 7:56 AM, Enrico Tröger enrico.troeger@uvena.de wrote:
Huh, C -> Python -> Lua? I guess there are better ways to waste CPU time ;-). Maybe "cat /dev/urandom | bzip2 >/dev/null".
I'm not so sure it would be that much of a problem, most scripts probably won't be doing a lot of lengthy CPU-intensive operations anyway, especially when compared to all the
Maybe, I should have mentioned to take the above not too serious. But for the first moment it sounds a bit strange to run an interpreter within another one.
The advantage is that the interface is already defined and documented.
I didn't read the Lunatic site not carefully enough. So, I thought you can run Lua only inside Python, but now I know it's two-way and so you can run Python inside Lua. Am I right that it's basically possible to use the Lua plugin to have a Python interface (using Lunatic)?
Regards, Enrico
On Jan 10, 2008 2:34 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
But for the first moment it sounds a bit strange to run an interpreter within another one.
Yes, I agree it does sound strange (hence the name "lunatic" :-)
Am I right that it's basically possible to use the Lua plugin to have a Python interface (using Lunatic)?
Well, you're right in one respect, that is what I was hoping for. But whether it is actually possible remains to be seen...
- Jeff
On Thu, 10 Jan 2008 15:57:49 -0600, "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
On Jan 10, 2008 2:34 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
But for the first moment it sounds a bit strange to run an interpreter within another one.
Yes, I agree it does sound strange (hence the name "lunatic" :-)
Am I right that it's basically possible to use the Lua plugin to have a Python interface (using Lunatic)?
Well, you're right in one respect, that is what I was hoping for. But whether it is actually possible remains to be seen...
So, if anyone has time and some delight for it, feel free to play with it (read: I won't do :D).
Regards, Enrico