Python: Importing a variable inside of a infinite loop
Posted
by
Jack
on Stack Overflow
See other posts from Stack Overflow
or by Jack
Published on 2010-12-29T16:30:56Z
Indexed on
2010/12/29
16:54 UTC
Read the original article
Hit count: 206
I have two modules, a host and a scanner. Both loop indefinitely to communicate with the serial ports. I want to import the variable "bestchannel" from scanner into host but by importing it, the while loop inside scanner runs first and loops forever. I want each module to run separately but be able to send each other data in real time. Is this possible?
(outside of scanning ram)
Example Code: http://pastebin.com/pxUBaima
I want minchannel from scanner to be accessible to host.
© Stack Overflow or respective owner