Skip to content
← Back to Community
How to get graphical output screen?
Profile icon
BeeJay

Hello,

I just looked at the play library for Python. For other languages, like Pascal and Swift, is it possible to also have graphical output like that? What should we do to enable graphical screen output instead of text console?

Thank you.

Regards,

~Bee

Voters
Profile icon
cf100040
Profile icon
Hamster088
Profile icon
BeeJay
Comments
hotnewtop
Profile icon
BeeJay

Forget about Swift. I haven't found any swift module that is capable to initiate graphical console. Swift is too modern that it doesn't care much about console application, let alone graphical console.

Profile icon
theangryepicbanana

I think you can just run the code to create a graphical window and it'll appear. Ofc you can't use AppKit for Swift since that's nac os exclusive, but there are some units for Pascal builtin

Profile icon
BeeJay

@theangryepicbanana Do you mean the graph unit will work?

Profile icon
theangryepicbanana

@BeeJay uhhhh yea I think it should. It's the default package for Free Pascal so it should be included

Profile icon
BeeJay

@theangryepicbanana I will try it soon and report later. Thank you.

Profile icon
BeeJay

@theangryepicbanana There are 3 graph units provided by FPC. The main one is the classic graph unit, but it only works on DOS and Windows. It doesn't available on Linux, so it doesn't available on repl as repl is on Linux.

The alternatives are ggigraph, sdlgraph, and ptcgraph. They'are distributed along with standard FPC package for Linux. However, when I tried them on repl, they didn't work because the lack of required libraries, namely ggi, sdl, and ptc.

So, would you please add support to at least one the those graph units? Preferably the ggi one. Thank you.

Profile icon
theangryepicbanana

@BeeJay I can try. For the time being, can you use a different gui lib? I do believe several are included

Profile icon
BeeJay

@theangryepicbanana What do you mean by "gui lib"? SDL library? OpenGL library? X library? Well… are they supported on repl?

Besides those big and complex libraries are complicated to use while the graph libraries are mostly very simple. Those graph libraries are wrapper to the complex libraries anyway. Beginners alike much prefer the graph libraries since they just need to make simple games or drawing programs.

Profile icon
theangryepicbanana

@BeeJay well then I'll see what I can do :)

Profile icon
Vandesm14

You create a Pygame repl: https://repl.it/languages/pygame

Profile icon
BeeJay

@Vandesm14 As I said, I want to use Pascal and Swift language, not Python.

Profile icon
Vandesm14

@BeeJay I'm not sure. Sorry about that! I will try to find someone who knows about this and ask them to reply to this post.