discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Re: list comprehesnion in variable doesnt work


From: Josh Blum
Subject: Re: [Discuss-gnuradio] Re: list comprehesnion in variable doesnt work
Date: Sat, 30 May 2009 15:55:44 -0700
User-agent: Thunderbird 2.0.0.21 (X11/20090409)



the last point doesnt work. I dont know why.
If i insert the close() function manually it works. :-)
But not with grc.
I think there is a problem with the sequence grc set up the variables.


I bet it works very well actually.

variable1 = open(file)
variable2 = variable1.write(xxx)
variable3 = variable1.close()

GRC knows that variable2 and variable3 depend on variable1, but variable2 and variable3 are not dependent upon other, so their order does not matter.

In reality, this is a hack, and you are abusing what variables are and what they represent. What you would really want to see is:

variable1 = open(file)
variable1.write(xxx)
variable1.close()

So, take my advice from my previous email, and encapsulate this code in a custom grc block wrapper, and you will get exactly what you are looking for.

Auiafgkjsagfkagh
-Josh


However it doesnt work.





reply via email to

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