Created
February 11, 2014 17:18
-
-
Save lepinkainen/8939453 to your computer and use it in GitHub Desktop.
npyscreen while_waiting minimal example - doesn't work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import npyscreen | |
from datetime import datetime | |
class DateForm(npyscreen.Form): | |
def while_waiting(self): | |
npyscreen.notify_wait("Update") | |
self.display() | |
def create(self): | |
self.add(npyscreen.FixedText, value=datetime.now(), editable=False) | |
class DateApp(npyscreen.NPSAppManaged): | |
keypress_timeout_default = 50 | |
def onStart(self): | |
self.addForm("MAIN", DateForm, name="Time") | |
if __name__ == '__main__': | |
app = DateApp() | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment