Comments (4)
This might be related. I'm running Python 3.7 in Windows 10. I'm trying to create and write into a debug window using the code provided in the docs. However, the debug window will not remain open when the print loop finished. If I run this code from Idle in a .py file, the debug window remains open, but when I run it from a Windows commant prompt, or from PyCharm, or from Sublime Text, the debug window quickly opens, runs, and closes.
import PySimpleGUI as g
g.Print('Trying out the print cability')
print=g.Print
print('This really does work')
for i in range(100):
print(i)
from pysimplegui.
is there anything after the last print?
You need a Popup or some other window to stay open in order for the debug to remain.
There are problems with these non-blocking windows are the only thing remaining. You need to stay in the tkinter loop somehow and the best way is to print a sg.Popup at the end of your program.
import PySimpleGUI as g
g.Print('Trying out the print cability')
print=g.Print
print('This really does work')
for i in range(100):
print(i)
g.Popup('End of my program')
from pysimplegui.
from pysimplegui.
I haven't used the debug print very much, so let me know how it goes :-)
Just be aware that when multiple windows are open closing one of them can potentially affect others. If you have any problems just speak up.
I fixed a big in this code that was causing the pypy issue. I'm closing out the bug
from pysimplegui.
Related Issues (20)
- Question - an PysimpleGui accommodate a passive layout(no user intervention) yet receive and update its layout elements(buttons etc) dynamically from received data? HOT 19
- Question about Tkinter - Is there someone that may have the same issue as mine? I create a window and it shows completely black HOT 2
- [Error Message] **** WARNING **** Did not find PySimpleGUI_license as global variable, but DID find it as an OS env variable! HOT 4
- Enhancement request: need a "rich text" element that at least supports markdown-like features HOT 1
- [Question] tkinter.TclError: expected integer but got "None" HOT 3
- [Question] set the default button popup_yes_no to no HOT 3
- [ trying to install pysimplegui on pi os] HOT 1
- [Question] Distribution key generation HOT 3
- Where is page to generate new distribution codes? Not referred to in the FAQ, etc HOT 1
- [Question] Where is the page to generate a new distribution key? Not referred to in docs. HOT 8
- [ Enhancement/Bug/Question] NOTE - you can also call sg.main() or sg.main_open_github_issue() to post an issue HOT 2
- [Question] Two events generated when one was expected HOT 2
- [Bug] window flash when update images in a thread HOT 4
- [ Enhancement] Don't have remove Tab in TabGroup element HOT 4
- [Question] Color single cell of table HOT 3
- [Error Message] alloc:Invalid block HOT 9
- [Bug] Event handling is broken on the macOS Sonoma 14.2.1 with tkinter backend HOT 1
- [ Bug] The col_widths parameter of PySimpleGUI.Table does not take effect. HOT 3
- [Question] How do I redraw the entire window layout in PySimpleGUI HOT 4
- [Question] Is there a way to blur the rectangle that contains a Matplotlib plot? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysimplegui.