4
@author: Gianluca Medici
6
import sys, time, os.path
7
#this parameter defines the directory in witch the log files will be placed
8
pathFile='tmp/' #Remember to set this parameter to your liking
12
if len(sys.argv)!=5 or sys.argv[1]!= '-p' or not sys.argv[2] or sys.argv[3]!= '-t' or not sys.argv[4]:
13
print 'USAGE %s -p <parameter> -t <text>' % sys.argv[0]
18
gmt=time.localtime(time.time())
19
fmt='%a, %d %b %Y %H:%M:%S'
20
st=time.strftime(fmt, gmt)
23
logFile= open(os.path.join(pathFile,filename), 'a')
24
logFile.write("Last Update time: %s\n" % st)
29
print>>sys.stderr, "IOEXCEPTION writing file "+os.path.join(pathFile,filename)
33
'''Scripts starts here'''
b'\\ No newline at end of file'