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 7586753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:30:15+00:00 2026-05-30T19:30:15+00:00

In GTK2, I enjoyed building a gui in the interpreter (ipython or plain python)

  • 0

In GTK2, I enjoyed building a gui in the interpreter (ipython or plain python) “on the fly” and seeing the changes in real time like this:

>>> import gtk
>>> win = gtk.Window()
>>> win.connect('delete-event', gtk.main_quit)
10L
>>> win.show_all()

Which will result in showing a window to which I could add objects.

I’m changing to Gtk3 in part because it is the future and in part because I sometimes use Glade which now is only Gtk3. In doing the same with GTK3 DOESN’T show the window:

>>> from gi.repository import Gtk
>>> win = Gtk.Window()
>>> win.connect('delete-event', Gtk.main_quit)
13L
>>> win.show_all()

Alas, no window after that last line. It won’t show until:

>>> Gtk.main()

I even tried:

>>> win.show_now()

Which did nothing.

Any ideas how to build in real time in GTK3?

Thanks,

Narnie

  • 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. Editorial Team
    Editorial Team
    2026-05-30T19:30:17+00:00Added an answer on May 30, 2026 at 7:30 pm

    I tried to process pending events with the following one-liner:

    >>> while Gtk.events_pending(): Gtk.main_iteration()
    

    and it looks to have the same behaviour. It’s not so convenient, but you can still do some work in the interpreter.

    Alternatively, if you’re developing a Gtk application, pdb.set_trace will still work and let you debug callbacks if that’s what you’re looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The entry for sys.path[0] is '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode' . The Python docs say this should be
I've set myself the task of implementing a real time MIDI application. Like all
I've been trying to get an Gtk2::Image object in this Perl Gtk2 application to
This is critical part of my run-time created menu: GtkWidget *menu, *menu_item; menu =
I have a Perl program that has a GTK2 GUI (via the Gtk2 package).
In GTK2, a StatusBar was just a simple container like an HBox. Glade 3
I'm writing an application using Perl and Gtk2-Perl that keeps track of elapsed time.
I am new user of matplotlib, my platform is Ubuntu 10.04 Python 2.6.5 This
I would like to build a GUI for an OCaml application I'm writing. My
I have a combobox widget in python that I would like to be able

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.