Entrypoint Scripts

API Reference

metatools.entrypoints.build

metatools.entrypoints.build.dedent(docstring)[source]

metatools.entrypoints.search

This module deals with finding absolute paths to executables or apps to run. It is imperative that we return absolute paths so that the executables will be able to bootstrap a proper development environment.

Apps are searched for within key_base/applications in all tools listed in KS_PYTHON_SITES and in KS_TOOLS. Executables are searched for within PATH.

metatools.entrypoints.search.get_executable_path(name)[source]

Find an executable on the current $PATH.

Parameters:name (str) – The name of the executable to find.
Throws ValueError:
 When it cannot find an executable.
>>> get_executable_path('toolbox')
<snip $KS_TOOLS>/key_base/bin/generated/toolbox
metatools.entrypoints.search.get_app_or_executable_cmd(app_name, exec_name=None)[source]

Find an OS X app (if on a Mac), and fall back to an executable.

Parameters:
  • app_name (str) – The name of the OS X application to find (without .app).
  • exec_name (str) – The name of the executable to find; defaults to app_name.
Throws ValueError:
 

When it cannot find an app or executable.

Returns:

A list that is directly usable in subprocess.Popen, and which anything appended to will be treated as an argument.

On a Mac when there is an application:

>>> get_app_or_executable_cmd('qb-reelsmart', 'qb_reelsmart')
['open', '<snip $KS_TOOLS>/key_base/qb-reelsmart.app', '--args']

On Linux, or when there is no application:

>>> get_app_or_executable_cmd('qb-reelsmart', 'qb_reelsmart')
['<snip $KS_TOOLS>/key_base/bin/generated/qb_reelsmart']
Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.