def BIG(a,b):
if a > b:
return a
else:
return b
def WAITMSG():
return "\nPress any key to continue..."
x = int(raw_input("\nEnter two integers : "))
y = int(raw_input(""))
print "\nBiggest integer is ",BIG(x,y),WAITMSG()
import time
argv1 = "SAMPLE.TXT"
argv2 = "SAMPLE.BAK"
source_fptr = open("SAMPLE.TXT","r")
target_fptr = open("SAMPLE.BAK","w+")
if source_fptr == 0:
print "\nNo content/source file!!!"
print "\n press any key to continue..."
else:
print "\nCopying source file ",argv1," to target file ",argv2
print "\n please wait."
print "."
print "."
print "."
print "."
if target_fptr == 0:
print "\nNo content/target file!!!"
print "\n\n Press any key to continue..."
else:
while True:
ch = source_fptr.read(1)
if not ch:
break
target_fptr.write("%c"%(ch))
print "\n\nCopy completed, the target file contents"
print "\n----------------------------------------\n"
target_fptr.close()
target_fptr = open("SAMPLE.BAK","r")
ch = target_fptr.readlines()
for line in ch:
print line
source_fptr.close()
target_fptr.close()
print "\n\n press any key to continue..."