New course! Every coder should learn Generative AI!
Try a free lesson+ 7
I think Sololearn has made their batch script to look for a .png extension and then alter the terminal characteristics, or something, so that it fits the display. Here is my observation:
I made a Python test version of my VT Hanoi program that prints ASCII snapshots between animation steps. On my phone the output ends up wrapping the 80-column lines and looks bad. Now if I import os and issue a command that creates an empty .png file (merely using "touch ping.png"), suddenly I get a horizontally scrollable window with my output looking as it was intended. Also it adds an icon at the end indicating the image could not be displayed (naturally, since I did not create an image).
https://code.sololearn.com/cVd8LJZ6kxku/?ref=app
Comment out the last two lines to see the difference.
+ 5
New discovery. We can use the pypng module to create PNG files and display them in Sololearn Python codes!
https://code.sololearn.com/cA22A18A24a1/#py
+ 4
Yet another new discovery :D
https://code.sololearn.com/ctwGK31eMDwQ/?ref=app
+ 3
Also we can pull any PNG image from the internet to display (any potentially manipulate!) in Sololearn :)
https://code.sololearn.com/ca17a919A108/#py
+ 3
Another new discovery. Animated GIFs work, too!
https://code.sololearn.com/c10iqZtr0FJw/?ref=app
[Thanks, Tibor Santa for the use of your code to pull images from URLs]
+ 2
your codes don't show image;
Only write "no out put"
+ 2
You just change the extension name for it to work.
+ 2
Breakthrough! Here is VT Hanoi with full animation. I am thrilled to see this old terminal program of mine come to life again. Thanks to Jan Markus and Tibor Santa for developing techniques that I borrowed to make it possible.
https://code.sololearn.com/cny2exUQ1N8M/?ref=app
+ 1
Ok