Skip to content
Snippets Groups Projects
Commit da76e4c6 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH: start progress for python. (stop for now)

parent c60abe52
Branches
Tags
No related merge requests found
# -*- coding: utf-8 -*-
#
# Example on the use of the Smoothing
#
from sys import argv
import otbApplication as otb
import thread
class PythonApplicationClass:
"Python application class"
def __init__(self, key):
self.m_App = otb.Registry.CreateApplication(key)
def SetParameterString( self, key, value ):
self.m_App.SetParameterString(key, value)
def SetParameterFloat( self, key, value ):
self.m_App.SetParameterFloat(key, value)
def ExecuteAndWriteOutput( self ):
thread.start_new_thread(self.m_App.ExecuteAndWriteOutput())
self.WatchThread();
return
def WatchThread( self ):
print "je watch"
return
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
# Example on the use of the Rescale # Example on the use of the Rescale
# #
from sys import argv from sys import argv
import otbApplication as otb import PythonApplication
#import otbApplication as otb
print "Available applications : " + str(otb.Registry.GetAvailableApplications()) app = PythonApplication.PythonApplicationClass("Rescale")
print app.m_App.GetParametersKeys()
app.SetParameterString("in", argv[1])
app = otb.Registry.CreateApplication("Rescale")
print app.GetParametersKeys()
app.SetParameterString("in", argv[1]) app.SetParameterString("in", argv[1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment