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.
# 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()
.
Tip
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.
# Close the instance
it.close()
To close our instance correctly, simply call the method
close()
.
This closes the InstantTerra window automatically.
Copyright © 2022 · All Rights Reserved · Wysilab