1import os
2
3for filename in os.listdir(directory):
4 if filename.endswith(".asm") or filename.endswith(".py"):
5 # print(os.path.join(directory, filename))
6 continue
7 else:
8 continue
1with open('topology_list.txt') as topo_file:
2 for line in topo_file:
3 print line, # The comma to suppress the extra new line char
1import os
2
3directory = os.fsencode(directory_in_str)
4
5for file in os.listdir(directory):
6 filename = os.fsdecode(file)
7 if filename.endswith(".asm") or filename.endswith(".py"):
8 # print(os.path.join(directory, filename))
9 continue
10 else:
11 continue
12