Gen Module (stx.gen)
General utilities for path management, shell commands, and system operations.
Note
Session management has moved to @stx.session (see Core Concepts).
The scitex.gen.start() / scitex.gen.close() pattern is deprecated.
Quick Reference
import scitex as stx
# Timestamped output directories
path = stx.gen.mk_spath("./results")
# → ./results/20260213_143022/
# Run shell commands
stx.gen.run("ls -la")
# Clipboard operations
stx.gen.copy("text to clipboard")
text = stx.gen.paste()
# String to valid path
stx.gen.title2path("My Experiment #1")
# → "my_experiment_1"
API Reference
scitex.gen — FAIL-LOUD deprecation shim (umbrella-only).
scitex.gen was the mngs-era kitchen-sink namespace. Its utilities have all
moved into focused standalone packages (scitex-math, scitex-linalg,
scitex-datetime, scitex-io, scitex-context, scitex-os, scitex-sh, scitex-str,
scitex-introspect, scitex-stats). The umbrella no longer re-exports the
standalone scitex_gen: every attribute access on scitex.gen now raises
a clear AttributeError naming the new home. Fail fast, fail loud, NO
fallback — so stale scitex.gen.<x> callsites surface immediately at the
exact line, instead of silently resolving to a soon-to-be-retired package.
This shim is intentionally umbrella-only. The standalone scitex_gen package
itself is untouched; only the scitex.gen umbrella surface fails loud.
Mechanism: this is a real on-disk module (not a _LazyModule proxy to
scitex_gen). Module-level __getattr__ (PEP 562) looks the requested
name up in _DEPRECATIONS and raises an AttributeError pointing at the
umbrella target. Unmapped names get a generic fail-loud deprecation error.