From 3ca4e928da41a4efccdb50966e20d7a1ec31f0c8 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 20 Aug 2012 10:57:11 -0500 Subject: [PATCH] better check for frozen, thanks Niphlod --- VERSION | 2 +- web2py.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 3d1d800e..47e2585f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-08-20 10:54:56) dev +Version 2.00.0 (2012-08-20 10:57:08) dev diff --git a/web2py.py b/web2py.py index 0dfe3f54..623be32f 100755 --- a/web2py.py +++ b/web2py.py @@ -4,11 +4,11 @@ import os import sys -if '__file__' in globals(): +if getattr(sys, 'frozen', None): + path = os.getcwd() # Seems necessary for py2exe +else: path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) -else: - path = os.getcwd() # Seems necessary for py2exe sys.path = [path]+[p for p in sys.path if not p==path]