[Wisp-cvs] wisp/users/dig tran.py,1.106,1.107
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-17 15:33:39
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv23966 Modified Files: tran.py Log Message: use long instead of string.atol Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- tran.py 17 May 2003 15:29:50 -0000 1.106 +++ tran.py 17 May 2003 15:33:36 -0000 1.107 @@ -12,7 +12,6 @@ from linkie import Linkie from shlex import shlex -import string def abstract (this, *arg, **narg): raise 'abstract method was called', (this, arg, narg) @@ -110,12 +109,12 @@ def get_token (this): tok = shlex.get_token(this) if tok == '': tok = None - elif tok[:2] == '#o': tok = Integer_Literal(string.atol(tok[2:], 8)) - elif tok[:2] == '#x': tok = Integer_Literal(string.atol(tok[2:], 16)) + elif tok[:2] == '#o': tok = Integer_Literal(long(tok[2:], 8)) + elif tok[:2] == '#x': tok = Integer_Literal(long(tok[2:], 16)) elif tok[:2] == '#/' and len(tok) == 3: tok = Integer_Literal(ord(tok[2])) else: - try: tok = Integer_Literal(string.atol(tok, 10)) + try: tok = Integer_Literal(long(tok, 10)) except: pass if tok == ';': return Semicolon else: return tok @@ -366,7 +365,7 @@ for opt, arg in opts: if opt in ('-v', '--verbose'): verbose = 1 if opt in ('-o', '--output'): output_name = arg - if opt in ('-b', '--base'): base = string.atol(arg, 16) + if opt in ('-b', '--base'): base = long(arg, 16) if opt in ('-f', '--format'): format = arg if output_name == None: output_name = default_output_names[format] if len(args) != 1: |