Re: Function References

2008-08-28 Thread Diez B. Roggisch
> Zen's lesson for today: > THOU SHALT NOT MESS WITH ANY PYTHON'S SEMI-GODS, DEMI-GODS, AND > PYTHON'S GOD. > > You're lucky Diez still want to help you with your attitude like that. > May I remind you that we here helps you for free in our free time, be > rude, especially to a frequent member, an

Re: Function References

2008-08-28 Thread Lie
On Aug 1, 6:35 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > On Jul 31, 10:47 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> I take the freedom to do so as I see fit - this is usenet... > > > Fine, then keep beating a dead horse by replying to this thr

Re: Function References

2008-07-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: On Jul 31, 10:47 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: I take the freedom to do so as I see fit - this is usenet... Fine, then keep beating a dead horse by replying to this thread with things that do nobody any good. It seems like there are a lot better w

Re: Function References

2008-07-31 Thread Chris Mellon
On Thu, Jul 31, 2008 at 10:27 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 31, 10:47 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> I take the freedom to do so as I see fit - this is usenet... > > Fine, then keep beating a dead horse by replying to this thread with > things that

Re: Function References

2008-07-31 Thread Carsten Haese
[EMAIL PROTECTED] wrote: Greetings, I'm trying to wrap a function in a C library as a compiled C Python module. Everything is going great, but I've hit a snag. There's a function in the form of this: First the typedef: typedef void(*FPtr_DeviceMessageHandler) (const DeviceMessage, const char*);

Re: Function References

2008-07-31 Thread Matthew Woodcraft
>> Ctypes is a since python2.5 built-in module that allows to declare >> interfaces to C-libraries in pure python. You declare datatypes and >> function prototypes, load a DLL/SO and then happily work with it. No C, no >> compiler, no refcounts, no nothing. >> >> And you can pass python-functions a

Re: Function References

2008-07-31 Thread [EMAIL PROTECTED]
On Jul 31, 10:47 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > I take the freedom to do so as I see fit - this is usenet... Fine, then keep beating a dead horse by replying to this thread with things that do nobody any good. It seems like there are a lot better way to waste time, though. Th

Re: Function References

2008-07-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: >> How much more liberal can it get than MIT-licensed? > > Again, the licensing issue is everything to do with the original > library distributor, NOT ctypes. I read library distributor as "ctypes-library distributor" because it is 3rd-party under 2.4. Which was the reas

Re: Function References

2008-07-31 Thread [EMAIL PROTECTED]
> How much more liberal can it get than MIT-licensed? Again, the licensing issue is everything to do with the original library distributor, NOT ctypes. > But then, if you insist, go down the hard road. Irrelevant and unnecessary. If you don't want to help, don't please don't reply. -- http://mai

Re: Function References

2008-07-31 Thread Diez B. Roggisch
Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > >>> Ctypes is a since python2.5 built-in module that allows to declare >>> interfaces to C-libraries in pure python. You declare datatypes and >>> function prototypes, load a DLL/SO and then happily work with it. No C, >>> no compiler, no refco

Re: Function References

2008-07-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: >> Ctypes is a since python2.5 built-in module that allows to declare >> interfaces to C-libraries in pure python. You declare datatypes and >> function prototypes, load a DLL/SO and then happily work with it. No C, >> no compiler, no refcounts, no nothing. >> >> And you c

Re: Function References

2008-07-31 Thread [EMAIL PROTECTED]
> Ctypes is a since python2.5 built-in module that allows to declare > interfaces to C-libraries in pure python. You declare datatypes and > function prototypes, load a DLL/SO and then happily work with it. No C, no > compiler, no refcounts, no nothing. > > And you can pass python-functions as call

Re: Function References

2008-07-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello Diez. > >> May I suggest you move to ctypes for wrapping? It's easier, pure python >> and callbacks are already built-in. > > I'm pretty new to extending Python in C, I don't understand what > you're saying. Are there any examples or a brief explanation/URL you >

Re: Function References

2008-07-31 Thread [EMAIL PROTECTED]
Hello Diez. > May I suggest you move to ctypes for wrapping? It's easier, pure python and > callbacks are already built-in. I'm pretty new to extending Python in C, I don't understand what you're saying. Are there any examples or a brief explanation/URL you could point me to? -- http://mail.pyth

Re: Function References

2008-07-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Greetings, > > I'm trying to wrap a function in a C library as a compiled C Python > module. Everything is going great, but I've hit a snag. There's a > function in the form of this: > > First the typedef: > typedef void(*FPtr_DeviceMessageHandler) (const DeviceMessage

Function References

2008-07-31 Thread [EMAIL PROTECTED]
Greetings, I'm trying to wrap a function in a C library as a compiled C Python module. Everything is going great, but I've hit a snag. There's a function in the form of this: First the typedef: typedef void(*FPtr_DeviceMessageHandler) (const DeviceMessage, const char*); Then the actual function

Re: Putting function references in a Queue

2005-08-10 Thread Richard Townsend
On Tue, 09 Aug 2005 23:46:22 GMT, Bryan Olson wrote: > I think that's a good thing to do. The tricky part is getting an > event loop to wait on both the queue and other kinds of events. > Periodic polling works, but kind of sucks. > > What's the 'done' argument? A lock maybe? 'done' is just a bo

Re: Putting function references in a Queue

2005-08-09 Thread Bryan Olson
Richard Townsend wrote: > I've been experimenting putting a reference to a function into a Queue > object and was wondering what actually gets put in the Queue - is it the > function's code object? It's a Python-internal-reference-thingy. > If I read from the Queue in a different module, it a

Re: Putting function references in a Queue

2005-08-06 Thread Benjamin Niemann
Richard Townsend wrote: > I've been experimenting putting a reference to a function into a Queue > object and was wondering what actually gets put in the Queue - is it the > function's code object? No, it's justa referenceto the function object. > If I read from the Queue in a different module,

Re: Putting function references in a Queue

2005-08-06 Thread tiissa
Richard Townsend wrote: > I've been experimenting putting a reference to a function into a Queue > object and was wondering what actually gets put in the Queue - is it the > function's code object? It would simply be the entire function object (unless you choose it otherwise). > If I read from t

Putting function references in a Queue

2005-08-06 Thread Richard Townsend
I've been experimenting putting a reference to a function into a Queue object and was wondering what actually gets put in the Queue - is it the function's code object? If I read from the Queue in a different module, it appears that I don't need to import the module that defines the function - or a