[Numpy-svn] r3027 - trunk/numpy

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Aug 15 04:53:53 CDT 2006


Author: oliphant
Date: 2006-08-15 04:53:49 -0500 (Tue, 15 Aug 2006)
New Revision: 3027

Modified:
   trunk/numpy/__init__.py
   trunk/numpy/ctypeslib.py
Log:
import ctypeslib on numpy load and change name from ctypes_load_library to load_library

Modified: trunk/numpy/__init__.py
===================================================================
--- trunk/numpy/__init__.py	2006-08-15 09:37:43 UTC (rev 3026)
+++ trunk/numpy/__init__.py	2006-08-15 09:53:49 UTC (rev 3027)
@@ -39,12 +39,13 @@
     import linalg
     import fft
     import random
+    import ctypeslib
 
     __all__ = ['__version__', 'pkgload', 'PackageLoader',
                'ScipyTest', 'NumpyTest', 'show_config']
     __all__ += core.__all__
     __all__ += lib.__all__
-    __all__ += ['linalg', 'fft', 'random']
+    __all__ += ['linalg', 'fft', 'random', 'ctypeslib']
         
     if __doc__ is not None:
         __doc__ += """

Modified: trunk/numpy/ctypeslib.py
===================================================================
--- trunk/numpy/ctypeslib.py	2006-08-15 09:37:43 UTC (rev 3026)
+++ trunk/numpy/ctypeslib.py	2006-08-15 09:53:49 UTC (rev 3027)
@@ -1,11 +1,11 @@
-__all__ = ['ctypes_load_library', 'ndpointer', 'test']
+__all__ = ['load_library', 'ndpointer', 'test', 'ctypes_load_library']
 
 import sys, os
-from numpy import integer, product, ndarray, dtype as _dtype
+from numpy import integer, product, ndarray, dtype as _dtype, deprecate
 from numpy.core.multiarray import _flagdict, flagsobj
 
 # Adapted from Albert Strasheim
-def ctypes_load_library(libname, loader_path):
+def load_library(libname, loader_path):
     if '.' not in libname:
         if sys.platform == 'win32':
             libname = '%s.dll' % libname
@@ -35,6 +35,8 @@
             res.append(key)
     return res
 
+ctypes_load_library = deprecate(load_library, 'ctypes_load_library', 'load_library')
+
 class _ndptr(object):
     def from_param(cls, obj):
         if not isinstance(obj, ndarray):



More information about the Numpy-svn mailing list