better web2py.py thanks Niphlod
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.00.0 (2012-08-20 12:04:52) dev
|
||||
Version 2.00.0 (2012-08-20 16:02:06) dev
|
||||
|
||||
+1
-1
@@ -51,7 +51,6 @@ class List(list):
|
||||
return value
|
||||
|
||||
class Storage(object):
|
||||
__class__ = dict
|
||||
"""
|
||||
A Storage object is like a dictionary except `obj.foo` can be used
|
||||
in addition to `obj['foo']`, and setting obj.foo = None deletes item foo.
|
||||
@@ -72,6 +71,7 @@ class Storage(object):
|
||||
None
|
||||
|
||||
"""
|
||||
__class__ = dict
|
||||
|
||||
def __init__(self, __d__=None, **values):
|
||||
self.__dict__.update(__d__ or {},**values)
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
if getattr(sys, 'frozen', None):
|
||||
path = os.getcwd() # Seems necessary for py2exe
|
||||
else:
|
||||
if '__file__' in globals():
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
os.chdir(path)
|
||||
elif hasattr(sys, 'frozen'):
|
||||
path = os.path.dirname(os.path.abspath(sys.executable)) # for py2exe
|
||||
else: #should never happen
|
||||
path = os.getcwd()
|
||||
os.chdir(path)
|
||||
|
||||
sys.path = [path]+[p for p in sys.path if not p==path]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user