def init(cls):
     """
     Establish the /run/lock/southcoastscience root.
     Should be invoked on class load.
     """
     try:
         os.mkdir(Host.lock_dir())
         os.chmod(Host.lock_dir(), 0o777)      # TODO: why does the mod not work on mkdir?
     except FileExistsError:
         pass
Created on 2 Mar 2018

@author: Bruno Beloff ([email protected])
"""

from scs_host.sys.host import Host

# --------------------------------------------------------------------------------------------------------------------

home_path = Host.home_path()
print("home_path: %s" % home_path)

print("-")

try:
    lock_dir = Host.lock_dir()
    print("lock_dir: %s" % lock_dir)
except NotImplementedError:
    print("lock_dir: None")

try:
    tmp_dir = Host.tmp_dir()
    print("tmp_dir: %s" % tmp_dir)
except NotImplementedError:
    print("tmp_dir: None")

try:
    command_path = Host.command_path()
    print("command_path: %s" % command_path)
except NotImplementedError:
    print("command_path: None")
 def __name_dir(cls, name):
     return os.path.join(Host.lock_dir(), name)