discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problems with the examples


From: Johnathan Corgan
Subject: Re: [Discuss-gnuradio] Problems with the examples
Date: Mon, 11 Feb 2008 10:16:47 -0800

On 2/11/08, Jose Emilio Gervilla Rega <address@hidden> wrote:

>  if __name__ == '__main__':
>        try:
>            my_top_block().run()
>        except KeyboardInterrupt:
>            pass
>
>  I think that it is ok and with these lines the program should stop by
> pushing ENTER but it doesn't.

In Python, a KeyboardInterrupt is caused by Ctrl-C, not by hitting any
key.  The above code snippet is acting as it should.

If you want the flowgraph to end with an Enter key:

if __name__ == '__main__':
    tb.start()
    raw_input("Press Enter to stop.")
    tb.stop()
    tb.wait()

-- 
Johnathan Corgan
Corgan Enterprises LLC
http://corganenterprises.com/




reply via email to

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