INNER CODE UNIT · Python
InfoObject
evpo/EncryptPad · configure.py:125
class InfoObject(object):
def __init__(self, infofile):
"""
Constructor sets members `infofile`, `lives_in`, `parent_module` and `basename`
"""
self.infofile = infofile
(dirname, basename) = os.path.split(infofile)
self.lives_in = dirname
if basename == 'info.txt':
(obj_dir, self.basename) = os.path.split(dirname)
if os.access(os.path.join(obj_dir, 'info.txt'), os.R_OK):
self.parent_module = os.path.basename(obj_dir)
else:
self.parent_module = None
else:
self.basename = basename.replace('.txt', '')