Parse shebangs and return their components.
Project description
Parse shebangs so script-like files can be executed directly on Windows
On Windows, scripts are supposed to be registered with with their interpreters and placed into PATHEXT, but that information might not be available and the script still needs to be run. In that case, this module is useful, because it looks up the required information to run the script as best as possible.
Status
Travis CI (Ubuntu) |
AppVeyor (Windows) |
Coverage |
PyPI |
Licence |
---|---|---|---|---|
API Usage
shebang = parseshebang.parse(file_to_parse) subprocess.check_call(shebang + ["/my_script.py"])
file_to_parse may be either an open file object, which supports seeking, or a file name. A list containing the shebang components is returned.
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
File details
Details for the file parse-shebang-0.0.12.tar.gz
.
File metadata
- Download URL: parse-shebang-0.0.12.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb50c24ff3642ce6a1e29f697508dd86a3426369b9454c29b03e33f24aaf791f |
|
MD5 | a01eaea3ac2cdc0fb8c99f030161efed |
|
BLAKE2b-256 | 065e9467058d888e56a97021ddc9c469d1f184fc6ebdce2e943d527c0ee25ed3 |