Package schrodinger :: Package utils :: Module licutils
[hide private]
[frames] | no frames]

Module licutils

Licence related helper functions.

Functions [hide private]
 
get_linked_path(path)
Returns the absolute path for path.
 
license_list(lic_search_path)
Split the given license search path up into individual items.
 
license_is_dummy(lic_file)
Determine whether the given license file contains any actual licenses, or not.
 
license_requires_server(lic_file)
Determine whether the given license file requires a server or not.
 
license_is_remote(lic_file)
Determine whether the given "license file" is actually just the network address of a remote license server (<port>@<server-host>)
 
host_is_local(hostname)
Determine whether the given hostname refers to the current host.
 
is_ipv4_addr(addr)
Determine whether the given string is an IPv4 address.
 
get_license_paths()
Get path to the file defining the license and the actual license file.
 
fix_cmd(cmd, logger=None)
This function prefix the command to map a temporary drive for the current working directory if the current directory is an UNC.
 
same_host(hostname1, hostname2)
 
shorthost(hostname)
Variables [hide private]
  ourhost = 'pdx-buildbot-lv25.vmss.schrodinger.com'
  __package__ = 'schrodinger.utils'
Function Details [hide private]

get_linked_path(path)

 

Returns the absolute path for path. If it is a symlink, the absolute path to which the symlink points to will be returned.

Parameters:
  • path (str) - The path

license_is_dummy(lic_file)

 

Determine whether the given license file contains any actual licenses, or not. Returns true if no license lines are found.

This function assumes that the specified file exists.

license_is_remote(lic_file)

 

Determine whether the given "license file" is actually just the network address of a remote license server (<port>@<server-host>)

We don't want to allow people to shut down a remote license server. If there is no "license file" or it cannot be opened, then the license must be remote.

get_license_paths()

 

Get path to the file defining the license and the actual
license file. This is the order of testing:

   1) $SCHROD_LICENSE_FILE
   2) $LM_LICENSE_FILE
   3) $SCHRODINGER_LICENSE
   4) $SCHRODINGER/license
   5) Library/Application Support/Schrodinger/license (for MacOSX)