File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 5454print ("MY_VAR (after unsetenv):" , os .getenv ("MY_VAR" ))
5555
5656# -------------------------------
57- # ⚙️ 4. SYSTEM COMMANDS
58- # -------------------------------
59- print ("\n --- System Commands ---" )
60- # Example: list files using OS command
61- os .system ("dir" if os .name == "nt" else "ls" )
62-
63- # -------------------------------
64- # 🧱 5. PROCESS INFORMATION
57+ # 🧱 4. PROCESS INFORMATION
6558# -------------------------------
6659print ("\n --- Process Info ---" )
6760print ("Process ID:" , os .getpid ())
6861print ("CPU Count:" , os .cpu_count ())
6962
7063# -------------------------------
71- # 🔐 6 . FILE ACCESS & PERMISSIONS
64+ # 🔐 5 . FILE ACCESS & PERMISSIONS
7265# -------------------------------
7366print ("\n --- File Access & Permissions ---" )
7467filename = "testfile.txt"
8174print ("Has Write Access:" , os .access (filename , os .W_OK ))
8275
8376# -------------------------------
84- # 🧩 7 . CLEANUP
77+ # 🧩 6 . CLEANUP
8578# -------------------------------
8679os .remove (filename )
8780print ("\n File Removed:" , filename )
You can’t perform that action at this time.
0 commit comments