sys module - argv, but no argc ??

James J. Besemer jb at
Fri Aug 2 09:00:56 CEST 2002

Tony C wrote:

> I've imported the sys module, and I'm SHOCKED that there is no way to
> access the argument count.
> The docs talk about accessing argv, but nothing about the argument
> count.

No need.  Use:

    len( sys.argv )


James J. Besemer  503-280-0838 voice  503-280-0375 fax
mailto:jb at

More information about the Python-list mailing list