blockpy-edu / blockpy

Blockly that's more Python than JavaScript, powered with Skulpt
Apache License 2.0
391 stars 130 forks source link

TypeError: Sk.console.printPILImage is not a function on line 4, please help #113

Open rahulrawat17 opened 3 years ago

rahulrawat17 commented 3 years ago

trying to run this code using skulpt.. """ import PIL a = PIL.Image('pic2.jpg') a.show() """

MrMazzone commented 3 years ago

@rahulrawat17 You need Skulpt specifically or just BlockPy?

Here, at Coding Rooms, you can create a Python workspace without an account and use BlockPy. https://www.codingrooms.com/compiler/python3/

Just select the 3 dots menu next to the files name and click "Open in Block Editor" to see the blocks editor. image

rahulrawat17 commented 3 years ago

maybe both, i am trying to display image on output area using skulpt and some files of blockpy

MrMazzone commented 3 years ago

@rahulrawat17 Coding Rooms will work because it is not using Skulpt. The issue is the PIL library.

I do not see PIL as a library packaged with Skulpt - https://github.com/skulpt/skulpt/tree/master/src/lib

You would need to implement it yourself.