python - How to avoid Gdk-ERROR caused by Tkinter, visual, and ipython? -


The following lines stop the iPhathon with an accident as soon as I close the teak-window instance a is, .

  import view, tunicator A = tkneter Comment () a.update () display = visual.display (title = "hello") display.exit = 0 visual.sphere ()  

If I stop displaying the first scene, The whole terminal crashes. I'm going to run on every 8 8-10. Is this a bug or am I doing something wrong? If this is a bug: Is this a great way to escape?

Cheers, Philip

Did you -gthread -tk command-line switch?

From ipython --help :

 -gthread, -qthread, -q4thread, -wthread, -pylab Only one of these can be given, And this can only be given as the first option to be passed to the ipathon (it will have no effect at any other place). They provide threading support for GTK, QT and WXWidgets Toolkit, and for matplotlib libraries. With any of the first four options, the ipathon runs a different thread for the operation of the graphical toolkit, so that you can open and control the graphical elements within an ipathon command line without blocking. All four basically provide the same functionality, respectively for GTK, QT3, QT4 and WXWidgets (via their Python interface). Note that with -the -ths, you can use extra-wxversion option for requesting a specific version of wx to use. For this you must have the 'wxversion' python module installed, which is currently part of wxPython distribution. If the pelvis has been given, the ipython loads special support for the Matte-Plotib Library (http://matplotlib.sourceforge.net), which allows the interactive use of any backend as defined in the user's .matplotlibrc file gives. If the choice of matlatib backend is required, it automatically activates GTK, QT or WX Threading for Iibi Hutton, it also modifies the% run command to execute correctly (without blocking) any The matplotlib-based script that finally calls the show () -tk -g / q / q4 / wthread option, and -Pilab (if matplotlib is configured to use GTK, QT or WX), content NY will block the graphical interface. This means that when GTK, QT or WX Threading is active, any attempt to open a GUI will be in a dead window, and possibly causing the Python interpreter to crash. An additional option, -Tick, is available to solve this problem. It can be given as any other option after the above (-grathred, -truth, q4thread, -wthread or -pylab). If TT is given, then IPython will try to coordinate threading with GTK, QT or WX. This is probably unbelievable, and you have to test on your platform and Python configuration to find out if it works for you. Debian users have reported success, apparently due to the fact that Debian makes all Python with Tcl, Tk, Tkinter and pthreads support. Under other Linux environments (such as Fedora Core 2/3), this option causes lockups for random crash and Python interpreter. Under other operating systems (Mac OSX and Windows), you have to try to know this because there are currently no user reports available. Unfortunately for iPython, there is no way to determine whether or not the T.C. will work reliably at run-time, so for regular work, you will need to do some experiments on this basis. 

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -