arguments from the prompt
effbot at telia.com
Tue Feb 8 09:20:14 CET 2000
<joe at localhost.localdomain> wrote:
> >> how do I write a python script to recive arguments from the
> >> command prompt?
> >you import the sys module, and read up on
> >sys.argv in the manual?
> it says NameError: sys
> from sys import argv
I told you to import the sys module; not import
just argv. change the first line to "import sys",
and don't forget that you need to explicitly con-
vert strings to numbers before you can do math
for more info on how import works, see:
More information about the Python-list