Month: October 2013

Editing Python in the Cloud

A bit off topic but I gave in to the urge and brought a Chromebook as something to get on to the web as quick as possible but with a proper keyboard. I’m writing this article on it so at least it passes the basic test. This made me wonder if it would be possible to edit and run Python on it.

The short answer is yes, Python Fiddle does allow you to edit and run Python code directly from the browser. Most of the screen is taken with the file editor with a run button at the top and the output appears at the bottom. Simple but effective.

Going further, actually downloading Python to run it locally is theoretically possible (see here) but this goes against what a Chromebook is supposed to be about.

If it’s editing that you are mainly looking for, there are good editors and in fact whole IDE’s are available. Take a look here for 5 IDE’s that can probably do all would expect. I don’t intend to try all of them but will let you know any I do.

But what about running your Python code? I am giving Nitrous.io a go. This gives you access to a virtual server with Python 2.7 preinstalled. And they’ve preinstalled django which gives you an idea of what they think there product is going to be used for the most. The most basic option is free with paid-for upgrades if you want more processors, RAM or hard disk. It runs on Linux so again none of the Windows code will run but it does open up a few possibilities.

So lets get up and running as quick as possible with the default website in django as described in the very first tutorial. I’ll assume you have registered for your free account and connected to your box. This brings you to a command line where you type in the following.

cd workspace
django-admin.py startproject testsite
cd testsite
python mange.py runserver 0.0.0.0:8080

Now if you click on the Preview menu along the top and choose Port 8080 it should open up the barebones site in your browser.