DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics. The built-in graphics primitives support rectangles, ovals, (bezier) paths, polygons, text objects, colors, transparency and much more. You can program multi-page documents and stop-motion animations. Export formats include PDF, SVG, PNG, JPEG, TIFF, animated GIF and MP4 video.
To download the latest version of the app, go to
Using DrawBot as a Python module
DrawBot can also be installed as a Python module, the app is not required.
python setup.py install
import drawBot drawBot.newDrawing() drawBot.newPage(1000, 1000) drawBot.rect(10, 10, 100, 100) drawBot.saveImage("~/Desktop/aRect.png") drawBot.endDrawing()
It is adviced to start with
newDrawing() and end with
endDrawing(), to clear the instruction stack and remove installed fonts.
Compile DrawBot from source
compile drawBot.app (with UI)
(Most of these are available through
robofab(not used anymore)
- PyObjC (Only if you're not building with the system Python 2.7)
- PIL (only for running tests)
DrawBot is compiled with py2app into an application package.
cd path/To/drawBot python setupApp.py py2app
compile drawBot Python module only
This module only works on Mac OS as it requires
Quartz and more.
cd path/To/drawBot python setup.py install