[h5py] 144/455: More docs and 1.8 updates

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 6e5c6a26ad7563ca4b8cbc2df7e2c8a683a0b350
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Wed Oct 22 06:44:12 2008 +0000

    More docs and 1.8 updates
---
 docs_api/source/automod.py   |   8 +-
 docs_api/source/index.rst    |  71 +++-----
 docs_api/source/low/h5.rst   |  29 +++
 docs_api/source/low/h5f.rst  |  60 +++++++
 docs_api/source/low/h5fd.rst |  61 +++++++
 docs_api/source/low/h5l.rst  |   7 +
 docs_api/source/low/h5o.rst  |   7 +
 docs_api/source/low/h5p.rst  |  71 ++++++++
 docs_api/source/low/h5z.rst  |  44 +++++
 h5py/h5a.pyx                 |   2 +-
 h5py/h5f.pyx                 | 154 ++++++++--------
 h5py/h5l.pyx                 |  37 ++--
 h5py/h5o.pyx                 |  96 ++++++++--
 h5py/h5p.pyx                 | 417 ++++++++++++++++++++++---------------------
 setup.py                     |  17 +-
 15 files changed, 725 insertions(+), 356 deletions(-)

diff --git a/docs_api/source/automod.py b/docs_api/source/automod.py
index 1d2bd78..3723458 100644
--- a/docs_api/source/automod.py
+++ b/docs_api/source/automod.py
@@ -43,8 +43,8 @@ const_pattern = r"(?:^|\s+)\W?%s[\):\.,]?\.?(?:$|\s+)" % const_only
 
 # These match the regexp but are not valid constants
 const_exclude = r"HDF5|API|H5|H5A|H5D|H5F|H5P|H5Z|" + \
-                r"\sINT\s|\sUINT\s|\sSTRING\s|LONG|PHIL|GIL|TUPLE|LIST|FORTRAN|" +\
-                r"\sBOOL\s|\sNULL\s|\sNOT\s"
+                r"INT\s|UINT|STRING|LONG|PHIL|GIL|TUPLE|LIST|FORTRAN|" +\
+                r"BOOL|NULL|\sNOT\s"
 
 def replace_constant(instring, mod, match):
     """ Callback for re.sub, to generate the ReST for a constant in-place """
@@ -62,7 +62,7 @@ def replace_constant(instring, mod, match):
         target = '%s.%s' % (mod, target)
 
     rpl = ':data:`%s <%s>`' % (display, target)
-    print rpl
+    #print rpl
     return re.sub(const_only, rpl, matchstring)
 
 
@@ -86,7 +86,7 @@ def setup(spx):
                 final_lines.append(line)
 
         # Resolve class names, constants and modules
-        print name
+        #print name
         if hasattr(obj, 'im_class'):
             mod = obj.im_class.__module__
         elif hasattr(obj, '__module__'):
diff --git a/docs_api/source/index.rst b/docs_api/source/index.rst
index f044c81..1a77b8b 100644
--- a/docs_api/source/index.rst
+++ b/docs_api/source/index.rst
@@ -1,16 +1,18 @@
 Low-level (``h5py.h5*``) guide
 ==============================
 
-This is a general overview of the lowest-level API in h5py, the layer that
-calls into HDF5 directly.  A lot of effort has been put into making even this
-component useful in a Python context.  It provides the most general interface
-to HDF5, including the vast majority of the C library.
-
-Documentation for the high-level component (which is significantly easier to
-use) is `available here`__.
+While the `high-level component`__ provides a friendly, NumPy-like interface
+to HDF5, the major accomplishment of h5py is the low-level interface.  This
+is the most powerful and flexible way to access HDF5, and is as close as you
+can get the the library without having to actually write C code.
 
 __ http://h5py.alfven.org
 
+The goal of this layer is to provide access to (almost) the entire HDF5 C API,
+while retaining a Pythonic, object-oriented style.  Emphasis has been placed
+on clean design and exhaustive documentation.  Programmers familiar with the
+HDF5 C API should find themselves at home.
+
 You'll probably also find the `official HDF5 documentation`__ useful as a guide
 to how the library itself operates.  In particular, the HDF5 User Guide is
 an excellent description of each major component.
@@ -40,7 +42,7 @@ forward-compatible with the "1.8 API" mode.  Code written against the 1.6 mode
 should work fine when moving to 1.8.
 
 Low-level API reference
-=======================
+-----------------------
 
 .. toctree::
     :maxdepth: 1
@@ -49,8 +51,11 @@ Low-level API reference
     low/h5a
     low/h5d
     low/h5f
+    low/h5fd
     low/h5g
     low/h5i
+    low/h5l
+    low/h5o
     low/h5p
     low/h5r
     low/h5s
@@ -58,10 +63,10 @@ Low-level API reference
     low/h5z
 
 Library organization
-====================
+--------------------
 
 Modules
--------
+~~~~~~~
 
 While HDF5 is a C library, and therefore uses on global namespace for all
 functions and constants, their naming scheme is designed to partition the API
@@ -71,7 +76,7 @@ module organization.  For example, the Python wrapping of the HDF5 function
 ``H5Aiterate`` is in module ``h5a``.
 
 Identifier wrapping
--------------------
+~~~~~~~~~~~~~~~~~~~
 
 No matter how complete, a library full of C functions is not very fun to use.
 Additionally, since HDF5 identifiers are natively expressed as integers, their
@@ -80,10 +85,10 @@ impossible for applications of even a moderate size; errors will lead to
 resource leaks or (in the worst case) accidentally invalidating identifiers.
 
 Rather than a straight C-API mapping, all HDF5 identifiers are presented as
-Python extension types.  The root type ``h5.ObjectID`` provides a container
-for an integer identifier, which allows Python reference counting to manage
-the lifespan of the identifer.  When no more references exist to the Python
-object, the HDF5 identifier is automatically closed.
+Python extension types.  The root type :class:`ObjectID <h5py.h5.ObjectID>`
+provides a container for an integer identifier, which allows Python reference
+counting to manage the lifespan of the identifer.  When no more references
+exist to the Python object, the HDF5 identifier is automatically closed.
 
     >>> from h5py import h5s
     >>> sid = h5s.create_simple( (2,3) )
@@ -95,15 +100,15 @@ object, the HDF5 identifier is automatically closed.
 A side benefit is that many HDF5 functions take an identifier as their first
 argument.  These are naturally expressed as methods on an identifier object.
 For example, the HDF5 function``H5Dwrite`` becomes the method
-``h5d.DatasetID.write``.  Code using this technique is easier to write and
-maintain.
+:meth:`h5py.h5d.DatasetID.write`.  Code using this technique is easier to
+write and maintain.
 
     >>> sid.select_hyperslab((0,0),(2,2))
     >>> sid.get_select_bounds()
     ((0L, 0L), (1L, 1L))
 
 State & Hashing
----------------
+~~~~~~~~~~~~~~~
 
 Since the ``h5py.h5*`` family of modules is intended to be a straightforward
 interface to HDF5, almost all state information resides with the HDF5 library
@@ -112,7 +117,7 @@ ObjectID instances are determined by the status of the underlying HDF5 object.
 For example, if two GroupID objects with different HDF5 integer identifiers
 point to the same group, they will have identical hashes and compare equal.
 Among other things, this means that you can reliably use identifiers as keys
-in a dictionary.
+in a dictionary::
 
     >>> from h5py import h5f, h5g
     >>> fid = h5f.open('foo.hdf5')
@@ -129,12 +134,11 @@ in a dictionary.
     'The root group'
 
 .. note::
-    Currently all subclasses of ObjectID are hashable, including "transient"
-    identifiers like datatypes.  A future version may restrict hashing to
-    "committed", file-resident objects.
+    Hashing is restricted to file-resident objects, as there needs to be a
+    unique way to identify the object.
 
 Data Conversion
-===============
+---------------
 
 The natural numerical layer between h5py and the Python user is NumPy.  It
 provides the mechanism to transfer large datasets between HDF5 and Python
@@ -148,7 +152,7 @@ and HDF5 type objects.  Because the HDF5 typing system is more comprehensive
 than the NumPy system, this is an asymmetrical process. 
 
 Translating from an HDF5 datatype object to a dtype results in the closest
-standard NumPy representation of the datatype:
+standard NumPy representation of the datatype::
 
     >>> from h5py import h5t
     >>> h5t.STD_I32LE
@@ -164,7 +168,7 @@ signed integer), but not its layout.
 
 The reverse transformation (NumPy type to HDF5 type) is handled by a separate
 function.  It's guaranteed to result in an exact, binary-compatible
-representation:
+representation::
 
     >>> tid = h5t.py_create('=u8')
     >>> tid
@@ -175,23 +179,6 @@ conversion between types of the same class, including odd precisions and
 padding combinations.  This process is entirely transparent to the user.
 
 
-API Versioning
-==============
-
-HDF5 recently went though a major release, in the form of version 1.8.0.
-In addition to various stability improvements, it introduces a number of
-new and changed functions.  Rather than force people to use a particular
-version, h5py deals with this by specifying an "API compatibility" level.
-In "1.6" mode, the extension can be compiled with either 1.6.X or 1.8.X, and
-will function identically.  In this mode, only the functions from the 1.6.X
-series are exposed.  In "1.8" mode, new features and function signatures from
-HDF5 1.8.X are available.
-
-Currently, while h5py can be built in both modes, not many 1.8.X features are
-available.
-
-
-
 
 
 
diff --git a/docs_api/source/low/h5.rst b/docs_api/source/low/h5.rst
index 9982fd6..4d0c430 100644
--- a/docs_api/source/low/h5.rst
+++ b/docs_api/source/low/h5.rst
@@ -33,3 +33,32 @@ functions exist for low-level inspection of the HDF5 error stack.
 
 .. autoclass:: ErrorStackElement
     :members:
+
+Module constants
+----------------
+
+These constants are only available with HDF5 1.8.X.
+
+.. data:: INDEX_NAME
+
+    Resolve indices in alphanumeric order
+
+.. data:: INDEX_CRT_ORDER
+
+    Resolve indices in order of object creation.  Not always available.
+
+.. data:: ITER_NATIVE
+
+    Traverse index in the fastest possible order.  No particular pattern is
+    guaranteed.
+
+.. data:: ITER_INC
+
+    Traverse index in increasing order
+
+.. data:: ITER_DEC
+
+    Traverse index in decreasing order
+
+
+
diff --git a/docs_api/source/low/h5f.rst b/docs_api/source/low/h5f.rst
index e15e149..d76aee4 100644
--- a/docs_api/source/low/h5f.rst
+++ b/docs_api/source/low/h5f.rst
@@ -2,5 +2,65 @@ Module H5F
 ==========
 
 .. automodule:: h5py.h5f
+
+Functional API
+--------------
+
+.. autofunction:: open
+.. autofunction:: create
+.. autofunction:: flush
+.. autofunction:: is_hdf5
+.. autofunction:: mount
+.. autofunction:: unmount
+.. autofunction:: get_name
+.. autofunction:: get_obj_count
+.. autofunction:: get_obj_ids
+
+File objects
+------------
+
+.. autoclass:: FileID
     :members:
 
+Module constants
+----------------
+
+File access flags
+~~~~~~~~~~~~~~~~~
+
+.. data:: ACC_TRUNC
+
+    Create/truncate file
+
+.. data:: ACC_EXCL
+
+    Create file if it doesn't exist; fail otherwise
+
+.. data:: ACC_RDWR
+
+    Open in read/write mode
+
+.. data:: ACC_RDONLY
+
+    Open in read-only mode
+
+Other constants
+~~~~~~~~~~~~~~~
+
+.. data:: CLOSE_WEAK
+.. data:: CLOSE_SEMI
+.. data:: CLOSE_STRONG
+.. data:: CLOSE_DEFAULT
+
+.. data:: SCOPE_LOCAL
+.. data:: SCOPE_GLOBAL
+
+.. data:: OBJ_FILE
+.. data:: OBJ_DATASET
+.. data:: OBJ_GROUP
+.. data:: OBJ_DATATYPE
+.. data:: OBJ_ATTR
+.. data:: OBJ_ALL
+.. data:: OBJ_LOCAL
+
+
diff --git a/docs_api/source/low/h5fd.rst b/docs_api/source/low/h5fd.rst
new file mode 100644
index 0000000..0fa013c
--- /dev/null
+++ b/docs_api/source/low/h5fd.rst
@@ -0,0 +1,61 @@
+Module H5FD
+===========
+
+.. automodule:: h5py.h5fd
+
+Module constants
+----------------
+
+.. data:: MEM_DEFAULT
+.. data:: MEM_SUPER
+.. data:: MEM_BTREE
+.. data:: MEM_DRAW
+.. data:: MEM_GHEAP
+.. data:: MEM_LHEAP
+.. data:: MEM_OHDR
+.. data:: MEM_NTYPES
+
+File drivers
+~~~~~~~~~~~~
+
+.. data:: CORE
+.. data:: FAMILY
+.. data:: LOG
+.. data:: MPIO
+.. data:: MULTI
+.. data:: SEC2
+.. data:: STDIO
+
+
+Logging driver settings
+~~~~~~~~~~~~~~~~~~~~~~~
+
+.. note:: Not all logging flags are currently implemented by HDF5.
+
+.. data:: LOG_LOC_READ
+.. data:: LOG_LOC_WRITE
+.. data:: LOG_LOC_SEEK
+.. data:: LOG_LOC_IO
+
+.. data:: LOG_FILE_READ 
+.. data:: LOG_FILE_WRITE
+.. data:: LOG_FILE_IO
+
+.. data:: LOG_FLAVOR
+
+.. data:: LOG_NUM_READ
+.. data:: LOG_NUM_WRITE
+.. data:: LOG_NUM_SEEK
+.. data:: LOG_NUM_IO
+
+.. data:: LOG_TIME_OPEN
+.. data:: LOG_TIME_READ
+.. data:: LOG_TIME_WRITE
+.. data:: LOG_TIME_SEEK
+.. data:: LOG_TIME_CLOSE
+.. data:: LOG_TIME_IO
+
+.. data:: LOG_ALLOC
+.. data:: LOG_ALL
+
+
diff --git a/docs_api/source/low/h5l.rst b/docs_api/source/low/h5l.rst
new file mode 100644
index 0000000..68d5df6
--- /dev/null
+++ b/docs_api/source/low/h5l.rst
@@ -0,0 +1,7 @@
+Module H5L
+==========
+
+This module is only available when compiled against HDF5 1.8.0 and higher.
+
+.. automodule:: h5py.h5l
+    :members:
diff --git a/docs_api/source/low/h5o.rst b/docs_api/source/low/h5o.rst
new file mode 100644
index 0000000..8b0e44f
--- /dev/null
+++ b/docs_api/source/low/h5o.rst
@@ -0,0 +1,7 @@
+Module H5O
+==========
+
+This module is only available when compiled against HDF5 1.8.0 and higher.
+
+.. automodule:: h5py.h5o
+    :members:
diff --git a/docs_api/source/low/h5p.rst b/docs_api/source/low/h5p.rst
index 93cad18..002e166 100644
--- a/docs_api/source/low/h5p.rst
+++ b/docs_api/source/low/h5p.rst
@@ -2,5 +2,76 @@ Module H5P
 ==========
 
 .. automodule:: h5py.h5p
+
+Functional API
+--------------
+
+.. autofunction:: create
+
+Base classes
+------------
+
+.. autoclass:: PropID
+    :show-inheritance:
+    :members:
+
+.. autoclass:: PropClassID
+    :show-inheritance:
+    :members:
+
+.. autoclass:: PropInstanceID
+    :show-inheritance:
+    :members:
+
+File creation
+-------------
+
+.. autoclass:: PropFCID
+    :show-inheritance:
+    :members:
+
+File access
+-----------
+
+.. autoclass:: PropFAID
+    :show-inheritance:
     :members:
 
+Dataset creation
+----------------
+
+.. autoclass:: PropDCID
+    :show-inheritance:
+    :members:
+
+Module constants
+----------------
+
+Predfined classes (all versions)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. data:: DEFAULT
+.. data:: FILE_CREATE
+.. data:: FILE_ACCESS
+.. data:: DATASET_CREATE
+.. data:: DATASET_XFER
+
+
+Predefined classes (HDF5 1.8.X only)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(none yet)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs_api/source/low/h5z.rst b/docs_api/source/low/h5z.rst
index 228dba1..d33b72b 100644
--- a/docs_api/source/low/h5z.rst
+++ b/docs_api/source/low/h5z.rst
@@ -4,3 +4,47 @@ Module H5Z
 .. automodule:: h5py.h5z
     :members:
 
+Module constants
+----------------
+
+Predefined filters
+~~~~~~~~~~~~~~~~~~
+
+.. data:: FILTER_NONE
+.. data:: FILTER_ALL
+.. data:: FILTER_DEFLATE
+.. data:: FILTER_SHUFFLE
+.. data:: FILTER_FLETCHER32
+.. data:: FILTER_SZIP
+
+
+Filter flags
+~~~~~~~~~~~~
+
+.. data:: FLAG_DEFMASK
+.. data:: FLAG_MANDATORY
+.. data:: FLAG_OPTIONAL
+.. data:: FLAG_INVMASK
+.. data:: FLAG_REVERSE
+.. data:: FLAG_SKIP_EDC
+
+SZIP-specific options
+~~~~~~~~~~~~~~~~~~~~~
+
+.. data:: SZIP_ALLOW_K13_OPTION_MASK
+.. data:: SZIP_CHIP_OPTION_MASK
+.. data:: SZIP_EC_OPTION_MASK
+.. data:: SZIP_NN_OPTION_MASK
+.. data:: SZIP_MAX_PIXELS_PER_BLOCK
+
+Other flags
+~~~~~~~~~~~
+
+.. data:: FILTER_CONFIG_ENCODE_ENABLED
+.. data:: FILTER_CONFIG_DECODE_ENABLED
+
+.. data:: DISABLE_EDC
+.. data:: ENABLE_EDC
+.. data:: NO_EDC
+
+
diff --git a/h5py/h5a.pyx b/h5py/h5a.pyx
index ebffb91..a2a6db2 100644
--- a/h5py/h5a.pyx
+++ b/h5py/h5a.pyx
@@ -333,7 +333,7 @@ IF H5PY_18API:
         INT index_type (h5.INDEX_NAME)
             Which index to use
 
-        INT order (h5.ORDER_NATIVE)
+        INT order (h5.ITER_NATIVE)
             Index order to use
         """
         if index < 0:
diff --git a/h5py/h5f.pyx b/h5py/h5f.pyx
index b92f238..e653ebc 100644
--- a/h5py/h5f.pyx
+++ b/h5py/h5f.pyx
@@ -54,15 +54,17 @@ OBJ_LOCAL   = H5F_OBJ_LOCAL
 
 @sync
 def open(char* name, unsigned int flags=H5F_ACC_RDWR, PropFAID fapl=None):
-    """ (STRING name, UINT flags=ACC_RDWR, PropFAID fapl=None)
-        => FileID
+    """(STRING name, UINT flags=ACC_RDWR, PropFAID fapl=None) => FileID
 
-        Open an existing HDF5 file.  Keyword "flags" may be:
+    Open an existing HDF5 file.  Keyword "flags" may be:
 
-        * ACC_RWDR or
-        * ACC_RDONLY.
+    ACC_RDWR
+        Open in read-write mode
 
-        Keyword fapl may be a file access property list.
+    ACC_RDONLY
+        Open in readonly mode
+
+    Keyword fapl may be a file access property list.
     """
     IF H5PY_DEBUG:
         import logging
@@ -72,17 +74,19 @@ def open(char* name, unsigned int flags=H5F_ACC_RDWR, PropFAID fapl=None):
 @sync
 def create(char* name, int flags=H5F_ACC_TRUNC, PropFCID fcpl=None,
                                                 PropFAID fapl=None):
-    """ (STRING name, INT flags=ACC_TRUNC, PropFCID fcpl=None,
-                                           PropFAID fapl=None)
-        => FileID
+    """(STRING name, INT flags=ACC_TRUNC, PropFCID fcpl=None,
+    PropFAID fapl=None) => FileID
+
+    Create a new HDF5 file.  Keyword "flags" may be:
 
-        Create a new HDF5 file.  Keyword "flags" may be:
+    ACC_TRUNC
+        Truncate an existing file, discarding its data
 
-        * ACC_TRUNC:  Truncate an existing file, discarding its data
-        * ACC_EXCL:   Fail if a conflicting file exists
+    ACC_EXCL
+        Fail if a conflicting file exists
 
-        To keep the behavior in line with that of Python's built-in functions,
-        the default is ACC_TRUNC.  Be careful!
+    To keep the behavior in line with that of Python's built-in functions,
+    the default is ACC_TRUNC.  Be careful!
     """
     IF H5PY_DEBUG:
         import logging
@@ -91,47 +95,50 @@ def create(char* name, int flags=H5F_ACC_TRUNC, PropFCID fcpl=None,
 
 @sync
 def flush(ObjectID obj not None, int scope=H5F_SCOPE_LOCAL):
-    """ (ObjectID obj, INT scope=SCOPE_LOCAL)
+    """(ObjectID obj, INT scope=SCOPE_LOCAL)
+
+    Tell the HDF5 library to flush file buffers to disk.  "obj" may
+    be the file identifier, or the identifier of any object residing in
+    the file.  Keyword "scope" may be:
 
-        Tell the HDF5 library to flush file buffers to disk.  "obj" may
-        be the file identifier, or the identifier of any object residing in
-        the file.  Keyword "scope" may be:
+    SCOPE_LOCAL
+        Flush only the given file
 
-        * SCOPE_LOCAL:    Flush only the given file
-        * SCOPE_GLOBAL:   Flush the entire virtual file
+    SCOPE_GLOBAL
+        Flush the entire virtual file
     """
     H5Fflush(obj.id, <H5F_scope_t>scope)
 
 @sync
 def is_hdf5(char* name):
-    """ (STRING name) => BOOL is_hdf5
+    """(STRING name) => BOOL
 
-        Determine if a given file is an HDF5 file.  Note this raises an 
-        exception if the file doesn't exist.
+    Determine if a given file is an HDF5 file.  Note this raises an 
+    exception if the file doesn't exist.
     """
     return <bint>(H5Fis_hdf5(name))
 
 @sync
 def mount(ObjectID loc not None, char* name, FileID fid not None):
-    """ (ObjectID loc, STRING name, FileID fid)
-    
-        Mount an open file as "name" under group loc_id.
+    """(ObjectID loc, STRING name, FileID fid)
+
+    Mount an open file as "name" under group loc_id.
     """
     H5Fmount(loc.id, name, fid.id, H5P_DEFAULT)
 
 @sync
 def unmount(ObjectID loc not None, char* name):
-    """ (ObjectID loc, STRING name)
+    """(ObjectID loc, STRING name)
 
-        Unmount a file, mounted as "name" under group loc_id.
+    Unmount a file, mounted as "name" under group loc_id.
     """
     H5Funmount(loc.id, name)
 
 @sync
 def get_name(ObjectID obj not None):
-    """ (ObjectID obj) => STRING file_name
-        
-        Determine the name of the file in which the specified object resides.
+    """(ObjectID obj) => STRING
+    
+    Determine the name of the file in which the specified object resides.
     """
     cdef ssize_t size
     cdef char* name
@@ -149,21 +156,21 @@ def get_name(ObjectID obj not None):
 
 @sync
 def get_obj_count(object where=OBJ_ALL, int types=H5F_OBJ_ALL):
-    """ (OBJECT where=OBJ_ALL, types=OBJ_ALL) => INT n_objs
+    """(OBJECT where=OBJ_ALL, types=OBJ_ALL) => INT
 
-        Get the number of open objects.
+    Get the number of open objects.
 
-        where:
-            Either a FileID instance representing an HDF5 file, or the
-            special constant OBJ_ALL, to count objects in all files.
+    where
+        Either a FileID instance representing an HDF5 file, or the
+        special constant OBJ_ALL, to count objects in all files.
 
-        type:
-            Specify what kinds of object to include.  May be one of OBJ_*, 
-            or any bitwise combination (e.g. OBJ_FILE | OBJ_ATTR).  
+    type
+        Specify what kinds of object to include.  May be one of OBJ_*, 
+        or any bitwise combination (e.g. OBJ_FILE | OBJ_ATTR).  
 
-            The special value OBJ_ALL matches all object types, and 
-            OBJ_LOCAL will only match objects opened through a specific 
-            identifier.
+        The special value OBJ_ALL matches all object types, and 
+        OBJ_LOCAL will only match objects opened through a specific 
+        identifier.
     """
     cdef hid_t where_id
     if isinstance(where, FileID):
@@ -177,21 +184,21 @@ def get_obj_count(object where=OBJ_ALL, int types=H5F_OBJ_ALL):
 
 @sync
 def get_obj_ids(object where=OBJ_ALL, int types=H5F_OBJ_ALL):
-    """ (OBJECT where=OBJ_ALL, types=OBJ_ALL) => LIST open_ids
+    """(OBJECT where=OBJ_ALL, types=OBJ_ALL) => LIST
 
-        Get a list of identifier instances for open objects.
+    Get a list of identifier instances for open objects.
 
-        where:
-            Either a FileID instance representing an HDF5 file, or the
-            special constant OBJ_ALL, to list objects in all files.
+    where
+        Either a FileID instance representing an HDF5 file, or the
+        special constant OBJ_ALL, to list objects in all files.
 
-        type:   
-            Specify what kinds of object to include.  May be one of OBJ_*, 
-            or any bitwise combination (e.g. OBJ_FILE | OBJ_ATTR).  
+    type
+        Specify what kinds of object to include.  May be one of OBJ_*, 
+        or any bitwise combination (e.g. OBJ_FILE | OBJ_ATTR).  
 
-            The special value OBJ_ALL matches all object types, and 
-            OBJ_LOCAL will only match objects opened through a specific 
-            identifier.
+        The special value OBJ_ALL matches all object types, and 
+        OBJ_LOCAL will only match objects opened through a specific 
+        identifier.
     """
     cdef int count
     cdef int i
@@ -250,12 +257,12 @@ cdef class FileID(ObjectID):
 
     @sync
     def close(self):
-        """ ()
+        """()
 
-            Terminate access through this identifier.  Note that depending on
-            what property list settings were used to open the file, the
-            physical file might not be closed until all remaining open
-            identifiers are freed.  
+        Terminate access through this identifier.  Note that depending on
+        what property list settings were used to open the file, the
+        physical file might not be closed until all remaining open
+        identifiers are freed.  
         """
         IF H5PY_DEBUG:
             import logging
@@ -264,20 +271,20 @@ cdef class FileID(ObjectID):
 
     @sync
     def reopen(self):
-        """ () => FileID
+        """() => FileID
 
-            Retrieve another identifier for a file (which must still be open).
-            The new identifier is guaranteed to neither be mounted nor contain
-            a mounted file.
+        Retrieve another identifier for a file (which must still be open).
+        The new identifier is guaranteed to neither be mounted nor contain
+        a mounted file.
         """
         return FileID(H5Freopen(self.id))
 
     @sync
     def get_filesize(self):
-        """ () => LONG size
+        """() => LONG size
 
-            Determine the total size (in bytes) of the HDF5 file, 
-            including any user block.
+        Determine the total size (in bytes) of the HDF5 file, 
+        including any user block.
         """
         cdef hsize_t size
         H5Fget_filesize(self.id, &size)
@@ -285,27 +292,28 @@ cdef class FileID(ObjectID):
 
     @sync
     def get_create_plist(self):
-        """ () => PropFCID
+        """() => PropFCID
 
-            Retrieve a copy of the property list used to create this file.
+        Retrieve a copy of the file creation property list used to
+        create this file.
         """
         return propwrap(H5Fget_create_plist(self.id))
 
     @sync
     def get_access_plist(self):
-        """ () => PropFAID
+        """() => PropFAID
 
-            Retrieve a copy of the property list which manages access 
-            to this file.
+        Retrieve a copy of the file access property list which manages access 
+        to this file.
         """
         return propwrap(H5Fget_access_plist(self.id))
 
     @sync
     def get_freespace(self):
-        """ () => LONG freespace
+        """() => LONG freespace
 
-            Determine the amount of free space in this file.  Note that this
-            only tracks free space until the file is closed.
+        Determine the amount of free space in this file.  Note that this
+        only tracks free space until the file is closed.
         """
         return H5Fget_freespace(self.id)
 
diff --git a/h5py/h5l.pyx b/h5py/h5l.pyx
index 867c3b1..f3a9465 100644
--- a/h5py/h5l.pyx
+++ b/h5py/h5l.pyx
@@ -101,14 +101,14 @@ cdef class LinkProxy(ObjectID):
         H5L function operates on at least one group, the methods provided
         operate on their parent group identifier.  For example::
 
-        >>> g = h5g.open(fid, '/')
-        >>> g.links.exists("MyGroup")
-        True
-        >>> g.links.exists("FooBar")
-        False
-
-        Hashable: No
-        Equality: Undefined
+            >>> g = h5g.open(fid, '/')
+            >>> g.links.exists("MyGroup")
+            True
+            >>> g.links.exists("FooBar")
+            False
+
+        * Hashable: No
+        * Equality: Undefined
     """
 
     def __cinit__(self, hid_t id_):
@@ -219,24 +219,29 @@ cdef class LinkProxy(ObjectID):
         """(CALLABLE func, **kwds) => <Return value from func>
 
         Iterate a function or callable object over all groups below this
-        one.  Your callable should conform to the signature:
+        one.  Your callable should conform to the signature::
 
             func(STRING name) => Result
 
-        or if the keyword argument "info" is True:
+        or if the keyword argument "info" is True::
 
             func(STRING name, LinkInfo info) => Result
 
         Returning None or a logical False continues iteration; returning
         anything else aborts iteration and returns that value.
 
-        Keyword-only arguments:
+        BOOL info (False)
+            Provide a LinkInfo instance to callback
 
-        * BOOL info (False)              Provide a LinkInfo instance to callback
-        * STRING obj_name ("."):         Visit a subgroup instead
-        * PropLAID lapl (None):          Controls how "obj_name" is interpreted
-        * INT idx_type (h5.INDEX_NAME):  What indexing strategy to use
-        * INT order (h5.ITER_NATIVE):    Order in which iteration occurs
+        STRING obj_name (".")
+            Visit this subgroup instead
+
+        PropLAID lapl (None)
+            Link access property list for "obj_name"
+
+        INT idx_type (h5.INDEX_NAME)
+
+        INT order (h5.ITER_NATIVE)
         """
         cdef _LinkVisitor it = _LinkVisitor(func)
         cdef H5L_iterate_t cfunc
diff --git a/h5py/h5o.pyx b/h5py/h5o.pyx
index fc6e215..8575d63 100644
--- a/h5py/h5o.pyx
+++ b/h5py/h5o.pyx
@@ -21,6 +21,7 @@ from h5 cimport init_hdf5, ObjectID, SmartStruct
 from h5g cimport GroupID
 from h5i cimport wrap_identifier
 from h5p cimport PropID, pdefault
+from utils cimport emalloc, efree
 
 # Initialization
 init_hdf5()
@@ -122,15 +123,39 @@ cdef class ObjInfo(_ObjInfo):
         return newcopy
 
 @sync
-def get_info(ObjectID obj not None):
-    """(ObjectID obj) => ObjInfo"""
+def get_info(ObjectID loc not None, char* name=NULL, int index=-1, *,
+        char* obj_name='.', int index_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
+        PropID lapl=None):
+    """(ObjectID loc, STRING name=, INT index=, **kwds) => ObjInfo
 
+    Get information describing an object in an HDF5 file.  Provide the object
+    itself, or the containing group and exactly one of "name" or "index".
+
+    STRING obj_name (".")
+        When "index" is specified, look in this subgroup instead.
+        Otherwise ignored.
+
+    PropID lapl (None)
+        Link access property list
+
+    INT index_type (h5.INDEX_NAME)
+
+    INT order (h5.ITER_NATIVE)
+    """
     cdef ObjInfo info
     info = ObjInfo()
 
-    H5Oget_info(obj.id, &info.infostruct)
-    return info
+    if name != NULL and index >= 0:
+        raise TypeError("At most one of name or index may be specified")
+    elif name != NULL and index < 0:
+        H5Oget_info_by_name(loc.id, name, &info.infostruct, pdefault(lapl)) 
+    elif name == NULL and index >= 0:
+        H5Oget_info_by_idx(loc.id, obj_name, <H5_index_t>index_type,
+            <H5_iter_order_t>order, index, &info.infostruct, pdefault(lapl))
+    else: 
+        H5Oget_info(loc.id, &info.infostruct)
 
+    return info
 
 # === General object operations ===============================================
 
@@ -168,6 +193,48 @@ def copy(GroupID src_loc not None, char* src_name, GroupID dst_loc not None,
     H5Ocopy(src_loc.id, src_name, dst_loc.id, dst_name, pdefault(copypl),
         pdefault(lcpl))
 
+ at sync
+def set_comment(ObjectID loc not None, char* comment, *, char* obj_name=".",
+    PropID lapl=None):
+    """(ObjectID loc, STRING comment, **kwds)
+
+    Set the comment for any-file resident object.  Keywords:
+
+    STRING obj_name (".")
+        Set comment on this group member instead
+
+    PropID lapl (None)
+        Link access property list
+    """
+    H5Oset_comment_by_name(loc.id, obj_name, comment, pdefault(lapl))
+
+
+ at sync
+def get_comment(ObjectID loc not None, char* comment, *, char* obj_name=".",
+    PropID lapl=None):
+    """(ObjectID loc, STRING comment, **kwds)
+
+    Get the comment for any-file resident object.  Keywords:
+
+    STRING obj_name (".")
+        Set comment on this group member instead
+
+    PropID lapl (None)
+        Link access property list
+    """
+    cdef ssize_t size
+    cdef char* buf
+
+    size = H5Oget_comment_by_name(loc.id, obj_name, NULL, 0, pdefault(lapl))
+    buf = <char*>emalloc(size+1)
+    try:
+        H5Oget_comment_by_name(loc.id, obj_name, buf, size+1, pdefault(lapl))
+        pstring = buf
+    finally:
+        efree(buf)
+
+    return pstring
+
 # === Visit routines ==========================================================
 
 cdef class _ObjectVisitor:
@@ -221,15 +288,22 @@ def visit(ObjectID loc not None, object func, *,
         func(STRING name, ObjInfo info) => Result
 
     Returning None or a logical False continues iteration; returning
-    anything else aborts iteration and returns that value.
+    anything else aborts iteration and returns that value.  Keywords:
+
+    BOOL info (False)
+        Callbask is func(STRING, Objinfo)
+
+    STRING obj_name (".")
+        Visit a subgroup of "loc" instead
+
+    PropLAID lapl (None)
+        Control how "obj_name" is interpreted
 
-    Keyword-only arguments:
+    INT idx_type (h5.INDEX_NAME)
+        What indexing strategy to use
 
-    * BOOL info (False)              Callbask is func(STRING, Objinfo)
-    * STRING obj_name ("."):         Visit a subgroup of "loc" instead
-    * PropLAID lapl (None):          Control how "obj_name" is interpreted
-    * INT idx_type (h5.INDEX_NAME):  What indexing strategy to use
-    * INT order (h5.ITER_NATIVE):    Order in which iteration occurs
+    INT order (h5.ITER_NATIVE)
+        Order in which iteration occurs
     """
     cdef _ObjectVisitor visit = _ObjectVisitor(func)
     cdef H5O_iterate_t cfunc
diff --git a/h5py/h5p.pyx b/h5py/h5p.pyx
index be70098..3dc7c26 100644
--- a/h5py/h5p.pyx
+++ b/h5py/h5p.pyx
@@ -85,13 +85,14 @@ DEFAULT = None   # In the HDF5 header files this is actually 0, which is an
 
 @sync
 def create(PropClassID cls not None):
-    """ (PropClassID cls) => PropID
+    """(PropClassID cls) => PropID
     
-        Create a new property list as an instance of a class; classes are:
-            FILE_CREATE
-            FILE_ACCESS
-            DATASET_CREATE
-            DATASET_XFER
+    Create a new property list as an instance of a class; classes are:
+
+    - FILE_CREATE
+    - FILE_ACCESS
+    - DATASET_CREATE
+    - DATASET_XFER
     """
     cdef hid_t newid
     newid = H5Pcreate(cls.id)
@@ -107,9 +108,9 @@ cdef class PropID(ObjectID):
 
     @sync
     def equal(self, PropID plist not None):
-        """ (PropID plist) => BOOL
+        """(PropID plist) => BOOL
 
-            Compare this property list (or class) to another for equality.
+        Compare this property list (or class) to another for equality.
         """
         return <bint>(H5Pequal(self.id, plist.id))
 
@@ -132,8 +133,8 @@ cdef class PropClassID(PropID):
     """
         An HDF5 property list class.
 
-        Hashable: Yes, by identifier
-        Equality: Logical H5P comparison
+        * Hashable: Yes, by identifier
+        * Equality: Logical H5P comparison
     """
 
     def __richcmp__(self, object other, int how):
@@ -151,33 +152,33 @@ cdef class PropInstanceID(PropID):
         Base class for property list instance objects.  Provides methods which
         are common across all HDF5 property list classes.
 
-        Hashable: No
-        Equality: Logical H5P comparison
+        * Hashable: No
+        * Equality: Logical H5P comparison
     """
 
     @sync
     def copy(self):
-        """ () => PropList newid
+        """() => PropList newid
 
-            Create a new copy of an existing property list object.
+         Create a new copy of an existing property list object.
         """
         return type(self)(H5Pcopy(self.id))
 
     @sync
     def _close(self):
-        """ ()
+        """()
     
-            Terminate access through this identifier.  You shouldn't have to
-            do this manually, as propery lists are automatically deleted when
-            their Python wrappers are freed.
+        Terminate access through this identifier.  You shouldn't have to
+        do this manually, as propery lists are automatically deleted when
+        their Python wrappers are freed.
         """
         H5Pclose(self.id)
 
     @sync
     def get_class(self):
-        """ () => PropClassID
+        """() => PropClassID
 
-            Determine the class of a property list object.
+        Determine the class of a property list object.
         """
         return PropClassID(H5Pget_class(self.id))
 
@@ -192,15 +193,15 @@ cdef class PropFCID(PropInstanceID):
 
     @sync
     def get_version(self):
-        """ () => TUPLE version_info
+        """() => TUPLE version_info
 
-            Determine version information of various file attributes. 
-            Elements are:
+        Determine version information of various file attributes. 
+        Elements are:
 
-            0:  UINT Super block version number
-            1:  UINT Freelist version number
-            2:  UINT Symbol table version number
-            3:  UINT Shared object header version number
+        0.  UINT Super block version number
+        1.  UINT Freelist version number
+        2.  UINT Symbol table version number
+        3.  UINT Shared object header version number
         """
         cdef herr_t retval
         cdef unsigned int super_
@@ -214,18 +215,18 @@ cdef class PropFCID(PropInstanceID):
 
     @sync
     def set_userblock(self, hsize_t size):
-        """ (INT/LONG size)
+        """(INT/LONG size)
 
-            Set the file user block size, in bytes.  
-            Must be a power of 2, and at least 512.
+        Set the file user block size, in bytes.  
+        Must be a power of 2, and at least 512.
         """
         H5Pset_userblock(self.id, size)
 
     @sync
     def get_userblock(self):
-        """ () => LONG size
+        """() => LONG size
 
-            Determine the user block size, in bytes.
+        Determine the user block size, in bytes.
         """
         cdef hsize_t size
         H5Pget_userblock(self.id, &size)
@@ -233,22 +234,22 @@ cdef class PropFCID(PropInstanceID):
 
     @sync
     def set_sizes(self, size_t addr, size_t size):
-        """ (UINT addr, UINT size)
+        """(UINT addr, UINT size)
 
-            Set the addressing offsets and lengths for objects 
-            in an HDF5 file, in bytes.
+        Set the addressing offsets and lengths for objects 
+        in an HDF5 file, in bytes.
         """
         H5Pset_sizes(self.id, addr, size)
 
     @sync
     def get_sizes(self):
-        """ () => TUPLE sizes
+        """() => TUPLE sizes
 
-            Determine addressing offsets and lengths for objects in an 
-            HDF5 file, in bytes.  Return value is a 2-tuple with values:
+        Determine addressing offsets and lengths for objects in an 
+        HDF5 file, in bytes.  Return value is a 2-tuple with values:
 
-            0:  UINT Address offsets
-            1:  UINT Lengths
+        0.  UINT Address offsets
+        1.  UINT Lengths
         """
         cdef size_t addr
         cdef size_t size
@@ -257,18 +258,18 @@ cdef class PropFCID(PropInstanceID):
 
     @sync
     def set_sym_k(self, unsigned int ik, unsigned int lk):
-        """ (INT ik, INT lk)
+        """(INT ik, INT lk)
 
-            Symbol table node settings.  See the HDF5 docs for H5Pset_sym_k.
+        Symbol table node settings.  See the HDF5 docs for H5Pset_sym_k.
         """
         H5Pset_sym_k(self.id, ik, lk)
 
     @sync
     def get_sym_k(self):
-        """ () => TUPLE settings
+        """() => TUPLE settings
 
-            Determine symbol table node settings.  See the HDF5 docs for
-            H5Pget_sym_k.  Return is a 2-tuple (ik, lk).
+        Determine symbol table node settings.  See the HDF5 docs for
+        H5Pget_sym_k.  Return is a 2-tuple (ik, lk).
         """
         cdef unsigned int ik
         cdef unsigned int lk
@@ -277,17 +278,17 @@ cdef class PropFCID(PropInstanceID):
 
     @sync
     def set_istore_k(self, unsigned int ik):
-        """ (UINT ik)
+        """(UINT ik)
 
-            See hdf5 docs for H5Pset_istore_k.
+        See hdf5 docs for H5Pset_istore_k.
         """
         H5Pset_istore_k(self.id, ik)
     
     @sync
     def get_istore_k(self):
-        """ () => UINT ik
+        """() => UINT ik
 
-            See HDF5 docs for H5Pget_istore_k
+        See HDF5 docs for H5Pget_istore_k
         """
         cdef unsigned int ik
         H5Pget_istore_k(self.id, &ik)
@@ -303,32 +304,34 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def set_layout(self, int layout_code):
-        """ (INT layout_code)
+        """(INT layout_code)
+
+        Set dataset storage strategy; legal values are:
 
-            Set dataset storage strategy; legal values are:
-                h5d.COMPACT
-                h5d.CONTIGUOUS
-                h5d.CHUNKED
+        - h5d.COMPACT
+        - h5d.CONTIGUOUS
+        - h5d.CHUNKED
         """
         H5Pset_layout(self.id, layout_code)
     
     @sync
     def get_layout(self):
-        """ () => INT layout_code
+        """() => INT layout_code
 
-            Determine the storage strategy of a dataset; legal values are:
-                h5d.COMPACT
-                h5d.CONTIGUOUS
-                h5d.CHUNKED
+        Determine the storage strategy of a dataset; legal values are:
+
+        - h5d.COMPACT
+        - h5d.CONTIGUOUS
+        - h5d.CHUNKED
         """
         return <int>H5Pget_layout(self.id)
 
     @sync
     def set_chunk(self, object chunksize):
-        """ (TUPLE chunksize)
+        """(TUPLE chunksize)
 
-            Set the dataset chunk size.  It's up to you to provide 
-            values which are compatible with your dataset.
+        Set the dataset chunk size.  It's up to you to provide 
+        values which are compatible with your dataset.
         """
         cdef int rank
         cdef hsize_t* dims
@@ -346,9 +349,9 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def get_chunk(self):
-        """ () => TUPLE chunk_dimensions
+        """() => TUPLE chunk_dimensions
 
-            Obtain the dataset chunk size, as a tuple.
+        Obtain the dataset chunk size, as a tuple.
         """
         cdef int rank
         cdef hsize_t *dims
@@ -366,11 +369,11 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def set_fill_value(self, ndarray value not None):
-        """ (NDARRAY value)
+        """(NDARRAY value)
 
-            Set the dataset fill value.  The object provided should be an
-            0-dimensional NumPy array; otherwise, the value will be read from
-            the first element.
+        Set the dataset fill value.  The object provided should be an
+        0-dimensional NumPy array; otherwise, the value will be read from
+        the first element.
         """
         cdef TypeID tid
 
@@ -380,11 +383,11 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def get_fill_value(self, ndarray value not None):
-        """ (NDARRAY value)
+        """(NDARRAY value)
 
-            Read the dataset fill value into a NumPy array.  It will be
-            converted to match the array dtype.  If the array has nonzero
-            rank, only the first element will contain the value.
+        Read the dataset fill value into a NumPy array.  It will be
+        converted to match the array dtype.  If the array has nonzero
+        rank, only the first element will contain the value.
         """
         cdef TypeID tid
 
@@ -394,15 +397,14 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def set_fill_time(self, int fill_time):
-        """ (INT fill_time)
+        """(INT fill_time)
 
-            Define when fill values are written to the dataset.  Legal
-            values (defined in module h5d) are:
+        Define when fill values are written to the dataset.  Legal
+        values (defined in module h5d) are:
 
-            h5d.FILL_TIME_ALLOC    Write fill values at storage allocation time
-            h5d.FILL_TIME_NEVER    Never write fill values
-            h5d.FILL_TIME_IFSET    Write fill values at allocation time only
-                                   if a user-defined value is being used.
+        - h5d.FILL_TIME_ALLOC
+        - h5d.FILL_TIME_NEVER
+        - h5d.FILL_TIME_IFSET
         """
         H5Pset_fill_time(self.id, <H5D_fill_time_t>fill_time)
 
@@ -410,13 +412,12 @@ cdef class PropDCID(PropInstanceID):
     def get_fill_time(self):
         """ () => INT
 
-            Determine when fill values are written to the dataset.  Legal
-            values (defined in module h5d) are:
+        Determine when fill values are written to the dataset.  Legal
+        values (defined in module h5d) are:
 
-            h5d.FILL_TIME_ALLOC    Write fill values at storage allocation time
-            h5d.FILL_TIME_NEVER    Never write fill values
-            h5d.FILL_TIME_IFSET    Write fill values at allocation time only
-                                   if a user-defined value is being used.
+        - h5d.FILL_TIME_ALLOC
+        - h5d.FILL_TIME_NEVER
+        - h5d.FILL_TIME_IFSET
         """
         cdef H5D_fill_time_t fill_time
         H5Pget_fill_time(self.id, &fill_time)
@@ -427,62 +428,66 @@ cdef class PropDCID(PropInstanceID):
     
     @sync
     def set_deflate(self, unsigned int level=5):
-        """ (UINT level=5)
+        """(UINT level=5)
 
-            Enable DEFLATE (gzip) compression, at the given level.
-            Valid levels are 0-9, default is 5.
+        Enable deflate (gzip) compression, at the given level.
+        Valid levels are 0-9, default is 5.
         """
         H5Pset_deflate(self.id, level)
 
     @sync
     def set_fletcher32(self):
-        """ ()
+        """()
 
-            Enable Fletcher32 error correction on this list.
+        Enable Fletcher32 error correction on this list.
         """
         H5Pset_fletcher32(self.id)
 
     @sync
     def set_shuffle(self):
-        """ ()
+        """()
 
-            Enable to use of the shuffle filter.  Use this immediately before 
-            the DEFLATE filter to increase the compression ratio.
+        Enable to use of the shuffle filter.  Use this immediately before 
+        the deflate filter to increase the compression ratio.
         """
         H5Pset_shuffle(self.id)
 
     @sync
     def set_szip(self, unsigned int options, unsigned int pixels_per_block):
-        """ (UINT options, UINT pixels_per_block)
+        """(UINT options, UINT pixels_per_block)
 
-            Enable SZIP compression.  See the HDF5 docs for argument meanings, 
-            and general restrictions on use of the SZIP format.
+        Enable SZIP compression.  See the HDF5 docs for argument meanings, 
+        and general restrictions on use of the SZIP format.
         """
         H5Pset_szip(self.id, options, pixels_per_block)
 
     @sync
     def get_nfilters(self):
-        """ () => INT
+        """() => INT
 
-            Determine the number of filters in the pipeline.
+        Determine the number of filters in the pipeline.
         """
         return H5Pget_nfilters(self.id)
 
     @sync
     def set_filter(self, int filter_code, unsigned int flags=0, object values=None):
-        """ (INT filter_code, UINT flags=0, TUPLE values=None)
+        """(INT filter_code, UINT flags=0, TUPLE values=None)
 
-            Set a filter in the pipeline.  Params are:
+        Set a filter in the pipeline.  Params are:
 
-            filter_code:
-                h5z.FILTER_DEFLATE
-                h5z.FILTER_SHUFFLE
-                h5z.FILTER_FLETCHER32
-                h5z.FILTER_SZIP
+        filter_code
+            One of the following:
 
-            flags:  Bit flags (h5z.FLAG_*) setting filter properties
+            - h5z.FILTER_DEFLATE
+            - h5z.FILTER_SHUFFLE
+            - h5z.FILTER_FLETCHER32
+            - h5z.FILTER_SZIP
 
-            values: TUPLE of UINTS giving auxiliary data for the filter.
+        flags
+            Bit flags (h5z.FLAG_*) setting filter properties
+
+        values
+            TUPLE of UINTs giving auxiliary data for the filter
         """
         cdef size_t nelements
         cdef unsigned int *cd_values
@@ -508,24 +513,24 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def all_filters_avail(self):
-        """ () => BOOL
+        """() => BOOL
 
-            Determine if all the filters in the pipelist are available to
-            the library.
+        Determine if all the filters in the pipelist are available to
+        the library.
         """
         return <bint>(H5Pall_filters_avail(self.id))
 
     @sync
     def get_filter(self, int filter_idx):
-        """ (UINT filter_idx) => TUPLE filter_info
+        """(UINT filter_idx) => TUPLE filter_info
 
-            Get information about a filter, identified by its index.
+        Get information about a filter, identified by its index.  Tuple
+        elements are:
 
-            Tuple entries are:
-            0: INT filter code (h5z.FILTER_*)
-            1: UINT flags (h5z.FLAG_*)
-            2: TUPLE of UINT values; filter aux data (16 values max)
-            3: STRING name of filter (256 chars max)
+        0. INT filter code (h5z.FILTER_*)
+        1. UINT flags (h5z.FLAG_*)
+        2. TUPLE of UINT values; filter aux data (16 values max)
+        3. STRING name of filter (256 chars max)
         """
         cdef list vlist
         cdef int filter_code
@@ -551,11 +556,11 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def _has_filter(self, int filter_code):
-        """ (INT filter_code)
+        """(INT filter_code)
 
-            Slow & stupid method to determine if a filter is used in this
-            property list.  Used because the HDF5 function H5Pget_filter_by_id
-            is broken.
+        Slow & stupid method to determine if a filter is used in this
+        property list.  Used because the HDF5 function H5Pget_filter_by_id
+        is broken.
         """
         cdef int nfilters
         nfilters = self.get_nfilters()
@@ -566,15 +571,15 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def get_filter_by_id(self, int filter_code):
-        """ (INT filter_code) => TUPLE filter_info or None
+        """(INT filter_code) => TUPLE filter_info or None
 
-            Get information about a filter, identified by its code (one
-            of h5z.FILTER_*).  If the filter doesn't exist, returns None.
+        Get information about a filter, identified by its code (one
+        of h5z.FILTER_*).  If the filter doesn't exist, returns None.
+        Tuple elements are:
 
-            Tuple entries are:
-            0: UINT flags (h5z.FLAG_*)
-            1: TUPLE of UINT values; filter aux data (16 values max)
-            2: STRING name of filter (256 chars max)
+        0. UINT flags (h5z.FLAG_*)
+        1. TUPLE of UINT values; filter aux data (16 values max)
+        2. STRING name of filter (256 chars max)
         """
         cdef list vlist
         cdef unsigned int flags
@@ -603,21 +608,22 @@ cdef class PropDCID(PropInstanceID):
 
     @sync
     def remove_filter(self, int filter_class):
-        """ (INT filter_class)
+        """(INT filter_class)
 
-            Remove a filter from the pipeline.  The class code is one of 
-            h5z.FILTER_*.
+        Remove a filter from the pipeline.  The class code is one of 
+        h5z.FILTER_*.
         """
         H5Premove_filter(self.id, <H5Z_filter_t>filter_class)
 
     @sync
     def fill_value_defined(self):
-        """ () => INT fill_status
+        """() => INT fill_status
+
+        Determine the status of the dataset fill value.  Return values are:
 
-            Determine the status of the dataset fill value.  Return values are:
-              h5d.FILL_VALUE_UNDEFINED
-              h5d.FILL_VALUE_DEFAULT
-              h5d.FILL_VALUE_USER_DEFINED
+        - h5d.FILL_VALUE_UNDEFINED
+        - h5d.FILL_VALUE_DEFAULT
+        - h5d.FILL_VALUE_USER_DEFINED
         """
         cdef H5D_fill_value_t val
         H5Pfill_value_defined(self.id, &val)
@@ -634,29 +640,29 @@ cdef class PropFAID(PropInstanceID):
 
     @sync
     def set_fclose_degree(self, int close_degree):
-        """ (INT close_degree)
+        """(INT close_degree)
 
-            Set the file-close degree, which determines library behavior when
-            a file is closed when objects are still open.  Legal values:
+        Set the file-close degree, which determines library behavior when
+        a file is closed when objects are still open.  Legal values:
 
-            * h5f.CLOSE_WEAK
-            * h5f.CLOSE_SEMI
-            * h5f.CLOSE_STRONG
-            * h5f.CLOSE_DEFAULT
+        * h5f.CLOSE_WEAK
+        * h5f.CLOSE_SEMI
+        * h5f.CLOSE_STRONG
+        * h5f.CLOSE_DEFAULT
         """
         H5Pset_fclose_degree(self.id, <H5F_close_degree_t>close_degree)
 
     @sync
     def get_fclose_degree(self):
-        """ () => INT close_degree
+        """() => INT close_degree
+        - h5fd.
+        Get the file-close degree, which determines library behavior when
+        a file is closed when objects are still open.  Legal values:
 
-            Get the file-close degree, which determines library behavior when
-            a file is closed when objects are still open.  Legal values:
-
-            * h5f.CLOSE_WEAK
-            * h5f.CLOSE_SEMI
-            * h5f.CLOSE_STRONG
-            * h5f.CLOSE_DEFAULT
+        * h5f.CLOSE_WEAK
+        * h5f.CLOSE_SEMI
+        * h5f.CLOSE_STRONG
+        * h5f.CLOSE_DEFAULT
         """
         cdef H5F_close_degree_t deg
         H5Pget_fclose_degree(self.id, &deg)
@@ -664,24 +670,29 @@ cdef class PropFAID(PropInstanceID):
 
     @sync
     def set_fapl_core(self, size_t increment=1024*1024, hbool_t backing_store=0):
-        """ (UINT increment=1M, BOOL backing_store=False)
+        """(UINT increment=1M, BOOL backing_store=False)
+
+        Use the h5fd.CORE (memory-resident) file driver.
 
-            Use the CORE (memory-resident) file driver.
-            increment:      Chunk size for new memory requests (default 1 meg)
-            backing_store:  If True, write the memory contents to disk when
-                            the file is closed.
+        increment
+            Chunk size for new memory requests (default 1 meg)
+
+        backing_store
+            If True, write the memory contents to disk when
+            the file is closed.
         """
         H5Pset_fapl_core(self.id, increment, backing_store)
 
     @sync
     def get_fapl_core(self):
-        """ () => TUPLE core_settings
+        """() => TUPLE core_settings
+
+        Determine settings for the h5fd.CORE (memory-resident) file driver.
+        Tuple elements are:
 
-            Determine settings for the CORE (memory-resident) file driver.
-            Tuple entries are:
-            0: UINT "increment": Chunk size for new memory requests
-            1: BOOL "backing_store": If True, write the memory contents to 
-                                     disk when the file is closed.
+        0. UINT "increment": Chunk size for new memory requests
+        1. BOOL "backing_store": If True, write the memory contents to 
+           disk when the file is closed.
         """
         cdef size_t increment
         cdef hbool_t backing_store
@@ -690,11 +701,15 @@ cdef class PropFAID(PropInstanceID):
 
     @sync
     def set_fapl_family(self, hsize_t memb_size, PropID memb_fapl=None):
-        """ (UINT memb_size, PropFAID memb_fapl=None)
+        """(UINT memb_size, PropFAID memb_fapl=None)
+
+        Set up the family driver.
+
+        memb_size
+            Member file size
 
-            Set up the family driver.
-            memb_size:  Member file size
-            memb_fapl:  File access property list for each member access
+        memb_fapl
+            File access property list for each member access
         """
         cdef hid_t plist_id
         plist_id = pdefault(memb_fapl)
@@ -702,11 +717,12 @@ cdef class PropFAID(PropInstanceID):
 
     @sync
     def get_fapl_family(self):
-        """ () => TUPLE info
+        """() => TUPLE info
 
-            Determine family driver settings. Tuple values are:
-            0: UINT memb_size
-            1: PropFAID memb_fapl or None
+        Determine family driver settings. Tuple values are:
+
+        0. UINT memb_size
+        1. PropFAID memb_fapl or None
         """
         cdef hid_t mfapl_id
         cdef hsize_t msize
@@ -722,67 +738,68 @@ cdef class PropFAID(PropInstanceID):
 
     @sync
     def set_fapl_log(self, char* logfile, unsigned int flags, size_t buf_size):
-        """ (STRING logfile, UINT flags, UINT buf_size)
+        """(STRING logfile, UINT flags, UINT buf_size)
 
-            Enable the use of the logging driver.  See the HDF5 documentation
-            for details.  Flag constants are stored in module h5fd.
+        Enable the use of the logging driver.  See the HDF5 documentation
+        for details.  Flag constants are stored in module h5fd.
         """
         H5Pset_fapl_log(self.id, logfile, flags, buf_size)
 
     @sync
     def set_fapl_sec2(self):
-        """ ()
+        """()
 
-            Select the "section-2" driver (h5fd.SEC2).
+        Select the "section-2" driver (h5fd.SEC2).
         """
         H5Pset_fapl_sec2(self.id)
 
     @sync
     def set_fapl_stdio(self):
-        """ ()
+        """()
 
-            Select the "stdio" driver (h5fd.STDIO)
+        Select the "stdio" driver (h5fd.STDIO)
         """
         H5Pset_fapl_stdio(self.id)
 
     @sync
     def get_driver(self):
-        """ () => INT driver code
-
-            Return an integer identifier for the driver used by this list.
-            Although HDF5 implements these as full-fledged objects, they are
-            treated as integers by Python.  Built-in drivers identifiers are
-            listed in module h5fd; they are:
-                CORE
-                FAMILY
-                LOG
-                MPIO
-                MULTI
-                SEC2
-                STDIO
+        """() => INT driver code
+
+        Return an integer identifier for the driver used by this list.
+        Although HDF5 implements these as full-fledged objects, they are
+        treated as integers by Python.  Built-in drivers identifiers are
+        listed in module h5fd; they are:
+
+        - h5fd.CORE
+        - h5fd.FAMILY
+        - h5fd.LOG
+        - h5fd.MPIO
+        - h5fd.MULTI
+        - h5fd.SEC2
+        - h5fd.STDIO
         """
         return H5Pget_driver(self.id)
 
     @sync
     def set_cache(self, int mdc, int rdcc, size_t rdcc_nbytes, double rdcc_w0):
-        """ (INT mdc, INT rdcc, UINT rdcc_nbytes, DOUBLE rdcc_w0)
+        """(INT mdc, INT rdcc, UINT rdcc_nbytes, DOUBLE rdcc_w0)
 
-            Set the metadata (mdc) and raw data chunk (rdcc) cache properties.
-            See the HDF5 docs for a full explanation.
+        Set the metadata (mdc) and raw data chunk (rdcc) cache properties.
+        See the HDF5 docs for a full explanation.
         """
         H5Pset_cache(self.id, mdc, rdcc, rdcc_nbytes, rdcc_w0)
 
     @sync
     def get_cache(self):
-        """ () => TUPLE cache info
+        """() => TUPLE cache info
 
-            Get the metadata and raw data chunk cache settings.  See the HDF5
-            docs for element definitions.  Return is a 4-tuple with entries:
+        Get the metadata and raw data chunk cache settings.  See the HDF5
+        docs for element definitions.  Return is a 4-tuple with entries:
 
-            1. INT mdc              Number of metadata objects
-            2. INT rdcc             Number of raw data chunks
-            3. UINT rdcc_nbytes     Size of raw data cache
-            4. DOUBLE rdcc_w0       Preemption policy for data cache.
+        1. INT mdc:              Number of metadata objects
+        2. INT rdcc:             Number of raw data chunks
+        3. UINT rdcc_nbytes:     Size of raw data cache
+        4. DOUBLE rdcc_w0:       Preemption policy for data cache.
         """
         cdef int mdc, rdcc
         cdef size_t rdcc_nbytes
diff --git a/setup.py b/setup.py
index 43e10ab..84c8e47 100644
--- a/setup.py
+++ b/setup.py
@@ -200,14 +200,7 @@ class cybuild(build):
             if not op.exists(self.hdf5):
                 fatal('Specified HDF5 directory "%s" does not exist' % self.hdf5)
 
-        if self.api is None:
-            # Try to guess the installed HDF5 version
-            self.api = self.get_hdf5_version()
-            if self.api is None:
-                warn("Can't determine HDF5 version, assuming 1.6 (use --api= to override)")
-                self.api = 16
-        else:
-            # User specified the API level
+        if self.api is not None:
             self._default = False
             try:
                 self.api = int(self.api)
@@ -226,6 +219,12 @@ class cybuild(build):
         else:
             print "=> Creating new build configuration"
 
+            # Try to guess the installed HDF5 version
+            self.api = self.get_hdf5_version()
+            if self.api is None:
+                warn("Can't determine HDF5 version, assuming 1.6 (use --api= to override)")
+                self.api = 16
+
             modules = MODULES[self.api]
             creator = ExtensionCreator(self.hdf5)
             extensions = [creator.create_extension(x) for x in modules]            
@@ -427,7 +426,7 @@ class cyclean(Command):
 
         fnames = [ op.join(SRC_PATH, x+'.dep') for x in allmodules ] + \
                  [ op.join(SRC_PATH, x+'.c') for x in allmodules ] + \
-                 [ op.join(SRC_PATH, 'config.pxi')]
+                 [ op.join(SRC_PATH, 'config.pxi'), 'buildconf.pickle']
 
         for name in fnames:
             try:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list