import os import module_locator from Classes.Settings import Settings from Classes.PHP import PHP from Classes.GUI import GUI program_path = module_locator.module_path() print("Program path is: %s" % program_path) program_settings = Settings() settings_file_path = "%s/%s" % (program_path, "settings.ini") program_settings.load_settings(settings_file_path) php_path = str(program_settings.read_setting("php_path")) if not os.path.exists(php_path): # perhaps we should try something relative php_path = "%s/%s" % (program_path, php_path) port = str(program_settings.read_setting("port")) webroot = str(program_settings.read_setting("webroot")) if not os.path.exists(webroot): # perhaps we should try something relative webroot = "%s/%s" % (program_path, webroot)
import os import module_locator program_path = module_locator.module_path() print "Program path is: %s" % program_path from Classes.Settings import Settings from Classes.PHP import PHP from Classes.GUI import GUI program_settings = Settings() settings_file_path = "%s/%s" % (program_path, "settings.ini") program_settings.load_settings(settings_file_path) php_path = str(program_settings.read_setting("php_path")) if not os.path.exists(php_path): # perhaps we should try something relative php_path = "%s/%s" % (program_path, php_path) port = str(program_settings.read_setting("port")) webroot = str(program_settings.read_setting("webroot")) if not os.path.exists(webroot): # perhaps we should try something relative webroot = "%s/%s" % (program_path, webroot)