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

  • Home
  • SEARCH
  • 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 8047109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:00:06+00:00 2026-06-05T06:00:06+00:00

Here is my dilemma: I have a log parser with a pygtk window. After

  • 0

Here is my dilemma: I have a log parser with a pygtk window. After the user opens a file via the dialog, I have a progress bar showing them approximately when the open will be complete (as it can be a lengthy process). I recently added an option to allow the user to specify a file via the command line.

My problem is, since I have to load the file before calling gtk.main(). Thus, the window and, more importantly, the progress bar are not displayed until after this lengthy load completes, giving the user no indication.

So, I am hoping there is a way to execute a function after calling gtk.main(), or somebody has an alternative approach. Thanks

  • 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-06-05T06:00:08+00:00Added an answer on June 5, 2026 at 6:00 am

    Rather than beginning the process from the command line as soon as you parse the command line arguments, simply pass the command line argument to your application class (or store in a variable) and process it AFTER you’ve entered gtk.main. That way you can setup your GUI first. Before beginning the process, and every time you increment the progress bar, make sure you let Gtk catch up using something like:

     while Gtk.events_pending():
            Gtk.main_iteration()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my dilemma. We have a server with a path, say \server1\data$\foo\bar\stuff. I'm
I have a bit of a dilemma here. I have a drupal 7 database
Here's my dilemma: I have to RGBA RAW images: a master image (the first)
Here's my dilemma: I have two types of routes which are semantically very different,
Here is my dilemma: The Problem I have SubProgram (a DLL) that uses System.Data.SQLite
I have a dilemma going on here. I need to use a session to
Here's my dilemma. I have 2 animations that need to run sequentially. The first
Ok here's my dilemma. here's this code I have: If e.KeyCode = Keys.A Then
So here is my dilemma: I have a base class (Let's say a generic
Ok, here is my dilemma I have a database set up with about 5

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.