if os.access( sName, os.F_OK ) == False : print "That file name doesn't exist!" exit()
sStat = os.stat( sName )
mMode= sStat[ST_MODE] if S_ISDIR(mMode) : print "The path is a directory" elif S_ISREG(mMode) : print "The path is a file" else : print "I have no idea what the path is"