How Windows Handles Multiple cpu.py Files
Step 1 — Two Files Named cpu.py
cpu.py (copy 1)
cpu.py (copy 2)
Same name, but they can contain different code.
➜
Step 2 — You Run Both
python cpu.py
python cpu.py
Windows launches a new python.exe process for each run.
➜
Step 3 — Windows Assigns PIDs
python.exe → PID 4120
python.exe → PID 5876
PIDs keep the two running programs separate.
Windows does not track programs by file name — it tracks them by process.
MD5 Hash Verification
cpu.py (copy 1)
MD5 Hash:
af5840d3ae98a9dbda9dea2ecda285e9
Example Code:
print("CPU script #1 running")
while True:
pass
cpu.py (copy 2)
MD5 Hash:
c1b2f0a4d9e8e1f3a77c9b22f4d8a0c1
Example Code:
print("CPU script #2 running")
while True:
pass
Even though both files are named cpu.py, their MD5 hashes are different.
That means the files are not identical.
Windows will still run both at the same time:
• python.exe (PID 4120)
• python.exe (PID 5876)
MD5 hashes are like digital fingerprints — if two files have different hashes,
they are definitely different.