remove debug code
This commit is contained in:
parent
a9c7d53b06
commit
881892eb39
28
tmp.py
28
tmp.py
@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
# --------------------- DIAGNOSTICS: Prove temp file is created & readable ---------------------
|
|
||||||
print("\n--- TEMP FILE DIAGNOSTICS ---")
|
|
||||||
print(f"Current working directory: {os.getcwd()}")
|
|
||||||
print(f"Temp dir in use: {tempfile.tempdir}")
|
|
||||||
|
|
||||||
if os.path.exists(jcl_path): # jcl_path is the variable holding your temp file name/path
|
|
||||||
print(f"File exists: YES → {jcl_path}")
|
|
||||||
print(f"File size: {os.path.getsize(jcl_path)} bytes")
|
|
||||||
|
|
||||||
# Show basic permissions (octal, e.g. 0o644 = rw-r--r--)
|
|
||||||
st = os.stat(jcl_path)
|
|
||||||
print(f"Permissions (octal): {oct(st.st_mode & 0o777)}")
|
|
||||||
print(f"Owner UID: {st.st_uid} (your user should match os.getuid())")
|
|
||||||
|
|
||||||
# Try reading it back to prove readability
|
|
||||||
try:
|
|
||||||
with open(jcl_path, 'r') as f:
|
|
||||||
content = f.read()
|
|
||||||
print("File is readable! First 200 chars of content:")
|
|
||||||
print(repr(content[:200])) # repr() shows escapes/newlines clearly
|
|
||||||
print(f"... (total lines: {content.count('\n') + 1})")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Read failed: {e}")
|
|
||||||
else:
|
|
||||||
print("File exists: NO → something went wrong creating it")
|
|
||||||
print("--- END DIAGNOSTICS ---\n")
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user