QPython and pyGame

570 views
Skip to first unread message

Dominique Bouré

unread,
Mar 21, 2016, 9:02:47 AM3/21/16
to QPython
Hello, and sorry for a so simple subject.

A very simple script using pygame fails with a "segmentation fault" when I pygame.display.flip...

The scrit  works perfect under windowd and also cross-compiled with the Renpy solution ?

Do you have any idea? Many publications say QPython supports pygame, so I suppose I've made a tiny mistake like forgetting an import...

A sample of code... "Flipping" is printed on the console... "Flipped" is never printed, because of the segmentation fault.

try :
    import pygame_sdl2
    pygame_sdl2.import_as_pygame()
except:
    None
    
    
import pygame


pygame.init()

screen = pygame.display.set_mode((1776, 1080))
fond = pygame.image.load("Fond.jpg").convert()
screen.blit(fond, (0,0))

while True:
    for evt in pygame.event.get() :
            None
    print 'flipping'
    pygame.display.flip()
    print 'flipped'

Thanks a lot for all your ideas. 

QPython Team

unread,
Mar 24, 2016, 9:55:34 AM3/24/16
to qpy...@googlegroups.com
Hi, the pygame only works well with kivy in QPython now, not all features works well.But we will try to look into this issue later. thanks for writing to us.
--
You received this message because you are subscribed to the Google Groups "QPython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpython+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages