def get_instance(): "provides the name of the machine this is running on" path = get_slash_cwd() spkg_path = get_spkg_path() sub_dir = path.split(spkg_path)[1] instance_name = sub_dir.split(os.path.sep)[1] return instance_name
def __init__(self, err_msg=""): self.err_msg = str(err_msg) self.cwd = get_slash_cwd() err = Exception() Exception.__init__(err)
def _getname(self): "Provides the name of this package based on directory structure" cwd = get_slash_cwd() path = cwd.split(os.sep) return path[-1]