Commit 5786dab3 authored by Mark Tearle's avatar Mark Tearle
Browse files

Basic Date updating

parent d67bac06
#!/usr/bin/env python
import npyscreen
from datetime import datetime
class VirtualSnack(npyscreen.FormMutt):
MAIN_WIDGET_CLASS = npyscreen.MultiLineEdit
class VirtualSnack(npyscreen.Form):
class VirtualSnackApp(npyscreen.NPSApp):
def main(self):
F = VirtualSnack()
F.wStatus1.value = "Virtual Snack"
F.wStatus2.value = "Last Command"
def while_waiting(self):
self.date_widget.value =
def create(self, *args, **keywords):
super(VirtualSnack, self).create(*args, **keywords)
self.wStatus1 = self.add(npyscreen.FixedText, value="Last Command", editable=False)
self.wStatus2 = self.add(npyscreen.FixedText, value="", editable=False)
self.wStatus1.important = True
self.date_widget = self.add(npyscreen.FixedText,, editable=False)
self.date_widget.value = "Hello"
class VirtualSnackApp(npyscreen.NPSAppManaged):
keypress_timeout_default = 2
def onStart(self):
self.addForm("MAIN", VirtualSnack, name="Virtual Snack")
if __name__ == "__main__":
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment