why this program shows ambiguous behavior ?? import os import stat import time #import types
file_name=raw_input("Enter file name : ") print file_name, "information" st=os.stat(file_name) print "mode", "=>", oct(stat.S_IMODE(st[stat.ST_MODE])) print "type","=>", if stat.S_ISDIR(st[stat.ST_MODE]): print "DIReCTORY" elif stat.S_ISREG(st[stat.ST_MODE]): print "REGULAR" elif stat.S_ISLINK(st[stat.ST_MODE]): print "LINK" print "file size", "=>",st[stat.ST_SIZE] print "inode number", "=>",st[stat.ST_INO] print "device inode resides on", "=>",st[stat.ST_DEV] print "number of links to this inode", "=>",st[stat.ST_NLINK] print "last accessed", "=>", time.ctime(st[stat.ST_ATIME]) print "last modified", "=>", time.ctime(st[stat.ST_MTIME]) print "inode changed", "=>", time.ctime(st[stat.ST_CTIME]) i ran this program in Winows XP SP2 in python 2.5. -- http://mail.python.org/mailman/listinfo/python-list