Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 183969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:12:35+00:00 2026-05-11T15:12:35+00:00

The following lines cause with ipython a crash as soon as I close the

  • 0

The following lines cause with ipython a crash as soon as I close the tk-window instance a.

import visual, Tkinter a = Tkinter.Tk() a.update() display = visual.display(title = 'Hallo') display.exit = 0 visual.sphere() 

If I close the visual display first, the entire terminal crashes. I run everything on kubuntu 8.10. Is this a bug or am I doing something wrong? If this is a bug: Is there a smart way to avoid it?

Cheers, Philipp

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:12:35+00:00Added an answer on May 11, 2026 at 3:12 pm

    Have you tried starting ipython with the -gthread -tk command-line switches?

    From ipython --help:

            -gthread, -qthread, -q4thread, -wthread, -pylab                Only ONE of these can be given, and it can only be given as the               first option passed to IPython (it will have no effect in any               other position).  They provide threading support for the GTK, QT               and WXWidgets toolkits, and for the matplotlib library.                With any of the first four options, IPython starts running a               separate thread for the graphical toolkit's operation, so that               you can open and control graphical elements from within an               IPython command line, without blocking.  All four provide               essentially the same functionality, respectively for GTK, QT3,               QT4 and WXWidgets (via their Python interfaces).                Note that with -wthread, you can additionally use the -wxversion               option to request a specific version of wx to be used.  This               requires that you have the 'wxversion' Python module installed,               which is part of recent wxPython distributions.                If -pylab is given, IPython loads special support for the mat-               plotlib library (http://matplotlib.sourceforge.net), allowing               interactive usage of any of its backends as defined in the               user's .matplotlibrc file.  It automatically activates GTK, QT               or WX threading for IPyhton if the choice of matplotlib backend               requires it.  It also modifies the %run command to correctly               execute (without blocking) any matplotlib-based script which               calls show() at the end.         -tk    The -g/q/q4/wthread options, and -pylab (if matplotlib is               configured to use GTK, QT or WX), will normally block Tk               graphical interfaces.  This means that when GTK, QT or WX               threading is active, any attempt to open a Tk GUI will result in               a dead window, and possibly cause the Python interpreter to               crash.  An extra option, -tk, is available to address this               issue.  It can ONLY be given as a SECOND option after any of the               above (-gthread, -qthread, q4thread, -wthread or -pylab).                If -tk is given, IPython will try to coordinate Tk threading               with GTK, QT or WX.  This is however potentially unreliable, and               you will have to test on your platform and Python configuration               to determine whether it works for you.  Debian users have               reported success, apparently due to the fact that Debian builds               all of Tcl, Tk, Tkinter and Python with pthreads support.  Under               other Linux environments (such as Fedora Core 2/3), this option               has caused random crashes and lockups of the Python interpreter.               Under other operating systems (Mac OSX and Windows), you'll need               to try it to find out, since currently no user reports are               available.                There is unfortunately no way for IPython to determine  at  run-               time  whether -tk will work reliably or not, so you will need to               do some experiments before relying on it for regular work. 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

why do the following lines not work as I expect? import numpy as np
Why would the following lines of code cause a TargetInvocationException exception? private Dispatcher dispatcher
I am encountering an exception cause by the CFINVOKEARGUMENT line of the following snippet:
The following lines work when I enter them by hand on the Scala REPL
I have the following lines in my .zshrc source /etc/profile source $HOME/.profile My .profile
In the following lines of code, I need to adjust the pointer pm by
I have the following lines of code: if(std::binary_search(face_verts.begin(), face_verts.end(), left_right_vert[0]) && std::binary_search(face_verts.begin(), face_verts.end(), left_right_vert[1]))
Take the following lines of code that would work fine in a c# asp.net
Given the following lines of code which is using JQTOUCH: $('#customers').bind('pageAnimationEnd', function(e, info){ if
I have the following lines in my ~/.emacs.d/init.el (custom-set-variables '(flymake-allowed-file-name-masks (quote ( (\\.cc\\' flymake-simple-make-init)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.