Printrun

From RepRap
Revision as of 11:49, 6 February 2012 by Danielpublic (talk | contribs) (Oh right, script instructions.)
Jump to: navigation, search

Printrun is a set of G-code sending applications, written by Kliment. It consists of printcore (dumb G-code sender), pronsole (featured command line G-code sender), pronterface (featured G-code sender with graphical user interface), and a small collection of helpful scripts. Together with skeinforge they form a pretty powerful softwarecombo.

Installation

Linux & Distros

Dependencies

Before installing Printrun, make sure to install a few required libraries for both pronterface and skeinforge.

Depending on your Linux-distro, this can be done in several ways. The following is executed through the Terminal, often found under "Applications -> Accessories -> Terminal":

Debian

There are experimental packages for Debian (squeeze wheezy):

sudo echo "deb http://apt.ulrichard.ch/  squeeze main contrib non-free" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install printrun-gui

Fedora

sudo yum install git pyserial wxPython tkinter

Ubuntu

sudo apt-get install python python-serial python-wxgtk2.8 python-tk git-core

There are also experimental packages for Ubuntu (maverick natty oneiric precise):

sudo apt-add-repository ppa:richi-paraeasy/ppa
sudo apt-get update
sudo apt-get install printrun-gui

Install & update script

Now you should install pronterface first, then skeinforge inside your pronterface installation directory.

This albeit little dirty but handy script does that for you!
(N.B it can also be used as a update script. Be sure to put your .stl-files etc outside of your Printrun directory)

#! /bin/bash
PRINTRUNDIR="$HOME/Printrun" #Defines where the 'Printrun' directory is located. But of course you can change this to say: "$HOME/Documents/Create/RepRap/Printrun".
SKEINFORGEDIR="$PRINTRUNDIR/skeinforge" #Defines where the 'skeisforge' directory is located in the 'Printrun' directory is located.

cd $HOME #Change directory to the executing users home directory.
echo "Removing existing Printrun directory..." #Script being polite towards the user.
rm -rf $PRINTRUNDIR #Removes the defined Printrun directory and _everything_ that resides in and beneath its directory tree. 

echo "Cloning Printrun..." #Script being polite towards the user.
git clone https://github.com/kliment/Printrun.git #See also: http://help.github.com/linux-set-up-git/
echo "Grabbing skeinforge..." #Script being polite towards the user.
wget -P /tmp http://fabmetheus.crsndoo.com/files/41_reprap_python_beanshell.zip #Uses good ol' wget for downloading skeinforge.
echo "Unzipping skeinforge into Printrun directory..." #Script being polite towards the user.
unzip -d $SKEINFORGEDIR /tmp/41_reprap_python_beanshell.zip #unzips the grabbed zip to ones defined skeinforge dir.
echo "Symlinking skeinforge inside Printrun directory..." #Script being polite towards the user.
ln -s $SKEINFORGEDIR/* $PRINTRUNDIR/ #Script makes a symbolic link.
echo "Cleaning up temporary installation files..." #Script being polite towards the user.
rm -rf /tmp/41_reprap_python_beanshell.zip #Removes tmp files.

Open a terminal window and copy the script above. Open nano by typing 'nano' in the windows prompt and hit return. Save the script in a file named say 'PrintrunUpdate', make any adjustments if you want/need to. Most likely you need to use the following: chmod +x PrintrunUpdate This will allow you to execute the script in the first place. If you were to do this in your filemanager (Nautilus etc) it will ask you if you want to run this script.

Mac OSX

To make it work on OSX: (it's similar to linux in may ways, but different)

  • see instructions for Lion, and pre-Lion here

Windows

To make it work on Windows, get the following packages and install:

Or, use the ready-to-run version available at http://koti.kapsi.fi/~kliment/printrun/

Usage

With installation done, simply run the script, e.g.

python pronterface.py

Pronterface.png


CLI

You might also want to try a nice, unobtrusive command-line interface:

python pronsole.py

It features an online help function ("help" or "help <command>").

Troobleshooting

Good to know that the settings used by Pronterface are not stored in the app folder but in the user's folder (e.g : ~/.pronsolerc (linux) C:\Users\yourname (windows)).

'python goes SyntaxError'

Got an error similar to this?

[~] python pronterface.py
 File "pronterface.py", line 15
   print _("WX is not installed. This program requires WX to run.")
         ^
SyntaxError: invalid syntax

This can happen if you use a linux distribution such as Archlinux.
You can easily solve this by executing the following instead:

python2 pronterface.py

Custom buttons don't appear

See also :