PythonAnywhere Forums

tkinter

I failed in stalling, as --user, tkinter

Maybe, is that action impossible, requiring gcc?

Best, Pietro

Tkinter requires a screen to draw on. Since we don't have that, it won't work. At some point in the far future, we may be able to provide the necessary drawing surface and deliver it across the web, but at the moment, it won't work.

Surely implementing gifsockets would be fairly trivial

<ducks>

Great, I'll try.

terna, I think rcs1000 was being facetious. The comment was to suggest that we should use gifsockets to provide a desktop that tkinter could use.

Thanks glenn; anyway rcs1000 gave me a good idea; generating an animation, I can send it to a different http address, were we could see the graphic results; as an example, I'll try to do something as at http://www.sublimetext.com/~jps/animated_gifs_the_hard_way.html

So, the added value of non understood jokes can be positive ...

That's excellent. I'd love to hear how that goes.

Does Tkinter still not work?

Have you given much thought to creating your GUI in HTML? It's not hard, and if you're preparing animation, learning about the canvas and perhaps processing.js might go a long way. Tkinter and I go way back, but it's investment in a very old technology at this point.

-greg

Hey, even if we don't have a screen, then we could at least have the tk subsystem which allows to run our code window-less. We do that by calling tkinter.Tcl instead of tkinter.Tk. All we need is to have the python*-tkinter package installed.

You can run tclsh in a bash shell. I find it hard to imagine a usecase for tkinter without tk.

Just to take up the challenge, you could use xvfb to create a virtual frame buffer, draw things on it with Tk, and then use screen shots to save your graphics. :-)

(Of course, there are a lot easier ways to create graphics. I'm just pointing out an out-of-the-box possibility...)

Also - it is possible to send graphical output to a remote X display -- not sure how I'd do that with PA, maybe one could use an SSH tunnel. I've give that about 0.01 second of consideration, but who knows?

-greg

Is there a workaround running code with a dependency on _tkinter?

you could try downloading and compiling the tk libraries in your home folder?