sys module - argv, but no argc ??
Kristian Ovaska
kristian.ovaska at helsinki.fi
Tue Aug 6 04:14:58 EDT 2002
Greg Ewing <see_reply_address at something.invalid>:
>I can imagine some people being surprised that Python,
>which generally takes a higher-level view of things,
>*does* mimic C so closely on this point.
I've got this in my Python template so I can't make mistakes with
argv. Also, args is a better name than argv.
def main(args):
pass
if __name__=='__main__':
import sys
main(sys.argv[1:])
--
Kristian Ovaska <kristian.ovaska at helsinki.fi>
More information about the Python-list
mailing list