Creating an instance of InstantTerra API

What is an "instance" ?

An instance is an access to InstantTerra software. It controls InstantTerra with the Python script.

The Python code can be executed with the command prompt or by running a Python script.

Opening an instance

# Import InstantTerra class from the wysilab package
from wysilab import InstantTerra

# Start the instance
it = InstantTerra()

Initially, we need to import the class InstantTerra from the package wysilab.

Once done, create the instance : it = InstantTerra().


This example uses a variable named it, but you can use any name that is not a Python keyword (i.e. instant = InstantTerra()).

The instance is fully initialized when the InstantTerra window is open.

Closing an instance

# Close the instance

To close our instance correctly, simply call the method close().

This closes the InstantTerra window automatically.

Copyright © 2022 · All Rights Reserved · Wysilab