-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
97 lines (66 loc) · 2.77 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
SAGA Python Bindings
- The Simple API for Grid Applications -
<http://www.saga-project.org/python>
WHAT IS THIS?
These are the Python API bindings for the SAGA C++ reference
implementation. It provides a thin Python wrapper on top of
the native SAGA C++ API. This allows you to use saga and all
of its middleware adaptors with Python!
LATEST VERSION
Details of the latest version can be found on the project page:
http://www.saga-project.org/python
INSTALLATION - Read the INSTALL file
DOCUMENTATION
The documentation available as of the date of this release is included
in HTML format in the docs/apidoc directory. The most up-to-date
documentation for the current release can be found on the project page:
http://www.saga-project.org/documentation/python/
QUICKSTART
install python bindings: see INSTALL for details
> export SAGA_LOCATION=/path/to/saga/core/installation
> ./configure
> make
> make install
using python bindings in python interpreter
(attention: python version depending on your system)
> export PYTHONPATH=$SAGA_LOCATION/lib/python2.6.5/site-packages
> python
>>> import saga
>>> my_jd = saga.job.description()
>>> my_jd.executable = "/bin/hostname"
>>> my_jd.output = "stdout.txt"
>>> my_js = saga.job.service("fork://localhost/");
>>> my_job = my_js.create_job(my_jd)
>>> my_job.run()
>>> my_job.wait(-1)
>>> quit()
> cat stdout.txt
boskop
using python bindings in scripts
> export PYTHONPATH=$SAGA_LOCATION/lib/python2.6.5/site-packages
> python examples/job/simple_example.py
> cat stdout.txt
boskop
KNOWN PROBLEMS
On OSX, the python bindings seem to compile and link fine against MacPort
installations of boost and python. At runtime, however, the dynamic loader
seems to somtimes prefer the systems python libraries. That may cause the
following error:
$ python
# import saga
# saga.url('bla')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() should return None, not 'NoneType'
This can be manually fixed by
$ install_name_tool -change
/System/Library/Frameworks/Python.framework/Versions/2.7/Python \
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python \
_engine.so
LICENSING
The Pyton Bindings are released under the Boost Software License 1.0.
Please see the LICENSE file for details.
CONTACT
If you want to be informed about new code releases, bug fixes,
security fixes, general news and information about SAGA, subscribe
to the saga-users mailing list at http://www.saga-project.org/mailinglists.