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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:48:05+00:00 2026-06-14T23:48:05+00:00

I have Python GUI, and in one for-loop I call function from some dll

  • 0

I have Python GUI, and in one for-loop I call function from some dll which returns values for populating tableWidget row by row. All this works fine, except I can’t scroll table while it’s still populating (while dll function calculating things – 7-8secs for each row) so I tried work with threads like this:

q = Queue.Queue()
for i in (0, numberOfRows):
    threading.Thread(target=self.callFunctionFromDLL, args=(arg1,arg2, q)).start()
    result = q.get()
    ... do something with "result" and populate table row....


def callFunctionFromDLL(self, arg1, arg2, q):
    result = self.dll.functionFromDLL(arg1, arg2)
    q.put(result)

but still GUI is not responding until result is passed from q.get (functionFromDLL works 7-8 secs, and than for a moment while GUI populating row I can scroll table). I didn’t really worked with threads before, so any suggestion or example how to do this would be appreciated.

I’ve also tried this way, same thing, gui still not responding while functionFromDLL works:

for i in (0, numberOfRows):
    t = threading.Thread(target=self.callFunctionFromDLL, args=(arg1,arg2))
    t.start()
    t.join()
    result = self.result
    ... do something with "result" and populate table row....


def callFunctionFromDLL(self, arg1, arg2):
    self.result = self.dll.functionFromDLL(arg1, arg2)
  • 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-14T23:48:07+00:00Added an answer on June 14, 2026 at 11:48 pm

    If you are using the tkinter module, you might be able to get some help from how Directory Pruner 4 is implemented. To get around the fact that most GUI libraries do not play well with threads, the recipe utilizes some custom modules listed below the code. The modules affinity, threadbox, and safetkinter provide a thread-safe wrapping of the GUI library the program uses.

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

Sidebar

Related Questions

I have python script which downloads N number of images from website. I run
I have a python practise project. I'm going to write a GUI program which
I have a python based tkinter script which executes some commands using subprocess module.
I have written a small GUI with qtdesigner and python which should display in
I currently have a GUI built in wxPython with several sections, one of which
So... I'm working on trying to move from basic Python to some GUI programming,
I have a multi-threaded application written in Python in which one thread takes care
I have a Python script which uses Tkinter for the GUI. My little script
Hello Guys! I started learning python GUI development. Let's say I have this script:
I have complex GUI application written in Python and wxPython. I want it to

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.