import osfobj = open('test', 'w')fobj.write('foo\n')fobj.write('bar\n')fobj.close()print os.listdir('c:\\')