get script shebang


Keywords
shebang, python
License
Unlicense
Install
pip install shebang==2020.12.3

Documentation

Installation

$ [sudo] pip install shebang

Examples

>>> import shebang

>>> shebang.get("path/to/file.py")
'/usr/bin/env python'

>>> shebang.get("path/to/file.txt")
None

>>> shebang.get("/bin/ls")
None
$ python -m shebang file.py
/usr/bin/env python

readme42.com