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

See scitex.gen API Reference for the auto-generated Python API.