From c8b7608bc1d3fd7b251de8a693c911edfc076b9e Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Sun, 8 Nov 2009 23:16:56 -0500 Subject: [PATCH] Delete intermediate prints. Small fix to make py2exe happy. --- pyfpdb/Configuration.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 1df4cc07..c6e38c01 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -53,14 +53,8 @@ def get_default_config_path(): def get_exec_path(): """Returns the path to the fpdb.(py|exe) file we are executing""" if hasattr(sys, "frozen"): # compiled by py2exe - print "executable path is", os.path.dirname(sys.executable) - print "exec path is", os.path.dirname(sys.executable) - print "0 path is", os.path.dirname(sys.path[0]) return os.path.dirname(sys.executable) else: - print "executable path is", os.path.dirname(sys.executable) - print "exec path is", os.path.dirname(sys.argv[0]) - print "0 path is", os.path.dirname(sys.path[0]) return os.path.dirname(sys.path[0]) def get_config(file_name, fallback = True): @@ -116,7 +110,7 @@ log.error("FARTS") APPLICATION_NAME_SHORT = 'fpdb' APPLICATION_VERSION = 'xx.xx.xx' -DIR_SELF = os.path.dirname(os.path.abspath(__file__)) +DIR_SELF = os.path.dirname(get_exec_path()) #TODO: imo no good idea to place 'database' in parent dir DIR_DATABASES = os.path.join(os.path.dirname(DIR_SELF), 'database')