data = [1,2,3,4,5]
path="group/data"


save_dataset(path, data)
read =load_data(path)

print read.tolist()

#plot(read)


data = [ [1,2,3,4,5],  [2,3,4,5,6],  [3,4,5,6,7]]
path="group/data2"


save_dataset(path, data)
set_attribute(path, "AttrString", "Value")
set_attribute(path, "AttrInteger", 1)
set_attribute(path, "AttrDouble", 2.0)
set_attribute(path, "AttrBoolean", True)

read =load_data(path)

print read.tolist()

plot(read)

path = "group/data3"
create_dataset(path, 'i')
for i in range(10):
    save_data_item(path,i)    


path = "group/data4"
create_dataset(path, 'd', False, (0,0))
for row in data:
    save_data_item(path, row)    

path = "group/data5"
names = ["a", "b", "c", "d"]
types = ["d", "d", "d", "[d"]
lenghts = [0,0,0,5]
dims = [0,0,0,0]


data = [    [1,2,3,[0,1,2,3,4]],  
            [2,3,4,[3,4,5,6,7]],  
            [3,4,5,[6,7,8,9,4]]    ]

create_table(path, names, types, lenghts, dims)
for row in data:
    save_table_item(path, row)   
flush_data() 

read =load_data(path)
print read
