On Sat, Jul 22, 2006 at 06:06:39PM +0200, Lars Gullik Bjønnes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > | For external use a python extension seems to be in orderi. This could > | be just a thin wrapper around the lfun interface. [This is closer to > | 'embedding LyX in Python'.] > | > | This _could_ also use a LyX instance that's connected over a server > | pipe, but would be much simpler to put everything of LyX - main() in > | a lib and link to this lib. > > How will this make anything easier?
Because it we do not have to create that 'liblyxkernel' that would be needed for a simple python extension. > I still need to have communication between two processes? I am bassically talking about simple linking and a simgle process. > Are you moving on to shared memory now? No. > | For internal use, this python + extension could be embedded in LyX. > | Even if this sounds a bit more complicated conceptionally, it is > | actually simpler to implement because the 'lyx kernel lib' is not > | needed. It'll boild down to (rough estimation) 200 lines of glue code + > | linking with libpython. > | > | Without extra work his means that python runs indeed in the same process > | as LyX. However, I don't see a big problem there. We already link to > | half a dozen external libs and python seems rather stable to me. More > | stable than LyX itself, actually. And there might be other benefits > | as > > But can we then easily take advantage over that stability? Or have we > just made everything harder since we know have external api's to > adhere to. About 20 different C-style function calls at max. Certainly less than the other dependencies we have right now. > | reduced starup times for the conversion scripts or such. > > Ok... then I have my nice little bibtool, written in python. How will > that commnunicate with LyX? Not at all? I have to start the tool from > inside LyX? This would be one possibility, but certainly not the nicest. LyX could (and should) still expose the server pipe to the outside world. This could even trasnfer python code snippets in the end. Andre'