← Back to team overview

yade-users team mailing list archive

Re: Running .py script as .xml files from the command line

 

> Just do not import qt module to Yade in your script.
Currently, we open qt.Controller() when script is being run, so that
there is some possibility of interaction. If there is no script, no
controller is shown either, as you can do it pressing F12.

You can suppress opening any graphics by unsetting DISPLAY env. variable
(which is the standard way for any graphical app in Unix) or setting it
to empty string, thus:

  DISPLAY= yade-trunk script.py

Equivalently, running yade-trunk -n will suppress graphics as well.

Then calling qt.Controller() will raise RuntimeError; make sure it is in
a try/except block in your script, otherwise your script will fail.

HTH, vaclav

>         The option -f in the command line does not support .py files!
I have no -f option (unless you mean -n discussed above, which should
work just fine).






References