Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
brunneis authored May 27, 2021
1 parent 39ef4b1 commit 941554e
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
# python-package
Python Package Boilerplate
# safemode
Replace the Python process with a shell when starting up if a key is pressed during a grace period.

## Install
```bash
pip install safemode
```

## Usage
Just import the library in the first line of your Python script. The grace period can be configured through the `SAFEMODE_GRACE_PERIOD` environment variable. The default value is 5 seconds.

main.py
```python
import stopover
print('Hello World')
```
git clone https://github.com/brunneis/python-package
cd python-package
./rename.sh

Safe mode:
```sh
$ python main.py
[safemode] To start a shell, press any key before 5 seconds...
$
```

Normal execution:
```sh
$ python main.py
[safemode] To start a shell, press any key before 5 seconds...
[safemode] Starting up normally...
Hello World
```

0 comments on commit 941554e

Please sign in to comment.