Metadata-Version: 2.4
Name: pyditor
Version: 0.1.3
Summary: A minimalist Python runner for coding interviews
Home-page: https://github.com/sshu2017/pyditor
Author: sshu2017
Author-email: sshu2017 <sshu2017@yahoo.com>
License: MIT
Project-URL: Homepage, https://github.com/sshu2017/pyditor
Project-URL: Bug Reports, https://github.com/sshu2017/pyditor/issues
Project-URL: Source, https://github.com/sshu2017/pyditor
Keywords: python,editor,runner,coding,interview,tkinter
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# pyditor
## A minimalist Python runner

Pyditor is a lightweight, standalone Python code editor and runner built with Tkinter. It provides a simple interface for writing and executing Python code with syntax highlighting and real-time output display. Perfect for coding interviews, quick prototyping, and learning Python.

<p align="center">
    <img src="assets/screenshot.gif" width="50%" alt="Pyditor Demo">
</p>

## Features

- **Clean UI**: Minimalist interface with syntax highlighting for Python code
- **Instant Execution**: Run Python code with a single click
- **Real-time Output**: Displays stdout, stderr, and execution status
- **Syntax Highlighting**: Color-coded keywords, strings, comments, numbers, and built-in functions
- **Multi-monitor Support**: Automatically centers window on the active monitor (Linux/xrandr)
- **File Operations**: Save code snippets for later use
- **Timeout Protection**: Automatic timeout after 5 seconds to prevent infinite loops

## Installation

### Prerequisites
- Python 3.6 or higher
- Tkinter (usually included with Python)

 - Note: While Tkinter is part of Python's standard library, many Linux distributions separate GUI components like Tkinter into their own packages. Run this if Tkiniter is missing:
```bash
sudo apt update
sudo apt install python3-tk
```


### Setup

```bash
pip install pyditor
```

### Run
Run ```pyditor``` in termianl (MacOS and Linux) or in powershell (Windows).


## Keyboard Shortcuts

The application uses standard Tkinter text widget shortcuts:
- **Ctrl+A**: Select all
- **Ctrl+C**: Copy
- **Ctrl+V**: Paste
- **Ctrl+X**: Cut
- **Ctrl+Z**: Undo


## License

MIT License - see [LICENSE](LICENSE) for details

## Use Cases

- Coding interviews and technical assessments
- Quick Python prototyping and testing
- Learning Python syntax and features
- Code snippet testing without IDE overhead
- Teaching Python programming basics

## Contributing

This is a minimalist tool by design. If you find bugs or have suggestions, feel free to open an issue or submit a pull request.
