Burgerlib Python
Loading...
Searching...
No Matches
Functions | Variables
burger.locators Namespace Reference

Package that contains executable locators. More...

Functions

def where_is_xcode (xcode_version=None)
 Locate xcodebuild for a specific version of XCode. More...
 
def _get_codeblocks_registry_path ()
 Locate codeblocks path using the Window Registry. More...
 
def where_is_codeblocks (verbose=False, refresh=False, path=None)
 Return the location of CodeBlocks's executable. More...
 
def where_is_watcom (command=None, verbose=False, refresh=False, path=None)
 Return the location of Watcom's executables. More...
 
def _get_doxygen_registry_path ()
 Locate doxygen path using the Window Registry. More...
 
def where_is_doxygen (verbose=False, refresh=False, path=None)
 Return the location of Doxygen's executable. More...
 
def where_is_visual_studio (vs_version)
 Locate devenv.com for a specific version of Visual Studio. More...
 

Variables

 _CODEBLOCKS_PATH
 Cached location of CodeBlocks. More...
 
 _WATCOM_PATH
 Cached location of Watcom. More...
 
 _DOXYGEN_PATH
 Cached location of doxygen. More...
 
tuple _VS_VARIANTS
 Visual Studio variants in the order of search.
 

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()

def burger.locators._get_codeblocks_registry_path ( )
private

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()

def burger.locators._get_doxygen_registry_path ( )
private

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()

def 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()

def 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_visual_studio()

def burger.locators.where_is_visual_studio (   vs_version)

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
Returns
Path to devenv.com for the IDE or None.

◆ where_is_watcom()

def 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.

◆ where_is_xcode()

def burger.locators.where_is_xcode (   xcode_version = None)

Locate xcodebuild for a specific version of XCode.

Given a specific version by version, scan the locations that the IDE would be found.

Examples

>>> burger.where_is_xcode()
("/Developer/usr/bin/xcodebuild", 3)
>>> burger.where_is_xcode(2093)
None
Note
This function will always return None on non-macOS hosts. Minimum version of XCode is 3.
Parameters
xcode_versionVersion number
Returns
Path to xcodebuild for the XCode version or None.

Variable Documentation

◆ _CODEBLOCKS_PATH

burger.locators._CODEBLOCKS_PATH
private

Cached location of CodeBlocks.

◆ _DOXYGEN_PATH

burger.locators._DOXYGEN_PATH
private

Cached location of doxygen.

◆ _WATCOM_PATH

burger.locators._WATCOM_PATH
private

Cached location of Watcom.