I suspect this is a poorly posed question but I don't know how to do better. I frequently use pysimplegui and often use spyder for development. There is an unfortunate problem in that within spyder my code with display sg windows far larger than the same code running in a terminal. I have put up with this for years but recently wandering through copilot I was induced to try sg.set_options(scaling=1.). Bingo, it returned my windows to a normal size within spyder. BUT, repeatedly plotting something in that window made the window get smaller on each plotting. I wondered if anyone had had similar experiences and found a workaround. The repeated shrinking of the sg window is an old issue related to changing dpi, see: . In that sample code, removing sg.set_options will fix the problem. To try to be clear: there is a bug in pysimplegui that has existed for years in that setting a scaling or dpi option with make the dpi value unstable. Unfortunately the only way I have found to make windows the same size inside spyder and outside spyder is to set the scaling value. This only works for a first figure; after that the window size shrinks on every new figure. Since the window size stability problem occurs both in spyder and in a terminal when a scaling option is invoked, this is a (longstanding) bug in pysimplegui. I am looking for a different way of preserving the gui window size inside spyder. Phew!
pysimplegui window size changes in spyder vs in terminal - Stack Overflow
评论列表(0)
- 暂无评论