Open hx2A opened 4 days ago
py5.get_surface().set_always_on_top(True) works fine, thanks. Using py5.size(100,100,py5.P2D) --> Python crash !! Mac mini M1
py5.get_surface().set_always_on_top(True) works fine, thanks. Using py5.size(100,100,py5.P2D) --> Python crash !! Mac mini M1
So, same code as above, but with the P2D renderer, in the generic python interpreter causes py5 to crash? I will look into this further later today.
Let me refine my sketch. After execution in IDLE 3.13 on a Mac mini M1 (MacOS 14.7), I can see "End!" so the sketch has terminated. The python shell is blocked (acceptable). Now I close the sketch window with the mouse click. The window closes, 'End' is NOT written at the Python shell, which his still blocked. I must restart the shell manually. I tried with Spyder 6.0.2 app on Mac, installed spyder-kernels=3.0, opened a console in py5 env and it's ok, the py5 env. console is not blocked even during the sketch (with 'End' coming immediately !). So the problem may be tied to IDLE 3.13 ? I use both IDLE and Spyder for a book in preparation... Hum, I notice that if I do not close the sketch window and quit Spyder app (yeah bad), the Spyder app hangs, I must force kill it :-( The app is killed BUT the sketch window is still here, with the diabolic wheel turning, impossible to force quit. Gasp. Maybe test a bit more on Mac ARM machines ?...
%gui osx # for Spyder 6.0.2 IPython
import py5 # 0.10.3a1
def setup():
py5.size(100,100)
py5.get_surface().set_always_on_top(True) # ok but I hope this will be fixed :-)
global x,y
(x,y) = (0,50)
def draw():
global x
x = x + 1
py5.ellipse(x,y,20,20)
if x > 100 : py5.no_loop()
py5.run_sketch()
print('End')
As discussed in #562 , the following code opens the Sketch window behind the terminal window.
Workarounds are to use the
P2D
renderer or to callpy5.get_surface().set_always_on_top(True)
. This should work correctly though.