Skip to content

Commit 07f1fbb

Browse files
committed
README.md: move translate.py entrypoint above it all
1 parent 1ece051 commit 07f1fbb

1 file changed

Lines changed: 26 additions & 16 deletions

File tree

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
Introduction
22
------------
3-
PythonJS is a transpiler written in Python that converts Python into fast JavaScript. It can be run with regular Python, or fully self-hosted within NodeJS using Empythoned. PythonJS has been designed with speed and easy integration with existing JavaScript code in mind.
3+
PythonJS is a transpiler written in Python that converts Python into fast
4+
JavaScript. It can be run with regular Python, or fully self-hosted within
5+
NodeJS using Empythoned. PythonJS has been designed with speed and easy
6+
integration with existing JavaScript code in mind.
7+
8+
9+
Using translator.py Without Installing
10+
--------------------------------------
11+
To simply convert your python script into javascript, git clone this repo, and
12+
use translator.py located in the "pythonjs" directory. You can give it a list
13+
of python files to translate at once. It will output the translation to
14+
stdout. The default output type is JavaScript.
15+
16+
Usage::
17+
18+
translator.py [--dart|--coffee|--lua] file.py
19+
20+
Example::
21+
22+
cd PythonJS/pythonjs
23+
./translator.py myscript.py > myscript.js
24+
25+
426

527
Installing
628
-------------
7-
npm install python-js
29+
```
30+
npm install python-js
31+
```
832

933
NodeJS Quick Example
1034
--------------
@@ -71,20 +95,6 @@ A Python typed subset can be translated to a GLSL fragment shader to speed up ma
7195

7296

7397

74-
translator.py
75-
------------
76-
To simply convert your python script into javascript, git clone this repo, and use translator.py located in the "pythonjs" directory. You can give it a list of python files to translate at once. It will output the translation to stdout. The default output type is JavaScript.
77-
78-
Usage::
79-
80-
translator.py [--dart|--coffee|--lua] file.py
81-
82-
Example::
83-
84-
cd PythonJS/pythonjs
85-
./translator.py myscript.py > myscript.js
86-
87-
8898
Supported Features
8999
================
90100

0 commit comments

Comments
 (0)