Interpreters

Interpreters#

There are several ways to use the xara package:

  • The standard way to use xara is to import it into your Python script and create an instance of the xara.Model class.

  • To execute Tcl procedures from a Python script, just create an instance of the xara.Model class and call its xara.Model.eval() method:

    model = xara.Model()
    model.eval("model Basic -ndm 2")
    model.eval("node 1 0.0 0.0")
    
  • To start an interactive interpreter run the shell command:

    python -m xara
    
  • The xara package exposes a compatibility layer that exactly reproduces the OpenSeesPy functions, but does so without mandating a single global program state. To run OpenSeesPy scripts, just change the import:

    import openseespy.opensees
    

    to

    import opensees.openseespy