All pastes #53711 Raw Edit

Miscellany

public python v1 · immutable
#53711 ·published 2006-05-05 11:11 UTC
rendered paste body
#!/usr/bin/env pythonimport osdef recursive_list(init_path, file_list):	files = os.listdir(init_path)	for file in files:		new_path = os.path.join(init_path, file)        	if os.path.isdir(new_path) == True:			recursive_list(new_path, file_list)		else:			file_list.append(new_path)			if __name__ == "__main__":	file_list = []	recursive_list(".", file_list)	for file in file_list:		print file