Delete intermediate prints. Small fix to make py2exe happy.

This commit is contained in:
Eratosthenes 2009-11-08 23:16:56 -05:00
parent e6b71d86bb
commit c8b7608bc1

View File

@ -53,14 +53,8 @@ def get_default_config_path():
def get_exec_path(): def get_exec_path():
"""Returns the path to the fpdb.(py|exe) file we are executing""" """Returns the path to the fpdb.(py|exe) file we are executing"""
if hasattr(sys, "frozen"): # compiled by py2exe 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) return os.path.dirname(sys.executable)
else: 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]) return os.path.dirname(sys.path[0])
def get_config(file_name, fallback = True): def get_config(file_name, fallback = True):
@ -116,7 +110,7 @@ log.error("FARTS")
APPLICATION_NAME_SHORT = 'fpdb' APPLICATION_NAME_SHORT = 'fpdb'
APPLICATION_VERSION = 'xx.xx.xx' 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 #TODO: imo no good idea to place 'database' in parent dir
DIR_DATABASES = os.path.join(os.path.dirname(DIR_SELF), 'database') DIR_DATABASES = os.path.join(os.path.dirname(DIR_SELF), 'database')