CS2613/labs/L15/globex.py

23 lines
665 B
Python
Raw Normal View History

2022-11-02 10:02:15 -03:00
import glob
import os
# new_dir = os.path.expanduser("~/fcshome/cs2613/labs/test") # For lab machines
new_dir = os.path.abspath("C:\\Users\\Isaac\\Documents\\CS2613-Repo\\cs2613-ishoebot\\labs\\L14") # For local machine
python_files_for = []
for file in glob.glob("*.py"):
python_files_for.append(os.path.join(new_dir, file))
python_files_comp = [os.path.join(new_dir, file) for file in glob.glob("*.py")]
python_files_map = map(lambda file: os.path.join(new_dir, file), glob.glob("*.py"))
if __name__ == '__main__': # pragma: no cover
print(python_files_for)
print()
print(python_files_comp)
print()
print(list(python_files_map))