(options, args) = parser.parse_args(["-n42"]) print(options.num). will print 42 . If you don't specify a type, optparse assumes string .
確定! 回上一頁