Metadata-Version: 2.4
Name: s_py_editor
Version: 0.1.2
Summary: A terminal-based Python editor with a sidebar, loop runner, and more.
License: MIT License
        
        Copyright (c) 2026 Siza
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: prompt_toolkit>=3.0
Requires-Dist: pygments>=2.0
Dynamic: license-file

# s-py-editor

A terminal-based Python code editor with syntax highlighting, auto-completion,
a file sidebar, and the ability to run code (selections, loops, or whole files)
without leaving the editor.

## Install

```bash
pipx install s-py-editor
```

Or with pip:

```bash
pip install s-py-editor
```

## Usage

```bash
spy                  # start with empty buffer
spy myfile.py        # open a file
spy .                # start in a directory (sidebar shows it)
```

## Key bindings

| Key | Action |
|-----|--------|
| `F5` / `Ctrl+R` | Run selection → enclosing loop → whole file |
| `Ctrl+S` | Save the buffer |
| `Ctrl+A` | Select all |
| `Ctrl+B` | Toggle sidebar focus |
| `Ctrl+E` | Toggle output popup |
| `Ctrl+X` | Stop running code |
| `Ctrl+Q` / `Ctrl+C` | Quit |

## Sidebar

When the sidebar is focused (`Ctrl+B`):

- `↑` / `↓` — move selection
- `→` / `←` — expand / collapse folders
- `Enter` — open file or toggle folder
- `Ctrl+R` — refresh directory listing
- `Tab` — focus the editor

## Requirements

- Python 3.9+
- `prompt_toolkit>=3.0`
- `pygments>=2.0`

## License

## License

## License

MIT — see [LICENSE](https://github.com/Sizasutfu/s-py-editor/blob/main/LICENSE) for details.
