Closed GoogleCodeExporter closed 9 years ago
I was too rough in stripping out the code above, the function above does not
work.
This one should
def prompt_for_arg(arg, field, prompt):
if getattr(arg, field) is not None:
return False
try:
r = input(prompt)
if len(r) > 0:
setattr(arg, field, r)
return True
except:
pass
print("Aborted")
sys.exit()
Original comment by AndrewA...@gmail.com
on 5 Apr 2010 at 1:00
Closing as WontFix, mainly because I didn't see any additional community
requests for it. Feel free to open a new issue at bugs.python.org (argparse's
new home) if you know of others asking for similar behavior.
Original comment by steven.b...@gmail.com
on 23 Jul 2010 at 1:38
Original issue reported on code.google.com by
AndrewA...@gmail.com
on 5 Apr 2010 at 12:26