Skip to content

Commit 2fdaac8

Browse files
committed
updated os module commit
1 parent d476f69 commit 2fdaac8

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

os_py/os_module.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,14 @@
5454
print("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
# -------------------------------
6659
print("\n--- Process Info ---")
6760
print("Process ID:", os.getpid())
6861
print("CPU Count:", os.cpu_count())
6962

7063
# -------------------------------
71-
# 🔐 6. FILE ACCESS & PERMISSIONS
64+
# 🔐 5. FILE ACCESS & PERMISSIONS
7265
# -------------------------------
7366
print("\n--- File Access & Permissions ---")
7467
filename = "testfile.txt"
@@ -81,7 +74,7 @@
8174
print("Has Write Access:", os.access(filename, os.W_OK))
8275

8376
# -------------------------------
84-
# 🧩 7. CLEANUP
77+
# 🧩 6. CLEANUP
8578
# -------------------------------
8679
os.remove(filename)
8780
print("\nFile Removed:", filename)

0 commit comments

Comments
 (0)