+ 2

can we import modules in sololearn playground

i just got the source code of flappybird and i wanted to test it on sl playground but it seems like pygame module is not imported in sl playground https://code.sololearn.com/crqNiKRWHi8H/?ref=app

2nd Sep 2018, 9:39 PM
peter gaty
peter gaty - avatar
3 Respuestas
+ 4
We cannot import module for security reasons but though it would be possible, you cannot run higlhy interactive code like graphics because they run on server and not on your device
2nd Sep 2018, 11:40 PM
KrOW
KrOW - avatar
+ 4
Some strikes against pygame...the output panel's not interactive, has no graphics and then there are resource limits. A slight refinement on imports...there is a small window of time to create a module and import that: https://code.sololearn.com/cdH7J9Vh2SI3/?ref=app I use similar pre-run strategies to do some file handling demos.
3rd Sep 2018, 4:25 AM
Kirk Schafer
Kirk Schafer - avatar
+ 1
enks everyone
3rd Sep 2018, 7:20 PM
peter gaty
peter gaty - avatar