Forums

Python gist consoles for Stack Overflow fans

If you're a regular user of Stack Overflow (or other Q&A sites) then you frequently find yourself posting snippets of code to answer people's questions. We've just soft-launched something that can help with that, so long as you're answering Python questions. If you put your code snippet in a GitHub Gist, then you can add a link to your SO answer that will run the code in a PythonAnywhere console. Here's an example by Hansel.

People who follow the link to your Gist console don't need a PythonAnywhere account -- it just runs in a throwaway sandbox. People who do have a PythonAnywhere account get the option to run it in their own sandbox or to log out then run it.

If you want to create your own Gist consoles you can do so here -- all you need is the URL of the gist to run.

As always, any comments/suggestions would be really welcome!

Has anyone told you lately that you guys ROCK?

TIP:

Choosing to open the link in a New Private Window allows you to remain logged in and still run the gist code in an unauthenticated session.

Another excellent suggestion. We'll add that to the warning page I think...

throwaway sandbox - does that harm the environment?

Everything we throw away gets recycled. It's just a question of timescale...☺

Don't worry, sandboxes are fully biodegradable, and the sand can be recycled into bottles.

Our sandboxes are also dolphin-friendly and cruelty-free - No bits were harmed in the creation of our sandboxes.