Coder Social home page Coder Social logo

hannesdelbeke / detect-app Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 1.0 39 KB

Detect which app the python interpreter is running in.⚙️Supports Ansible, AutoCAD, Blender, Calibre, Cinema 4D, Clarisse, Flame, Fusion, Gaffer,Gimp,Houdini, Inkscape, Katana, Krita, Mari, Marmoset, 3ds Max, Maya, Modo, MotionBuilder, Natron, Nuke RV, Revit, Shotgun, Scribus, Softimage, SubstanceDesigner, SubstancePainter, Unreal

Home Page: https://pypi.org/project/detect-app/

License: Apache License 2.0

Python 100.00%
app dcc pipeline blender fusion 3dsmax houdini krita marmoset maya motionbuilder nuke softimage substancedesigner substancepainter unreal inkscape

detect-app's Introduction

detect-app

PyPI Downloads

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.

detect-app's People

Contributors

hannesdelbeke avatar nebukadhezer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nebukadhezer

detect-app's Issues

detect headless mode

would be nice if app info contained if app ran in headless mode.
some apps can run in several modes. e.g. mayabatch, maya, mayapy, ...

blender, blender noUI (e.g. for rendering or executing scripts)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.