Re: [Geany-Devel] Python question

2014-04-26 Thread Pavel Roschin
It should be in the current library (not sure correct term), like if it was C, you would call `dlopen(NULL, ...)`. I'm not familiar enough with ctypes to say exactly but if it had a function like `load_library()` I'd expect you would pass `None` where it expects a filename. Alternatively,

Re: [Geany-Devel] Python question

2014-04-26 Thread Lex Trotman
On 26 April 2014 17:50, Pavel Roschin ros...@scriptumplus.ru wrote: It should be in the current library (not sure correct term), like if it was C, you would call `dlopen(NULL, ...)`. I'm not familiar enough with ctypes to say exactly but if it had a function like `load_library()` I'd expect

Re: [Geany-Devel] Python question

2014-04-26 Thread Pavel Roschin
***VERY*** evil :-D It is :-D Is int the same size as pointer on your system? On windows in particular int can be 32 bit and pointer 64 bit. With both ways (int, long) I can't achieve result. Seems that this is not actual doc pointer or something. Without native binding can't imagine how to

Re: [Geany-Devel] Python question

2014-04-26 Thread Matthew Brush
On 14-04-26 12:50 AM, Pavel Roschin wrote: It should be in the current library (not sure correct term), like if it was C, you would call `dlopen(NULL, ...)`. I'm not familiar enough with ctypes to say exactly but if it had a function like `load_library()` I'd expect you would pass `None` where

Re: [Geany-Devel] Python question

2014-04-26 Thread Matthew Brush
On 14-04-26 12:50 AM, Pavel Roschin wrote: It should be in the current library (not sure correct term), like if it was C, you would call `dlopen(NULL, ...)`. I'm not familiar enough with ctypes to say exactly but if it had a function like `load_library()` I'd expect you would pass `None` where

Re: [Geany-Devel] Python question

2014-04-26 Thread Pavel Roschin
Is it possible that `GPointer` is a `PyCapsule` (or `PyCObject`) and not an actual `void*` pointing directly to a `GeanyDocument*`? I'm not advanced pyhton user so I assume that it is (e.g. pygkt creates this wrap). But I took an example from here:

Re: [Geany-Devel] Python question

2014-04-26 Thread Pavel Roschin
Another (untested) hack that might work: def geanypy_path(): import geany, os path = os.path.dirname( os.path.dirname(os.path.dirname(geany.__file__))) return os.path.join(path, geanypy.so) Cheers, Matthew Brush It works good too, but as I mentioned above,

Re: [Geany-Devel] Any votes for a Project-Tree plugin?

2014-04-26 Thread Martin Andrews
Thanks for pushing the newer version. Actually, I've got a fair distance into rolling my own thing as a Python geany plugin in the meantime. Unfortunately (for me) the majority of the week was spent battling with drag-and-drop functions for my specific tree thing. Grrr. On the plus side, it's

Re: [Geany-Devel] Python question

2014-04-26 Thread Lex Trotman
On 27 April 2014 03:43, Pavel Roschin ros...@scriptumplus.ru wrote: Another (untested) hack that might work: def geanypy_path(): import geany, os path = os.path.dirname( os.path.dirname(os.path.dirname(geany.__file__))) return os.path.join(path, geanypy.so)