discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Python function processing block


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Python function processing block
Date: Tue, 3 Oct 2006 13:36:00 -0700
User-agent: Mutt/1.5.9i

On Tue, Oct 03, 2006 at 09:19:19AM -0400, Marcus Leech wrote:
> Eric Blossom wrote:
> >
> >
> >This is all good info.
> >
> >You could build a few classes derived from gr_sync_block that would
> >use the same techniques.
> >
> >Eric
> >
> >  
> Looking at the qa_feval stuff, how does this conflict with Pythons 
> builtin "eval" function, which is used to
>  do a runtime evaluation of an expression?

It doesn't conflict at all.  It's just a class with a method called "eval".

> I'd like the end-user to be able to pass a simple codelet in on the 
> command line, and have it evaluated.

Shouldn't be a problem.  You'll want to wrap some something around the
user provided codelet to turn it into a function using either the
lambda syntax (if it's a single expression) or adding the def 
foo_9876567(a,b,c): ...
wrapper.  Then eval that.  At that point foo_9876567 is in the namespace
and can be called.  

If you need more than this hand-waving, let me know ;)

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]