> Traceback (most recent call last): > File "<stdin>", line 1, in ? > NameError: name 'octal' is not defined > > Since I am new to python, can any one help me to solve this error?
Looks like you just want the oct() function (not "octal()") >>> [x for x in dir(__builtins__) if x.lower().find("oct") != -1] ['oct'] The __builtins__ will tell you what functions python supports natively, and you can query against this list for patterns, as done above. -tkc -- http://mail.python.org/mailman/listinfo/python-list