?? __init__.py
字號(hào):
## A base hack to allow ming use in Zope.#from AccessControl import allow_module, allow_class, allow_typefrom AccessControl import ModuleSecurityInfo, ClassSecurityInfofrom Globals import InitializeClassfrom thread import allocate_lockZMingLock = allocate_lock()allow_module('ming')import setFlags__allow_access_to_unprotected_subobjects__=1import osZWIFF_DEBUG = os.environ.get('ZWIFF_DEBUG',0) and 1class MingLocker: debug = ZWIFF_DEBUG def __init__(self): if self.debug: print "attempting to get lock.. " ZMingLock.acquire() if self.debug: print "got lock.. " def __del__(self): if self.debug: print "attempting to release lock.. " ZMingLock.release() if self.debug: print "lock released.. "import tempfileimport osclass dumbBuffer: __allow_access_to_unprotected_subobjects__=1 debug = ZWIFF_DEBUG def __init__(self, ext='', tmpdir=''): self.f = None if tmpdir: tempfile.tempdir=tmpdir self.tmpfile = tempfile.mktemp() if ext: self.tmpfile = self.tmpfile + ext def filename(self): return self.tmpfile def write(self, s): f = open(self.tmpfile,'w') f.write(s) f.close() def read(self): f = open(self.tmpfile) s = f.read() f.close() return s def __del__(self): if not ZWIFF_DEBUG: os.unlink(self.tmpfile)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -