On Thu, 26 Jan 2006 06:39:20 GMT in comp.lang.python, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On 25 Jan 2006 12:42:20 -0800, "IamIan" <[EMAIL PROTECTED]> declaimed the >following in comp.lang.python: [...] >> I tried print repr(filename) and it returned the actual filename: >> 'n16w099.asc' , 'n17w062.asc' , etc. > > You may have problems with the longitude... those leading zeroes may >be taken as Octal notation... Shouldn't be a problem unless you make it one. Int defaults to decimal, unless you specify a base or tell it to infer the base from the number format by specifying a base of zero. >>> a = int("062") >>> a 62 >>> a = int("062",0) >>> a 50 Hard to interpret "099" as an octal number in any case: >>> a = int("099",0) Traceback (most recent call last): File "<pyshell#59>", line 1, in -toplevel- a = int("099",0) ValueError: invalid literal for int(): 099 >>> Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list