Hi Jorge,

please don't post pictures of code. These are much much worse to read for me than just source code in my email program, and they are completely impossible to read for people with impaired vision who rely on large text magnification or the help of structured text-to-voice.

Anyways:
I'm a bit confused by your state machine. Your code simply doesn't seem to make any sense to me!

1. When your state is 0, then you add 1 to the state
2. when your state is 1 (which it now is, you just added 1 to 0!), you add 1
3. when your state is 2 (which it now is, you just added 1 to 1!), you add 1, 
and call `exit`.

This feels like you're not really sure of how Python works (it's an imperative language! Checks and statements are executed in order). I'm afraid you'll have to do a bit more practice on that. Not something we can learn for you! As much as we'd like, we're focusing on GNU Radio on this mailing list, and can't really assist you in this endeavor as much. I don't know your background, but maybe https://www.learnpython.org/ is right for you :)

Also, *never* call `system.exit` from within any program! That one really surprised me. In the middle of demanding that GNU Radio do something with the data, you just kill the whole program!

Best regards,
Marcus

On 11.05.23 20:24, JORGE GONZALEZ ORELLANA via GNU Radio, the Free & Open-Source Toolkit for Software Radio wrote:
Hi all, I have been writing a python block that takes the content from a file and append a vector of 0s, so the output of the block is the file content plus a certain amount of 0s (the amount of 0s it a parameter) but I can't get an output from the block, in the workflow I connect the python block to a file sink block.
¿Does anyone know why I can't get any output?
I attach a screenshot of the entire code

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to