Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Chris Mellon <[EMAIL PROTECTED]> wrote: >On 2 May 2007 09:41:56 -0700, rh0dium <[EMAIL PROTECTED]> wrote: >> On May 2, 8:25 am, Gary Herron <[EMAIL PROTECTED]> wrote: >> > rh0dium wrote: . . . >T

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Steven D'Aprano
On Wed, 02 May 2007 07:22:07 -0700, rh0dium wrote: > Hi all, > > Below is a basic threading program. The basic I idea is that I have a > function which needs to be run using a queue of data. Early on I > specified my function needed to only accept basic parameters ( no > postional *args or *kwar

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Chris Mellon
On 2 May 2007 09:41:56 -0700, rh0dium <[EMAIL PROTECTED]> wrote: > On May 2, 8:25 am, Gary Herron <[EMAIL PROTECTED]> wrote: > > rh0dium wrote: > > >> This is far more work than you need. Push an (args, kwargs) tuple into > > >> your arguments queue and call self.function(*args, **kwargs). > > > >

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread rh0dium
On May 2, 8:25 am, Gary Herron <[EMAIL PROTECTED]> wrote: > rh0dium wrote: > >> This is far more work than you need. Push an (args, kwargs) tuple into > >> your arguments queue and call self.function(*args, **kwargs). > > > No see I tried that and that won't work. > > Won't work? How does it fail?

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread rh0dium
On May 2, 7:49 am, Bruno Desthuilliers wrote: > Yes - using inspect.getargspec. I don't have example code at hand yet, > but it's not really complicated. Viola!! Hey this works!! Now I have modified my code to do this - way cool (still kind of a mess though) args, varargs, varkw, d

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Chris Mellon
On 2 May 2007 08:13:12 -0700, rh0dium <[EMAIL PROTECTED]> wrote: > > This is far more work than you need. Push an (args, kwargs) tuple into > > your arguments queue and call self.function(*args, **kwargs). > > No see I tried that and that won't work. > > I'm assuming what you are referring to is th

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Gary Herron
rh0dium wrote: >> This is far more work than you need. Push an (args, kwargs) tuple into >> your arguments queue and call self.function(*args, **kwargs). >> > > No see I tried that and that won't work. > Won't work? How does it fail? > I'm assuming what you are referring to is this (effect

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread rh0dium
> This is far more work than you need. Push an (args, kwargs) tuple into > your arguments queue and call self.function(*args, **kwargs). No see I tried that and that won't work. I'm assuming what you are referring to is this (effectively) Q.put(((),{a:"foo", b:"bar})) input = Q.get() self.funct

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Chris Mellon
On 2 May 2007 07:22:07 -0700, rh0dium <[EMAIL PROTECTED]> wrote: > Hi all, > > Below is a basic threading program. The basic I idea is that I have a > function which needs to be run using a queue of data. Early on I > specified my function needed to only accept basic parameters ( no > postional *a

Re: Is it possible to determine what a function needs for parameters -

2007-05-02 Thread Bruno Desthuilliers
rh0dium a écrit : > Hi all, > > Below is a basic threading program. The basic I idea is that I have a > function which needs to be run using a queue of data. Early on I > specified my function needed to only accept basic parameters ( no > postional *args or *kwargs ) but now I am re-writing it an

Is it possible to determine what a function needs for parameters -

2007-05-02 Thread rh0dium
Hi all, Below is a basic threading program. The basic I idea is that I have a function which needs to be run using a queue of data. Early on I specified my function needed to only accept basic parameters ( no postional *args or *kwargs ) but now I am re-writing it and I want to accept these. Is