Changeset 994cf4b in mainline
- Timestamp:
- 2005-12-07T00:35:47Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 253f8590
- Parents:
- beb39ee3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/config.py
rbeb39ee3 r994cf4b 80 80 81 81 def menu(self, text, choices, button, defopt=None): 82 return self.choice(text, [button] + choices) 82 menu = [] 83 for key, descr in choices: 84 txt = key + (45-len(key))*' ' + ': ' + descr 85 menu.append((key, txt)) 86 87 return self.choice(text, [button] + menu) 83 88 84 89 def choice(self, text, choices, defopt=None): … … 366 371 if os.path.exists(OUTPUT): 367 372 read_defaults(OUTPUT, defaults) 368 373 374 # Dry run only with defaults 369 375 varnames = parse_config(INPUT, TMPOUTPUT, DefaultDialog(dlg), defaults) 370 376 # If not in default mode, present selection of all possibilities … … 372 378 defopt = 0 373 379 while 1: 380 # varnames contains variable names that were in the 381 # last question set 374 382 choices = [ (x[1],defaults[x[0]]) for x in varnames ] 375 383 res = dlg.menu('Configuration',choices,('save','Save'),defopt) … … 382 390 defopt = i 383 391 break 392 # Ask the user a simple question, produce output 393 # as if the user answered all the other questions 394 # with default answer 384 395 varnames = parse_config(INPUT, TMPOUTPUT, dlg, defaults, 385 396 askonly=varnames[i][0])
Note:
See TracChangeset
for help on using the changeset viewer.