我在代码中有一个问题,类中的函数中有一个函数,我找不到运行第二个函数的方法。
class startFunctionButton(npyscreen.ButtonPress):
def whenPressed(self):
IPScanForm.returnData ### Here should the function start
class IPScanForm(npyscreen.NPSApp):
ip=""
def main(self):
f = npyscreen.FormWithMenus(name="Main Menu")
IPselect = f.add(npyscreen.TitleText,name="IP Address: ")
convertButtn = f.add(startFunctionButton,name="Start Function")
def returnData(self): ### the second function
IPScanForm.ip = IPselect.value ### thats just a placeholder could be anything