chore: initial commit

This commit is contained in:
2026-07-05 15:40:35 +02:00
commit aee4d0aa15
12 changed files with 940 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
# Interactive Python REPL startup. Wired via $PYTHONSTARTUP (see home.nix).
# Persists REPL history to $PYTHON_HISTFILE (XDG cache), creating the dir.
from pathlib import Path
import os
import atexit
import readline
history = os.getenv('PYTHON_HISTFILE')
if history:
try:
Path(history).parent.mkdir(parents=True, exist_ok=True)
readline.read_history_file(history)
except OSError:
pass
def write_history():
try:
readline.write_history_file(history)
except OSError:
pass
atexit.register(write_history)