https://github.com/spenserblack/justexit.py
Call `exit` from your Python console without parentheses :tada:
https://github.com/spenserblack/justexit.py
joke python python-repl repl
Last synced: 9 months ago
JSON representation
Call `exit` from your Python console without parentheses :tada:
- Host: GitHub
- URL: https://github.com/spenserblack/justexit.py
- Owner: spenserblack
- License: unlicense
- Created: 2024-08-26T18:28:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-05T15:43:29.000Z (over 1 year ago)
- Last Synced: 2025-03-17T18:19:54.657Z (9 months ago)
- Topics: joke, python, python-repl, repl
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `justexit.py`
```python-console
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
```
Do you get this often? I get this about once a day. It's a habit from Shell and Ruby that I
just can't break. With this tool, you can call `exit` from your Python console and it will
*actually exit :tada:*
## Installation
First, download [`justexit.py`](justexit.py) somewhere. Then, wherever you define environment
variables (e.g. `.bashrc`), define the `PYTHONSTARTUP` variable to point to the path of
`justexit.py`. For example:
```bash
# .bashrc
export PYTHONSTARTUP="$HOME/justexit.py"
```
Then, next time you're in an interactive Python console, you can just type `exit` and it will
actually exit.
```python-console
>>> exit
```