Questions tagged [mainloop]

69 questions
1
vote
0 answers

How to start a physics simulation in pybullet with a GUI in wxpython

I´m trying to open a Python project with an GUI in wxpython via a button-event. The Python project is a physics simulation, which uses pybullet. The following code shows an minimum example, to show my problem to you. The first code is an example…
Lili
  • 11
  • 1
  • 2
1
vote
1 answer

Is tkinter's mainloop() function actually a loop?

Thank you for you patience with another newbie question. I am learning tkinter and I am confused about the mainloop(). What exactly is looping? For example: import tkinter as tk class Test(tk.Frame): def __init__(self, master=None): …
JeffD
  • 71
  • 5
1
vote
1 answer

Mainloop only seems to be running once in tkinter

Ok so, I'm writing a program out of spite to animate text that is supposed to display letters like so on a loop: T Th Tho Thom Thoma Thomas Thomas s Thomas su Thomas suc... and so on till it resets and then loops again. The problem is, the tkinter…
bravoalpha90
  • 413
  • 4
  • 5
1
vote
1 answer

Tkinter mainloop, after and threading confusion with time intensive code

I've got a working code for the training of a neural network. Now I want to create a TkInter GUI to be able to e.g. change the parameters on the fly. I imagine it being like a remote control. But I am struggling to get a responsive interface. The…
1
vote
0 answers

How to combine web.py and dbus mainloops in one Python 3 application?

I have a web.py based web application, which works fine. The setup boils down to: app = web.application(urls_tuple, globals()) app.run() Now my application also has to be D-Bus aware, i.e. it has to react to signals, which probably needs…
Martin
  • 31
  • 3
1
vote
0 answers

how to overwrite QApplication::exec()

in SDL,SFML you need to implement your own main loop.However in Qt it is predefined as QApplication::exec() . But I want to declare my own main loop in Qt for some other APIs t works. I tried QTimer which works great but I don't want it for some…
user7854936
0
votes
0 answers

Android NDK (GameActivity) and main loop polling rate

I have a simple Game Activity and I am using the default code. It looks like the polling rate of the loop, as measured like this, is around 2 microseconds. Is it normal? I was wondering where to put the input polling and rendering code, and examples…
Brunni
  • 143
  • 1
  • 11
0
votes
0 answers

Custom TKinter how to wait for user input without quitting from the main loop

I'm trying to build an application to get a songs from a user's spotify playlists, where users can enter their username and have the program make a request to the Spotipy API. But, I'm running into an issue where the program wont wait for the user…
Liam
  • 1
0
votes
1 answer

How to make a menu widow within the for loop?

So I am trying to make a matrix 6x6 with buttons. When I right click on the a button, the menu window should pop up with a list of options. In this case, it's mix and escape. When I click on any of the two options, The corresponding E or M should…
Annie
  • 11
  • 2
0
votes
0 answers

Tkinter window says not responding but code is running

I am trying to make an antivirus application but I met some issue. And Tkinter window says (not responding) but code is running. I wanted to use threading, but firstly it's not convenient, secondly it doesn't work.I don’t know how to make it so that…
Pythoner
  • 11
  • 2
0
votes
1 answer

Rust Win32 window, peek message disabling main loop exit

I am new to Rust and i am learning it, however when i search for information around this issue, there is simply no information. The problem exists in the main loop of the program for which the code looks like this (i will post the fill code for the…
chloedev
  • 3
  • 2
0
votes
0 answers

Multithreading while in main loop C++

I'm trying to write a simple console game, space shooter -ish. The game runs on main loop. I want to use multithreading to manage shooting projectiles and another for movement of the enemy. How should I set it up? The shooting function works on a…
0
votes
2 answers

tkinter mainloop() not ending the script once it completes

For some reason the mainloop() is not ending. The final print statement never gets triggered but everything else does. Any idea what is causing this or how to resolve it? It happens even without the threading. import time from tkinter.filedialog…
Justin Oberle
  • 502
  • 3
  • 22
0
votes
1 answer

how to make a code that does 2 processes in python

i made a messenger that works with the socket library. it has 2 sides : server and client. i later decided to make a GUI for it , too. ( with tkinter ) when i was making it , i realized that programs does not work correctly. here : import…
Parsa Ad
  • 91
  • 6
0
votes
1 answer

Continue executing function

When closing an instance of the ChildWindow class, which was called from another instance of MainWindow, the code does not continue to be executed. I noticed that only when the MainWindow instance is closed does it continue to run. In general, it…