Mon, 27 Nov 2000 13:01:25 -0500
On Monday 27 November 2000 12:22, you wrote:
> > test(sys.argv, sys.argv)
> > ./test.py Foo 3
> > my problem is when I'm using sys.argv to pass in a number it
> > converts to a string.
> No it doesn't, argv is a list of strings...
> > Is there a way around this using sys.argv or do I
> > have to use string.atoi(n) to convert it back to int?
> could be used, but you should wrap in try/except in
> case its not compatible and of course check that there
> are at least 2 arguments present!
> Alan G.
> Tutor maillist - Tutor@python.org
Thanks everyone.... Using the method Alan suggested saves me a step.
Should have tried that before submitting to the group...