Package saga
[frames] | no frames]

Package saga

source code

This is the documentation for the Python API bindings for the SAGA C++ reference implementation (http://www.saga-project.org). They provide a thin Python wrapper on top of the native SAGA C++ API. This allows you to use SAGA and all of its middleware adaptors from within your Python code.

Here's a simple example how to submit a job using SAGA and Python:

 import saga 
  
 try: 
   # create an "echo 'hello, world' job" 
   jd = saga.job.description() 
   jd.set_attribute("Executable", "/bin/echo") 
   jd.set_vector_attribute("Arguments", ["Hello, World!"]) 
   jd.set_attribute("Interactive", "True") 
  
   # connect to the local job service 
   js = saga.job.service("fork://localhost"); 
  
   # submit the job 
   job = js.create_job(jd) 
   job.run() 
  
   # wait for the job to complete 
   job.wait(-1) 
    
   # print the job's output 
   output = job.get_stdout() 
   print output.read() 
    
 except saga.exception, e: 
   print "ERROR: "  
   for err in e.get_all_messages(): 
     print err 

Unfortunately, the bindings are mostly auto-generated from the C++ code, that's why the documentation is rather minimalistic. If you're looking for more details on a specific class or method, you should refer to the C++ API documentation which can be found here: http://www.saga-project.org/documentation/python

Submodules

Classes
  exception
  not_implemented
  parameter_exception
  incorrect_url
  bad_parameter
  state_exception
  already_exists
  does_not_exist
  incorrect_state
  timeout
  security_exception
  permission_denied
  authorization_failed
  authentication_failed
  no_success
Variables
  required_ver_maj = '2'
  required_ver_min = '7'
  required_ver_sub = '1'
  python_version = '2.7.1'
  python_ver_maj = '2'
  python_ver_min = '7'
  python_ver_sub = '1'
  SAGA_LOG = 0
  All = saga._engine.permission.All
  Exec = saga._engine.permission.Exec
  None = saga._engine.permission.None
  Owner = saga._engine.permission.Owner
  Query = saga._engine.permission.Query
  Read = saga._engine.permission.Read
  Write = saga._engine.permission.Write
  __package__ = 'saga'