Create a VERY BASIC main.py from example code in npyscreen (placeholder)
This commit is contained in:
parent
04d7388eb4
commit
5e30cf1fb7
|
@ -0,0 +1,24 @@
|
||||||
|
import npyscreen
|
||||||
|
|
||||||
|
|
||||||
|
# This application class serves as a wrapper for the initialization of curses
|
||||||
|
# and also manages the actual forms of the application
|
||||||
|
|
||||||
|
class MyTestApp(npyscreen.NPSAppManaged):
|
||||||
|
def onStart(self):
|
||||||
|
self.registerForm("MAIN", MainForm())
|
||||||
|
|
||||||
|
|
||||||
|
# This form class defines the display that will be presented to the user.
|
||||||
|
|
||||||
|
class MainForm(npyscreen.Form):
|
||||||
|
def create(self):
|
||||||
|
self.add(npyscreen.TitleText, name="Text:", value="Hellow World!")
|
||||||
|
|
||||||
|
def afterEditing(self):
|
||||||
|
self.parentApp.setNextForm(None)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
TA = MyTestApp()
|
||||||
|
TA.run()
|
Loading…
Reference in New Issue