Python Terminal Emulator with Enhanced Developer Utilities
Project description
CMosSkillAV2 Terminal Emulator
A Python package that provides an enhanced terminal emulator with built-in file operations, Python execution, and developer utilities.
Features
- File Operations: Built-in commands for managing files and directories (cd, ls, mkdir, touch, rm, cat)
- Python Execution: Run Python scripts or execute Python code directly in the terminal
- Package Management: Manage Python packages with built-in pip integration
- Syntax Highlighting: Color-coded output for better readability
- Tab Completion: Command and path completion with Tab key
- Command History: Navigate through previously entered commands
Installation
pip install cmosskillav2
Usage
After installation, you can start the terminal emulator with:
cmosskillav2
Or you can run it as a module:
python -m cmosskillav2
Auto-Launch Features
CMosSkillAV2 offers two powerful auto-launch capabilities:
1. Auto-Import Launch
When imported in interactive Python sessions, the terminal automatically launches:
# In an interactive Python session
import cmosskillav2 # The terminal will automatically launch
You can disable this behavior by setting:
export CMOSSKILLAV2_AUTO_LAUNCH=0
2. Auto-Console Launch
After installation, CMosSkillAV2 automatically activates whenever you start a new Python console/REPL without having to explicitly import it. This makes it instantly available in any Python interactive session.
This works in:
- Standard Python REPL (
pythonwithout arguments) - Interactive Python sessions (
python -i script.py) - IPython and Jupyter environments
- Any Python environment with PYTHONINSPECT set
You can disable the auto-console feature by setting:
export CMOSSKILLAV2_AUTO_CONSOLE=0
Both auto-launch features are especially useful for enhancing Python REPL environments, IPython, and Jupyter notebooks with terminal capabilities.
How Auto-Console Works
The package uses Python's sitecustomize.py mechanism to detect when Python is started in an interactive mode. It intelligently examines the Python environment to determine if it's appropriate to launch the terminal, avoiding activation during package installation, testing, or when running scripts non-interactively.
Debugging Auto-Launch Features
You can enable debugging output for the auto-launch functionality by setting:
export CMOSSKILLAV2_DEBUG=1
This will display detailed information about the Python environment and the decision-making process for auto-launching the terminal.
Demo Script
The package includes a demo script that shows how the auto-launch features work:
# Download the demo script
curl -o demo_autolaunch.py https://raw.githubusercontent.com/cmosskillav2/cmosskillav2/main/demo_autolaunch.py
# Run the demo
python demo_autolaunch.py
# Test interactive mode
python -i demo_autolaunch.py
Available Commands
File Operations
cd [directory]- Change directoryls [directory]- List directory contentsmkdir [-p] directory- Create directorytouch file [file2 ...]- Create empty file(s)rm [-r] file_or_directory- Remove file(s) or directorycat file [file2 ...]- Display file contents
Python Execution
python script.py [args]- Execute Python script file>>> [python_code]- Execute Python code inlinepyshell- Start interactive Python shell
Package Management
pip install package- Install Python packagepip uninstall package- Uninstall Python packagepip list- List installed packagespip freeze- Output installed packages in requirements format
Shell Built-ins
help [command]- Display help for commandsexitorquit- Exit the shellclear- Clear the terminal screen
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cmosskillav2-0.2.2.tar.gz.
File metadata
- Download URL: cmosskillav2-0.2.2.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48b827fdce9613eb30bdea8d091c9c416b2de5622a9b020a96ddb1b957d5b0b3
|
|
| MD5 |
eae11578aa0857c99191411ab379a5d9
|
|
| BLAKE2b-256 |
7be6b68ef3fd522a44dce7ee4b2c5e2596a4c42be99caa3b0ce0f697b6e1b606
|
File details
Details for the file cmosskillav2-0.2.2-py3-none-any.whl.
File metadata
- Download URL: cmosskillav2-0.2.2-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db0aefdba27b39455fa2e90aacf3cc24693c032015854385c65308d6f63b261
|
|
| MD5 |
be52618623604f4acefcd78be5ba29ea
|
|
| BLAKE2b-256 |
b03a9b043867ab37b2379cf28e9944a71e446a0967beeda079f3956cd288cbee
|