sys module - argv, but no argc ??

Tim Roberts timr at probo.com
Sun Aug 4 06:42:37 CEST 2002


"Gabe Newcomb" <Gabe.Newcomb at noetix.com> wrote:

>Yes indeed. I felt I needed to comment, however, since one of the
>respondents told the OP that len(sys.argv) returns the number of args
>passed, and that's not true if you consider args to be those things
>passed in addition to the calling script/process.

len(sys.argv) produces exactly the same value as argc would in a C program
called in exactly the same manner.  If you are not confused by argc, you
should not be confused by len(sys.argv).
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list