示例#1
0
def main():
    shell = Nubia(
        name="scdt",
        command_pkgs=commands,
        options=Options(persistent_history=False),
    )
    sys.exit(shell.run())
示例#2
0
文件: sq_cli.py 项目: skg-net/suzieq
def cli_main():
    '''Kicks off the CLI run'''

    plugin = NubiaSuzieqPlugin()
    shell = Nubia(name="suzieq", plugin=plugin,
                  options=Options(persistent_history=True),
                  command_pkgs=sqcmds)
    sys.exit(shell.run())
示例#3
0
def main():
    plugin = LegionPlugin()
    shell = Nubia(
        name="legions",
        command_pkgs=commands,
        plugin=plugin,
        options=Options(persistent_history=True),
    )
    sys.exit(shell.run())
示例#4
0
def start_nubia():
    plugin = NubiaExamplePlugin()
    shell = Nubia(
        name="motoman",
        command_pkgs=commands,
        plugin=plugin,
        options=Options(
            persistent_history=True, auto_execute_single_suggestions=True
        ),
    )
    sys.exit(shell.run())
示例#5
0
def main() -> Any:
    homepath = get_homepath()
    if not os.path.exists(homepath):
        os.mkdir(homepath)

    plugin = NubiaPassXYZPlugin()
    shell = Nubia(
        name="nubia_passxyz",
        command_pkgs=kpclibpy.commands,
        plugin=plugin,
        options=Options(persistent_history=False,
                        auto_execute_single_suggestions=False),
    )
    sys.exit(shell.run())
示例#6
0
#!/usr/bin/env python3

import sys, logging
from nubia import Nubia
from nubia_plugin import PyNbaPlugin


def _configure_logger():
    """
    Define the logging parameters
    """
    # Configure logging
    logger = logging.getLogger('pynba')
    logger.setLevel(logging.INFO)

    file_handler = logging.FileHandler('../pynba.log')
    formatter = logging.Formatter(
        '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    file_handler.setFormatter(formatter)

    logger.addHandler(file_handler)


# This is the entry point of the application.
# Sets the nubia plugin and starts the shell
if __name__ == "__main__":
    _configure_logger()
    plugin = PyNbaPlugin()
    shell = Nubia(name="py_nba", plugin=plugin)
    sys.exit(shell.run())
示例#7
0
import sys
from nubia import Nubia, Options

from tasks.scheduled import run_scheduled_tasks
from tasks.stratege import load, save

import commands

if __name__ == "__main__":
    shell = Nubia(
        name="mctrader",
        command_pkgs=commands,
    )
    load()
    run_scheduled_tasks()
    st = shell.run()
    save()
    sys.exit(st)
示例#8
0
def main():
    plugin = LogDevicePlugin()
    shell = Nubia(name="ldshell", plugin=plugin, command_pkgs=commands)
    sys.exit(shell.run())
示例#9
0
def cli_main():
    plugin = NubiaSuzieqPlugin()
    shell = Nubia(name="suzieq",
                  plugin=plugin,
                  options=Options(persistent_history=True))
    sys.exit(shell.run())
示例#10
0
def main():
    plugin = LogDevicePlugin()
    shell = Nubia(name="ldshell", plugin=plugin)
    sys.exit(shell.run())