-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_paths.py
More file actions
29 lines (26 loc) · 883 Bytes
/
debug_paths.py
File metadata and controls
29 lines (26 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
cwd = os.getcwd()
print(f"Current working directory: {cwd}")
print(f"\nListing {cwd}:")
try:
for item in os.listdir(cwd):
print(f" - {item}")
if item == 'data':
print(" (Data folder found!)")
try:
print(" Listing data folder:")
for subitem in os.listdir(os.path.join(cwd, item)):
print(f" - {subitem}")
except Exception as e:
print(f" Error listing data folder: {e}")
except Exception as e:
print(f"Error listing cwd: {e}")
print(f"\nChecking d:\\CODING\\Echelon\\data directly:")
try:
if os.path.exists("d:\\CODING\\Echelon\\data"):
print("Exists!")
print(os.listdir("d:\\CODING\\Echelon\\data"))
else:
print("Does not exist.")
except Exception as e:
print(f"Error checking absolute path: {e}")