How to use the qtpyvcp.utilities.opt_parser.parse_opts function in qtpyvcp

To help you get started, we’ve selected a few qtpyvcp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kcjengr / qtpyvcp / video_tests / vtk_test / __init__.py View on Github external
def main(opts=None):

    if opts is None:
        from qtpyvcp.utilities.opt_parser import parse_opts
        opts = parse_opts(vcp_cmd='vtk_test',
                          vcp_name='vtk_test',
                          vcp_version=__version__)

    qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE)
github kcjengr / qtpyvcp / examples / atc_test / atc_test / __init__.py View on Github external
def main(opts=None):

    if opts is None:
        from qtpyvcp.utilities.opt_parser import parse_opts
        opts = parse_opts(vcp_cmd='vtk_tool_table',
                          vcp_name='vtk_tool_table',
                          vcp_version=__version__)

    qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE)
github kcjengr / qtpyvcp / qtpyvcp / __main__.py View on Github external
was specified it will be ignored. Useful for overriding
                     a VCP specified in an INI file.
  -h --help          Show this help and exit.
  -v --version       Show version.

Note:
  When specifying QtPyVCP in the INI using [DISPLAY]DISPLAY=qtpyvcp [...]
  the --ini parameter will be passed by the linuxcnc startup script so does
  not need to be specified.

"""

import sys
from qtpyvcp.utilities.opt_parser import parse_opts

opts = parse_opts(__doc__)
# We must import the application after the args have been parsed and the
# environment set up.
from qtpyvcp.application import VCPApplication
app = VCPApplication(opts=opts)
sys.exit(app.exec_())
github kcjengr / qtpyvcp / qtpyvcp / app / __init__.py View on Github external
def main():
    """QtPyVCP Main entry point

    This method is called when running `qtpyvcp` directly from the
    command line. The command line options are generated from the
    docstring at the beginning of this module.
    """
    from qtpyvcp.utilities.opt_parser import parse_opts
    opts = parse_opts(__doc__)
    run(opts, None)
github kcjengr / qtpyvcp / examples / probe_basic / __init__.py View on Github external
def main(opts=None):

    if opts is None:
        from qtpyvcp.utilities.opt_parser import parse_opts
        opts = parse_opts(vcp_cmd='probebasic',
                          vcp_name='Probe Basic',
                          vcp_version=__version__)

    qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE)
github kcjengr / qtpyvcp / examples / mini / __init__.py View on Github external
def main(opts=None):

    if opts is None:
        from qtpyvcp.utilities.opt_parser import parse_opts
        opts = parse_opts(vcp_cmd='mini',
                          vcp_name='Mini',
                          vcp_version=__version__)

    # run the main application
    qtpyvcp.app.run(opts, VCP_CONFIG_FILE)
github kcjengr / qtpyvcp / examples / mini / __main__.py View on Github external
Example:
    Assuming the dir this file is located in is on the PATH, you can
    launch MiniVCP by saying::

        $ mini --ini=/path/to/config.ini [options ...]

    Run with the --help option to print a full list of options.

"""

from . import __version__, run

# parse cmd line args
from qtpyvcp.utilities.opt_parser import parse_opts
opts = parse_opts(vcp_name='Mini', vcp_cmd='mini', vcp_version=__version__)

# run
run(opts)
github kcjengr / qtpyvcp / examples / probe_basic / __main__.py View on Github external
Example:
    Assuming the dir this file is located in is on the PATH, you can
    launch ProbeBasic by saying::

        $ probebasic --ini=/path/to/config.ini [options ...]

    Run with --help to print a full list of options.

"""

from . import __version__, run

# parse cmd line args
from qtpyvcp.utilities.opt_parser import parse_opts
opts = parse_opts(vcp_name='Probe Basic', vcp_cmd='probebasic', vcp_version=__version__)

# run
run(opts)
github kcjengr / qtpyvcp / examples / brender / __init__.py View on Github external
def main(opts=None):

    if opts is None:
        from qtpyvcp.utilities.opt_parser import parse_opts
        opts = parse_opts(vcp_cmd='brender',
                          vcp_name='Brender',
                          vcp_version=__version__)

    qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE)