Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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)
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_())
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)
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)
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)
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)
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)
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)