Hi All,

Following is a snippet of code from my application. The problem is that when
i pressed the 'f12' key function "PrintAllRecords" is executing continuously
like "PrintAllRecords" is being called in an infinite loop. The issue is
random. Anyone have any idea?

def OnKeyPress(self, key):
>
>         if self.lockKeys:
>             return
>
>         if key == 'esc':
>             self.Exit()  #reboot or shutdown
>
>         elif key == 'f12':
>             self.lockKeys = True
>             self.PrintAllRecords()
>             self.lockKeys = False
>
>
> def main(self):
>     self.init()
>     self.loop = urwid.MainLoop(self.view, palette,
> unhandled_input=self.OnKeyPress)
>
>
> if __name__ == "__main__":
>
>     GUI().main()
>

Regards,
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to