RUG/Pennsylvania/State College/Software/Python scripts

From RepRap
Revision as of 13:22, 22 January 2014 by Aem28 (talk | contribs) (Overview)
Jump to: navigation, search

Overview

Python is an open-source programming language. Its syntax is simple, however it includes many powerful tools, making it easy to create and edit files through a script. Python in the RepRap context can help generating or editing gcode, or generating 3D objects.

Two branches of Python are being used: Python 2.x and Python 3.x (more details: http://wiki.python.org/moin/Python2orPython3). Their syntax is slightly different, and a script written in one version won't work with the other. The version used should be specified at the beginning of the python file holding the script. Both versions can be downloaded at http://www.python.org/download/.

Most Unix systems (MacOs X, Ubuntu, Fedora...) come with Python 2.7 packages installed, so you won't need to install them again. However, you'll need to install Python 3.x to run Python 3.x scripts. Both versions of Python can co-exist on a computer without creating problems.

Python scripts on console

On Windows

On Unix systems (Mac and Linux)

Python scripts and Blender