Python in Your Browser

Over the past few weeks I’ve been playing around with some tools which compile Python code to JavaScript. If you’re writing a web app with a Python back-end, writing Python for the browser offers two things: (a) you no longer have to switch brainspace when moving between parts of your code base; and (b) you can share code between server and client. Yes, you could get the same advantages by using NodeJS server-side, but then you’d have to deal with all the idiosyncrasies of JavaScript

Here’s my quick review of three such tools:

  • pyjamas – a port of Google Web Toolkit to Python. The disadvantage is that in order to use GWT widgets you have to port them from Java to Python and this process is not 100% automatic.
  • skulpt – looks quite nice, but isn’t complete. The disadvantage is that it looks like a one-man project, and he may never have time to complete it.
  • pyjaco – also looks good, not yet complete, but getting there. This one seems to have a reasonably active community behind it.

The difference between pyjamas on the one hand and skulpt or pyjaco on the other is that if you choose pyjamas, you’re selecting an entire toolkit, whereas skulpt and pyjaco are geared much more towards writing code that takes the place of your normal JavaScript and works in with your existing framework.

This entry was posted in short and tagged , , , , , . Bookmark the permalink.

One Response to Python in Your Browser

  1. Pingback: A Whole New Language | Sqizit