Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saturngod/gitbook-plugin-pyweb
Run python on gitbook
https://github.com/saturngod/gitbook-plugin-pyweb
Last synced: 26 days ago
JSON representation
Run python on gitbook
- Host: GitHub
- URL: https://github.com/saturngod/gitbook-plugin-pyweb
- Owner: saturngod
- License: mit
- Created: 2016-06-29T15:08:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-13T08:24:36.000Z (over 7 years ago)
- Last Synced: 2024-04-25T17:05:17.134Z (8 months ago)
- Language: JavaScript
- Size: 4.29 MB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
pywebtest-gitbook is a plugin for [gitbook](http://www.gitbook.io) that allow to run python code in the gitbook with python editor.
For Editor , using [ace](http://ace.c9.io) and [brython](www.brython.info) to run python code on browser. Running brython code are inspired from [Pierre Quentel](https://groups.google.com/d/msg/brython/xLv55qq-L1s/mcwmI6-pEhcJ)'s answer from google group discussion.
## Install
```
npm install pywebtest-gitbook
```In your gitbook book.json
```
"plugin" : [
"pywebtest-gitbook"
]
```## Screenshot
![image](https://i.cloudup.com/2Bbk19AXT9.png)
## How to add python code
You can add python code like following
```
Hello World{% pyweb %}helloworld.py{% endpyweb %}
Bubbler Sort
{% pyweb %}bubble.py{% endpyweb %}
```You need to put your python file path between **[[[** and **]]]**
Example:
- file.md
- code
- helloworld.pyIn file.md , you can call like
```
This is file.md{% pyweb %}code/helloworld.py{% endpyweb %}
```