I’m tring to use the Python API for Trelis / Cubit
I do not know if I do it well
I run python in a terminal (Using Xubuntu 14.04) :
import cubit
cubit.init('')
Is that right ?
cause after that, it leads to the error :
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread
QObject::startTimer: QTimer can only be used with threads started with QThread
...Interrupt Detected. CUBIT Exiting...
Have you solution to fix the issue, so I can run Cubit through a Python terminal ?
Thanks !
Try initializing cubit with an empty list (the cubit.init function requires a list). Instead of
cubit.init(’’)
try
cubit.init([’’])
When I try to do the init with an empty string on my Debian machine, python crashes. When I do it with the empty list in the second example, it imports fine.
If you want the GUI, probably your best bet would be to start Trelis like normal, then import the other python modules you want to use into Trelis’ python interpreter.
You can set the PYTHONPATH environment variable to the directory containing
your installation. For example