~ubuntu-branches/ubuntu/trusty/picviz/trusty

« back to all changes in this revision

Viewing changes to src/libpicviz/tests/bindings/python/ex1.py

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2009-03-30 10:42:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090330104208-j095obwkp574t1lm
Tags: upstream-0.5
ImportĀ upstreamĀ versionĀ 0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
import picviz
 
4
 
 
5
filename = "test1.pcv"
 
6
lnb = 0
 
7
dnb = 0
 
8
 
 
9
print "Picviz Python API version: %s" % picviz.Version()
 
10
print "Loading file '%s'" % filename
 
11
data = picviz.ParseImage(filename, None)
 
12
 
 
13
 
 
14
print "The image height is %d " % data['height']
 
15
print "There are %d axes" % data['axes_number']
 
16
for line in data['lines']:
 
17
        print str(line[1]['y'])
 
18
 
 
19
print "Whole data structure:"
 
20
print str(data)
 
21