Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python graphics with HTML

Tags:

python

html

Is there a javascript library or HTML plugin that allows me to use python graphics in an HTML page? Perhaps an object tag or 3rd party library/plugin?
Note: I want only client side code. I am not using servers.

EDIT: The library for graphics I want is python turtle. I want to be able to draw with python turtle in the browser.

like image 779
kirtan-shah Avatar asked Mar 13 '26 08:03

kirtan-shah


2 Answers

You can look at http://www.skulpt.org/ Skulpt is JavaScript based implementation of Python. The good thing is that it is open source so you can download the source code and implement the Skulpt API in your project or HTML file.

Not only it has Turtle module but it also offers other modules like processing, math and random module.

like image 82
Novice Programmer Avatar answered Mar 14 '26 21:03

Novice Programmer


MPLD3 is matplotlib with D3 backend. From its web page,

The mpld3 project brings together Matplotlib, the popular Python-based graphing library, and D3js, the popular Javascript library for creating interactive data visualizations for the web. The result is a simple API for exporting your matplotlib graphics to HTML code which can be used within the browser, within standard web pages, blogs, or tools such as the IPython notebook.

like image 39
spv Avatar answered Mar 14 '26 21:03

spv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!