#!/usr/bin/env python2.6
# $Author$
# $Date$
# $HeadURL$
# $Revision$

import sys
import os

if len(sys.argv) != 2:
    print "Usage: ./attributes.py"
    exit(1)

fileIN = sys.argv[1]
fileOUT = sys.argv[2]

fileINObj = open(fileIN, r)

#EXISTS
if not os.path.exists(fileIN):
    print "%s does not exist!" % (fileIN)
    exit(1)
if os.path.exists(fileOUT):
    print "%s already exists!" % (fileOUT)
    exit(1)

#ORDINARY FILE
if not os.path.isfile(fileIN):
    print "%s is not an ordinary file!" % (fileIN)
    exit(1)

#READABLE
if not os.access(fileIN,os.R_OK):
    print "%s is not readable" % (fileIN)
    exit(1)


fileINObj.close()

exit(0)
