sys module - argv, but no argc ??

James J. Besemer jb at cascade-sys.com
Fri Aug 2 03:00:56 EDT 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 )

--jb


--
James J. Besemer  503-280-0838 voice
http://cascade-sys.com  503-280-0375 fax
mailto:jb at cascade-sys.com






More information about the Python-list mailing list