https://github.com/certik/pyvascript
https://github.com/certik/pyvascript
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/certik/pyvascript
- Owner: certik
- Created: 2010-04-11T22:54:30.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2010-04-22T02:10:49.000Z (about 16 years ago)
- Last Synced: 2025-02-01T20:13:26.518Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 145 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Introduction
============
Pyvascript is an alternative syntax for Javascript. Code can be written using
standard Python syntax against the Javascript standard libraries.
It is known to work with Python 2.4, 2.5, 2.6, 3.0, 3.1.
Installation
============
Simply clone the repository. If you use Python 3, run the 2to3 tool first:
$ 2to3 -wn .
This fixes the files inplace.
Usage
=====
Pyvascript can be used in two ways, inline with your Python code or inside of a
template. Examples of inline and Mako usage are included. Support for other
templating engines is left as an exercise for the hacker.
Helpers
=======
* AjaxHelper -- A very simple base class for AJAX code, which automatically decodes a JSON response
Todo
====
* Add support for $
Bugs
====
* 'and' and 'or' in if statements break things horribly
* When using Mako, your code is compiled at every page load
* When using Mako, importing functions doesn't work, and you have to subclass
any classes you want to use