Subscript 0.3

A set of Python wrapped JavaScript libraries built with py2js

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!
send us
an update
AGPL v3 
Amirouche Boubekki
ROOT \ Internet \ HTTP (WWW)
Subscript is a set of Python wrapped JavaScript libraries built with py2js that let you play with the browser, easly prototyping application in your favorite language.

The Python package that makes py2js available in your environment.

Everything you need from javascript is bundled in subscript.src.js.

Wrapped libraries

- qwery, a compact css querier
- domready , let's you know when the dom is ready
- bonzo, library agnostic, extensible DOM utility
- MinPubSub, 198 byte publish/subscribe messaging micro-framework
- reqwest, a robust lightweight wrapper for asynchronous http requests
- morpheus a brilliant animator

Getting started

Start to download subscript.src.js and installing Subscript with your favorite tool.

With these in hands, you will have access in your Python files, built with py2js, the functions and classes that are part of Subscript API plus py2js function js and every object made visible by the browser document, window and the like (if any).

This is valid Subscript Python code:

def dom_ready():
 log('Hello from Python')

Put this in, run py2js > hello.js it will generate a file. To test it, copy and paste following code in hello.html file:

< html >
< head >
 < meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
 < script type="text/javascript" src="subscript.src.js" >< /script >
 < title id="page-title" >Hello< /title >
< /head >
< body >
< script type="text/javascript" src="hello.js" >< /script >
< script type="text/javascript" >
 domReady(function () {
< /script >
< /body >
< /html >

Run this in a browser, a message should show up in your JavaScript console.

Last updated on August 3rd, 2011


#Python wrapper #JavaScript libraries #Python #JavaScript #wrapper #library

Add your review!