get script shebang
Project description
Installation
$ [sudo] pip install shebang
Functions
function | __doc__ |
---|---|
shebang.get(path) |
return script shebang |
shebang.shebang(path) |
return script shebang. deprecated |
CLI
usage | __doc__ |
---|---|
python -m shebang path |
print script 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shebang-2019.3.24.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for shebang-2019.3.24-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46215acf5a76efc7cca0f4dbf81ea45ff0126000e693beb4170191449c0e771f |
|
MD5 | 24084e3fe6b2bf13dfaf25fbb94b8d81 |
|
BLAKE2b-256 | de6ae978276dcc62edee28f03656d7927defa6e1c7c4913cbcda596b18bc0faf |