detect which app the python interpreter is running in
Project description
detect-app
Detect which app the python interpreter is running in. Useful for cross app scripts
Supports:
Ansible
AutoCAD
Blender
Calibre
Cinema 4D
Clarisse
CryEngine
Flame
FreeCAD
Fusion
Gaffer
Gimp
Houdini
Inkscape
Katana
Krita
Mari
Marmoset
3ds Max
Maya
Modo
MotionBuilder
Natron
Nuke
RV
Revit
Shotgun
Scribus
Softimage
SubstanceDesigner
SubstancePainter
Unreal
Instructions
e.g. prints Blender
if run in Blender
import detect_app
app_info = detect_app.detect_app()
print(app_info.id) # e.g. substance_painter
right now app_info is very simple
- id:
str
a unique identifier for the app, lowercase, underscores, not start with nr - action:
callable
that returns true if run in the app. usually just attempts to import an app specific module - get_name():
method
to return a pretty name.
advanced
env variable
DETECT_APP_FORCE_ID
can be set to the app id, which will force a specific app to be detected. Useful for testing.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
detect-app-0.0.4.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file detect-app-0.0.4.tar.gz
.
File metadata
- Download URL: detect-app-0.0.4.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 098e44445a5f74e0451bb52ac4a1c143685ab4547c42d30decf7497914f87244 |
|
MD5 | d2947408473a9c1d0bbe16693e81f96a |
|
BLAKE2b-256 | 8355b122d1aee966e986294a5993b4fa4572d6dca04e9fa3d6030852db811e8c |
File details
Details for the file detect_app-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: detect_app-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a885c96fd8baa206604014dcaa7cb9c38eea9a421007b26c649cc1affb41c84b |
|
MD5 | 6fa5eb4ae17d1db4bd38cc2b9dea31d5 |
|
BLAKE2b-256 | 25597c5024fc4eb4ab9595a422b8e26164b87cc9fbe637710f4f5d903123d85a |