Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Opaque Python CLI Wrapper

Project description

Hotline is a pop-up input field written in Python with PyQt/PySide modeled after the command palette from Sublime Text. The API can be used to extend and customize Hotline by using the Context, Mode, and Command objects.

Available Contexts

  • Autodesk Maya

    • Rename - rename selected nodes using hotlines Renamer minilanguage

      • Pre_+ - adds a prefix
      • +_Suf - adds a suffix
      • -rem - removes a string
      • search replace - search for a string a replace it
      • full_name_## - full name replacement with a padded index
    • Select - select nodes using glob and regex patterns

    • Connect - connect attributes

    • Node - create DAG and DG nodes

    • Python - execute python commands

    • Mel - execute mel commands

  • Windows

    • Powershell - execute Powershell commands
    • CMD - execute Batch commands
    • Run - run
    • Python - execute python commands

Using Hotline

from hotline import Hotline
hl = Hotline()
hl.show()

Hotline will attempt to use the best available context. You can also specify one.

from hotline import Hotline, MayaContext
hl = Hotline(MayaContext)
hl.show()

Hotline in Autodesk Maya

To allow for maximum flexibility hotline doesn’t do anything sneaky like use singletons or a cache to maintain instances for you. In Maya this means you’ll need to keep track of an instance of the Hotline ui. Here’s how I’m doing that currently:

from hotline import Hotline
import __main__

if not hasattr(__main__, 'hl'):
    __main__.hl = Hotline()

__main__.hl.show()

Create a new runtime command with the above code and bind a hotkey to it.

Install Hotline

pip install hotline

To Do List

  • Adjust Context API to make it easier to extend existing contexts
  • Add additional dialogs to make multi-stage commands more rich
  • Create settings dialog that can be used to adjust context settings
  • Persist history and settings

completed

  • Implement input history

Project details


Release history Release notifications

This version
History Node

0.6.2

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.11

History Node

0.4.10

History Node

0.4.9

History Node

0.4.8

History Node

0.4.7

History Node

0.4.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
hotline-0.6.2-py2.py3-none-any.whl (34.4 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Dec 19, 2017
hotline-0.6.2.tar.gz (25.8 kB) Copy SHA256 hash SHA256 Source None Dec 19, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page