Skip to content

Instantly share code, notes, and snippets.

@lepinkainen
Created February 11, 2014 17:18
Show Gist options
  • Save lepinkainen/8939453 to your computer and use it in GitHub Desktop.
Save lepinkainen/8939453 to your computer and use it in GitHub Desktop.
npyscreen while_waiting minimal example - doesn't work
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