[Gmsh] Python API and Spyder

paul francedixhuit paul18fr at gmail.com
Wed Apr 1 11:57:51 CEST 2020


thanks for the answer,
"To break the loop simply close the Gmsh window" as I said, I cannot close
gmsh (cross or ctrl+q) and I need to close spyder so that gmsh finally
closes itself; still trying to figure out why

Paul

Le mer. 1 avr. 2020 à 11:32, Christophe Geuzaine <cgeuzaine at uliege.be> a
écrit :

>
>
> > On 31 Mar 2020, at 11:59, paul francedixhuit <paul18fr at gmail.com> wrote:
> >
> > Hi
> >
> > One would say this is not the "normal" use of the Gmsh API, but for my
> developments under Python, I'm always coding under Spyder IDE (and I would
> like to continue if possible).
> >
> > I've been noticing that when Gmsh GUI needs to be opened (t8.py case for
> example), then it becomes not possible to close it and it's necessary to
> close Spyder as well (of course it works fine in commande line).
> >
> > Can we imagine something like gmsh.close()?
> >
> > In addition as I've ever said in a previous post, Gmsh API can be used:
> >       • either by defining the PYTHONPATH as described in the doc (I've
> defined it in the .bashrc file)
> >       • either by explicitly implementing it at the beginning of the
> Python file (see sys.path.append)
> > Find some screenshots in attachment
> >
>
> When you call gmsh.fltk.run(), FLTK basically runs a while(1) loop waiting
> for graphical interface events. To break the loop simply close the Gmsh
> window.
>
> You can also run the event loop yourself in Python: don't call
> gmsh.fltk.run(), but gmsh.fltk.wait() each time to want to wait for an
> event. See demos/curstom_gui.py for a complete example.
>
> Christophe
>
> > Stay at home
> >
> > Paul
> >
> >
> <screenshot2.png><screenshot1.png><screenshot3.png>_______________________________________________
> > gmsh mailing list
> > gmsh at onelab.info
> > http://onelab.info/mailman/listinfo/gmsh
>
>> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200401/df1727fa/attachment.html>


More information about the gmsh mailing list