lock = 1 while lock == 1 : print lock main() lock=commands.getoutput('cat lock') print "Good bye!"