libc.prctl(15, 'exaile', 0, 0, 0) # 15 = PR_SET_NAME except Exception: pass # Set visible process name. Requires module "setproctitle" try: from setproctitle import setproctitle setproctitle('exaile') except ImportError: pass # Find out the location of exaile's working directory, and insert it to sys.path basedir = os.path.dirname(os.path.realpath(__file__)) if not os.path.exists(os.path.join(basedir, "exaile.py")): cwd = os.getcwd() if os.path.exists(os.path.join(cwd, "exaile.py")): basedir = cwd sys.path.insert(0, basedir) os.environ['EXAILE_DIR'] = basedir def main(): from xl import main global exaile exaile = main.Exaile() if __name__ == "__main__": main() # vim: et sts=4 sw=4
except Exception: pass # Set visible process name. Requires module "setproctitle" try: from setproctitle import setproctitle setproctitle('exaile') except ImportError: pass # Find the location of exaile's working directory and insert it to sys.path basedir = os.path.dirname(os.path.realpath(__file__)) if not os.path.exists(os.path.join(basedir, "exaile.py")): cwd = os.getcwd() if os.path.exists(os.path.join(cwd, "exaile.py")): basedir = cwd sys.path.insert(0, basedir) os.environ['EXAILE_DIR'] = basedir def main(): from xl import main global exaile exaile = main.Exaile() if __name__ == "__main__": main() # vim: et sts=4 sw=4