Parameter Passing - String Variable Truncated ?

goldtech goldtech at worldpost.com
Fri Aug 31 23:00:52 EDT 2007


snip...
> > --------------------------
>
> Try handle.write(repr(sys.argv[1:]) + "\n")
> and come back with your conclusions ... unless of course someone has
> spoonfed you in the meantime.
>
> Another clue: write yourself a little arg-dumper script and try
> running it in a Command Prompt window.
> 8<---
> import sys
> for x, arg in enumerate(sys.argv):
>     print x, repr(arg)
> 8<---
> HTH,
> John

It's a list.

...
['5', ':', 'Alaska.shp']
['6', ':', 'Arizona.shp']
['7', ':', 'Arkansas.shp']
['8', ':', 'California.shp']
['9', ':', 'Colorado.shp']
['10', ':', 'Connecticut.shp']
['11', ':', 'Delaware.shp']
['12', ':', 'District', 'of', 'Columbia.shp']
['13', ':', 'Florida.shp']
['14', ':', 'West', 'Virginia.shp']
['15', ':', 'Wisconsin.shp']
['16', ':', 'Wyoming.shp']

Thanks,
Lee G.




More information about the Python-list mailing list