Burgerlib Python
Loading...
Searching...
No Matches
burger.locators Namespace Reference

Package that contains executable locators. More...

Functions

 _get_codeblocks_registry_path ()
 Locate codeblocks path using the Window Registry.
 where_is_codeblocks (verbose=False, refresh=False, path=None)
 Return the location of CodeBlocks's executable.
 where_is_watcom (command=None, verbose=False, refresh=False, path=None)
 Return the location of Watcom's executables.
 _get_doxygen_registry_path ()
 Locate doxygen path using the Window Registry.
 where_is_doxygen (verbose=False, refresh=False, path=None)
 Return the location of Doxygen's executable.
 where_is_pdflatex (verbose=False, refresh=False, path=None)
 Return the location of the pdflatex executable.
 where_is_makeindex (verbose=False, refresh=False, path=None)
 Return the location of the makeindex executable.
 where_is_visual_studio (vs_version, tool_name=None, cpu=None)
 Locate devenv.com for a specific version of Visual Studio.

Variables

 _CODEBLOCKS_PATH
 Cached location of CodeBlocks.
 _WATCOM_PATH
 Cached location of Watcom.
 _DOXYGEN_PATH
 Cached location of doxygen.
 _PDFLATEX_PATH
 Cached location of pdflatex.
 _MAKEINDEX_PATH
 Cached location of makeindex.
tuple _VS_VARIANTS
 Visual Studio variants in the order of search.
dict _VS_TABLE
 Internal table of Visual Studio environment variables.

Detailed Description

Package that contains executable locators.

Functions that will scan for executables so it's not necessary for applications to either be on the PATH. They favor environement variables, and then system registry before searching the path and then looking at the usual hard coded locations

Function Documentation

◆ _get_codeblocks_registry_path()

burger.locators._get_codeblocks_registry_path ( )
protected

Locate codeblocks path using the Window Registry.

Private function only called on Windows hosts to query the registry for the location of Codeblocks.

Check HKCU\SOFTWARE\CodeBlocks\Path for the base directory of CodeBlocks on Windows.

Returns
None or a string with the path to CodeBlocks

◆ _get_doxygen_registry_path()

burger.locators._get_doxygen_registry_path ( )
protected

Locate doxygen path using the Window Registry.

Private function only called on Windows hosts to query the registry for the location of Doxygen.

Check HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ doxygen_is1 for the base directory of Doxygen on Windows.

Returns
None or a string with the path to CodeBlocks

◆ where_is_codeblocks()

burger.locators.where_is_codeblocks ( verbose = False,
refresh = False,
path = None )

Return the location of CodeBlocks's executable.

Look for an environment variable CODEBLOCKS and determine if the executable resides there, if so, return the string to the path

If running on a MacOSX client, look in the Applications folder for a copy of CodeBlocks.app and return the pathname to the copy of CodeBlocks that resides within

PATH is then searched for CodeBlocks, and if it's not found, None is returned.

Parameters
verboseIf True, print a message if CodeBlocks was not found
refreshIf True, reset the cache and force a reload.
pathPath to CodeBlocks to place in the cache
Returns
A path to the CodeBlocks command line executable or None if not found.

◆ where_is_doxygen()

burger.locators.where_is_doxygen ( verbose = False,
refresh = False,
path = None )

Return the location of Doxygen's executable.

Look for an environment variable DOXYGEN and determine if the executable resides there. Otherwise traverse the path to see if doxygen is present. If that fails, look in the registry, or the usual locations like "Program Files\\doxygen" on Windows.

If running on a MacOSX client, look in the Applications folder for a copy of Doxygen.app and return the pathname to the copy of doxygen that resides within.

Parameters
verboseIf True, print a message if doxygen was not found
refreshIf True, reset the cache and force a reload.
pathPath to doxygen to place in the cache
Returns
A path to the Doxygen command line executable or None if not found.

◆ where_is_makeindex()

burger.locators.where_is_makeindex ( verbose = False,
refresh = False,
path = None )

Return the location of the makeindex executable.

Parameters
verboseIf True, print a message if makeindex was not found
refreshIf True, reset the cache and force a reload.
pathPath to makeindex to place in the cache
Returns
A path to the makeindex command line executable or None if not found.

◆ where_is_pdflatex()

burger.locators.where_is_pdflatex ( verbose = False,
refresh = False,
path = None )

Return the location of the pdflatex executable.

Parameters
verboseIf True, print a message if pdflatex was not found
refreshIf True, reset the cache and force a reload.
pathPath to pdflatex to place in the cache
Returns
A path to the pdflatex command line executable or None if not found.

◆ where_is_visual_studio()

burger.locators.where_is_visual_studio ( vs_version,
tool_name = None,
cpu = None )

Locate devenv.com for a specific version of Visual Studio.

Given a specific version by year, check for the appropriate environment variable that contains the path to the executable of the IDE

Note
This function will always return None on non-windows hosts.

Examples

>>> burger.where_is_visual_studio(2010)
"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0"
"\\Common7\\ide\\devenv.com"
Parameters
vs_versionVersion year as number
tool_nameReturn the path to this tool, None becomes devenv.com
cpuString of the cpu type of the tool requested, x86, x64
Returns
Path to devenv.com for the IDE or None.

◆ where_is_watcom()

burger.locators.where_is_watcom ( command = None,
verbose = False,
refresh = False,
path = None )

Return the location of Watcom's executables.

Look for an environment variable WATCOM and determine if the executable resides there, if so, return the string to the path

In Windows, the boot drive is checked for a WATCOM folder and if found, that folder name is returned. If all checks failed, None is returned.

Parameters
commandWatcom program to find.
verboseIf True, print a message if watcom was not found
refreshIf True, reset the cache and force a reload.
pathPath to watcom to place in the cache
Returns
A path to the Watcom folder or None if not found.