Update pagebot.py

This commit is contained in:
majmongoose
2026-08-29 14:27:03 -04:00
parent 1b0510af32
commit f9bd7f07ff
+12
View File
@@ -189,10 +189,22 @@ def kill_process_tree(pid):
except Exception as e:
print(f"Error killing process tree: {e}")
def clean_ttd_temp():
import glob
import tempfile
temp_dir = tempfile.gettempdir()
for entry in glob.glob(os.path.join(temp_dir, '_MEI*')):
try:
shutil.rmtree(entry)
print(f"Cleaned TTD temp: {entry}")
except Exception:
pass
def launch_and_watch(program_path):
global last_file_time
program_directory = os.path.dirname(program_path)
while True:
clean_ttd_temp()
last_file_time = time.time()
process = subprocess.Popen(program_path, cwd=program_directory)
while True: