mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #3526 from pypeclub/feature/interactive_console_cli
General: Interactive console in cli
This commit is contained in:
commit
784ee7d7b7
3 changed files with 22 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"""Package for handling pype command line arguments."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
import code
|
||||
import click
|
||||
|
||||
# import sys
|
||||
|
|
@ -424,3 +424,22 @@ def pack_project(project, dirpath):
|
|||
def unpack_project(zipfile, root):
|
||||
"""Create a package of project with all files and database dump."""
|
||||
PypeCommands().unpack_project(zipfile, root)
|
||||
|
||||
|
||||
@main.command()
|
||||
def interactive():
|
||||
"""Interative (Python like) console.
|
||||
|
||||
Helpfull command not only for development to directly work with python
|
||||
interpreter.
|
||||
|
||||
Warning:
|
||||
Executable 'openpype_gui' on windows won't work.
|
||||
"""
|
||||
|
||||
from openpype.version import __version__
|
||||
|
||||
banner = "OpenPype {}\nPython {} on {}".format(
|
||||
__version__, sys.version, sys.platform
|
||||
)
|
||||
code.interact(banner)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import time
|
|||
|
||||
from openpype.lib import PypeLogger
|
||||
from openpype.api import get_app_environments_for_context
|
||||
from openpype.lib.plugin_tools import parse_json, get_batch_asset_task_info
|
||||
from openpype.lib.plugin_tools import get_batch_asset_task_info
|
||||
from openpype.lib.remote_publish import (
|
||||
get_webpublish_conn,
|
||||
start_webpublish_log,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ For more information [see here](admin_use.md#run-openpype).
|
|||
| publish | Pype takes JSON from provided path and use it to publish data in it. | [📑](#publish-arguments) |
|
||||
| extractenvironments | Extract environment variables for entered context to a json file. | [📑](#extractenvironments-arguments) |
|
||||
| run | Execute given python script within OpenPype environment. | [📑](#run-arguments) |
|
||||
| interactive | Start python like interactive console session. | |
|
||||
| projectmanager | Launch Project Manager UI | [📑](#projectmanager-arguments) |
|
||||
| settings | Open Settings UI | [📑](#settings-arguments) |
|
||||
| standalonepublisher | Open Standalone Publisher UI | [📑](#standalonepublisher-arguments) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue