npcole / npyscreen

Automatically exported from code.google.com/p/npyscreen
Other
480 stars 109 forks source link

INPUT_GENERATOR example #81

Open drush858 opened 5 years ago

drush858 commented 5 years ago

Do have an example of using INPUT_GENERATOR? I've been using TEST_SETTINGS for most of my forms and its worked great. But on one of my forms, I'd like to stop and get a value from a field to populate another field and then continue on with more commands. I don't see how to load up the generator and iterate through it.

dmgolembiowski commented 5 years ago

It seems that 'INPUT_GENERATOR' is actually just a key of the TEST_SETTINGS dictionary, so if you assigned INPUT_GENERATOR['TEST_SETTINGS'] = lamda myGen: next(myGen) that might potentially help your case.