22 lines
486 B
Python
22 lines
486 B
Python
# THIS IS EXAMPLE OF main.py
|
|
# EXAMPLE OF SCRIPT WHICH YOU WOULD RUN IN YOUR PROJECT
|
|
|
|
# ------------------------------
|
|
# INJECTION: USE IN YOUR PROJECT
|
|
# ------------------------------
|
|
import os
|
|
|
|
# Process Identification Number (PID in Unix(-like))
|
|
pid = os.getpid()
|
|
|
|
with open("pid.txt", "w") as f:
|
|
f.write(str(pid))
|
|
# ----------- END --------------
|
|
|
|
# Shit which running forever / stucked / ...
|
|
from time import sleep
|
|
|
|
while True:
|
|
print("I'm still running...")
|
|
sleep(0.1)
|