Subscript 0.3

A set of Python wrapped JavaScript libraries built with py2js
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 hello.py, run py2js hello.py > hello.js it will generate a hello.py.js 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" >
 bonzo.setQueryEngine(qwery);
 domReady(function () {
 dom_ready();
 });
< /script >
< /body >
< /html >


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

last updated on:
August 3rd, 2011, 1:58 GMT
price:
FREE!
homepage:
bitbucket.org
license type:
AGPL v3 
developed by:
Amirouche Boubekki
category:
ROOT \ Internet \ HTTP (WWW)
Subscript
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT