Commit 93d4f601 authored by gsell's avatar gsell

src/Python

- wrappers for reading/writing attributes
parent 20cd5aae
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
%include numpy.i %include numpy.i
%include cstring.i %include cstring.i
%include cpointer.i
%apply unsigned long int { h5_prop_t }; %apply unsigned long int { h5_prop_t };
%apply unsigned long int { h5_file_t }; %apply unsigned long int { h5_file_t };
...@@ -30,9 +31,11 @@ ...@@ -30,9 +31,11 @@
%cstring_bounded_output(char* const attrib_name, 256); %cstring_bounded_output(char* const attrib_name, 256);
extern h5_err_t H5GetFileAttribInfo ( extern h5_err_t H5GetFileAttribInfo (
const h5_file_t, const h5_file_t,
const h5_id_t, const h5_size_t,
char* const attrib_name, const h5_size_t l_attrib_name=256, char* const attrib_name,
h5_int64_t *OUTPUT, h5_size_t *OUTPUT); const h5_size_t l_attrib_name=256,
h5_int64_t *OUTPUT,
h5_size_t *OUTPUT);
extern h5_err_t H5GetFileAttribInfoByName ( extern h5_err_t H5GetFileAttribInfoByName (
const h5_file_t, const h5_file_t,
...@@ -49,6 +52,26 @@ extern h5_err_t H5ReadFileAttribString ( ...@@ -49,6 +52,26 @@ extern h5_err_t H5ReadFileAttribString (
const h5_file_t f, const h5_file_t f,
const char* const name, const char* const name,
char* const buffer); char* const buffer);
extern h5_err_t H5GetStepAttribInfo (
const h5_file_t,
const h5_size_t,
char* const attrib_name,
const h5_size_t l_attrib_name=256,
h5_int64_t *OUTPUT,
h5_size_t *OUTPUT);
extern h5_err_t H5GetStepAttribInfoByName (
const h5_file_t,
const char* const name,
h5_int64_t *OUTPUT, h5_size_t *OUTPUT);
extern h5_err_t H5GetStepAttribName (
const h5_file_t,
const h5_id_t,
char* const attrib_name,
const h5_size_t l_attrib_name=256);
%clear char* const attrib_name; %clear char* const attrib_name;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
......
#TODO: use the rewrite to swap depending whether mpi is there are not.. #TODO: use the rewrite to swap depending whether mpi is there are not..
import numpy import numpy
import sys
import H5hut as H5hut_rewrite import H5hut as H5hut_rewrite
from H5hut import * from H5hut import *
...@@ -95,8 +96,3 @@ def __update_types__(): ...@@ -95,8 +96,3 @@ def __update_types__():
sys.modules["H5hut"].__dict__[__new_func__] = locals()[__new_func__] sys.modules["H5hut"].__dict__[__new_func__] = locals()[__new_func__]
__update_types__() __update_types__()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment