[ctypes-commit] ctypes/ctypes _loader.py,1.1.2.10,1.1.2.11
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-01-26 08:00:00
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22889 Modified Files: Tag: branch_1_0 _loader.py Log Message: More docs for __getattr__. Simple minded tests for Windows. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** _loader.py 26 Jan 2006 07:54:36 -0000 1.1.2.10 --- _loader.py 26 Jan 2006 07:59:52 -0000 1.1.2.11 *************** *** 189,193 **** def __getattr__(self, name): ! """Load a library via attribute access. The result is cached.""" if name.startswith("_"): raise AttributeError(name) --- 189,194 ---- def __getattr__(self, name): ! """Load a library via attribute access. Calls ! .load_version(). The result is cached.""" if name.startswith("_"): raise AttributeError(name) *************** *** 213,216 **** --- 214,224 ---- def test(): + if os.name == "nt": + print cdll.msvcrt + print cdll.load("msvcrt") + # load_version looks more like an artefact: + print cdll.load_version("msvcr", "t") + print cdll.find("msvcrt") + if os.name == "posix": # find and load_version *************** *** 224,228 **** # load ! if os.name == "posix" and sys.platform == "darwin": print cdll.load("libm.dylib") print cdll.load("libcrypto.dylib") --- 232,236 ---- # load ! if sys.platform == "darwin": print cdll.load("libm.dylib") print cdll.load("libcrypto.dylib") |