Python Interface to MAPL: Difference between revisions

No edit summary
No edit summary
Line 12: Line 12:


  if __name == "__main__":
  if __name == "__main__":
 
  #  Instantiate the root component
  #  Instantiate the root component
  #  ------------------------------
  #  ------------------------------
     gcs = MAPL.GridComp(lib='/some/path/libGEOSana.so')
     gcs = MAPL.GridComp(lib='/some/path/libGEOSana.so')
 
  #  Instantiate MAPL
  #  Instantiate MAPL
  #  ----------------
  #  ----------------
     mapl = MAPL(root=gcs)
     mapl = MAPL(root=gcs)
 
  #  Run the cap
  #  Run the cap
  #  -----------
  #  -----------
Line 31: Line 31:
  import MAPL
  import MAPL
  import GEOSgcs  # the GEOSgcs component is implemented here
  import GEOSgcs  # the GEOSgcs component is implemented here
if __name == "__main__":
   
   
if __name == "__main__":
  #  Instantiate the Python root component
  #  Instantiate the Python root component
  #  -------------------------------------
  #  -------------------------------------
     gcs = GEOSgcs(rc='gcs.rc')
     gcs = GEOSgcs(rc='gcs.rc')
 
  #  Instantiate MAPL
  #  Instantiate MAPL
  #  ----------------
  #  ----------------
     mapl = MAPL(root=gcs)
     mapl = MAPL(root=gcs)
 
  #  Run the cap
  #  Run the cap
  #  -----------
  #  -----------