sync with upstream

parent 63b32ef2
......@@ -27,7 +27,7 @@ A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
## Linux
### Ubuntu/Debian
You can run Printrun directly from source, as there are no packages available yet. Fetch and install the dependencies using
You can run Printrun directly from source. Fetch and install the dependencies using
1. `sudo apt-get install python-serial python-wxgtk2.8 python-pyglet python-numpy cython python-libxml2 python-gobject python-dbus python-psutil python-cairosvg git`
......@@ -37,6 +37,10 @@ Clone the repository
and you can start using Printrun from the Printrun directory created by the git clone command.
Users of Ubuntu Xenial Xerus or later and Debian Jessie or later won't find the package "python-wxgtk2.8" available, having been replaced by "python-wxgtk3.0". Running Printrun with "python-wxgtk3.0" instead, is possible but it is known to be affected by issue #615.
A Printrun preliminary package is already available in Ubuntu Yakkety Yak and Debian Stretch/Sid repositories. Please be aware that this initial package is also known to be affected by issue #615.
### Chrome OS
You can use Printrun via crouton ( https://github.com/dnschneid/crouton ). Assuming you want Ubuntu Trusty, you used probably `sudo sh -e ~/Downloads/crouton -r trusty -t xfce` to install Ubuntu. Fetch and install dependencies with the line given above for Ubuntu/Debian, and obtain the source via git clone.
......
......@@ -17,7 +17,7 @@
__version__ = "2015.03.10"
from serial import Serial, SerialException, PARITY_ODD, PARITY_NONE
from serialWrapper import Serial, SerialException, PARITY_ODD, PARITY_NONE
from select import error as SelectError
import threading
from Queue import Queue, Empty as QueueEmpty
......
......@@ -706,7 +706,12 @@ class pronsole(cmd.Cmd):
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
for config in args.conf:
self.load_rc(config)
try:
self.load_rc(config)
except EnvironmentError as err:
print ("ERROR: Unable to load configuration file: %s" %
str(err)[10:])
sys.exit(1)
if not self.rc_loaded:
self.load_default_rc()
self.processing_args = True
......
......@@ -918,6 +918,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
self.settings._add(HiddenSetting("last_bed_temperature", 0.0))
self.settings._add(HiddenSetting("last_cooler_temperature", 0.0))
self.settings._add(HiddenSetting("last_file_path", u""))
self.settings._add(HiddenSetting("last_file_filter", 0))
self.settings._add(HiddenSetting("last_temperature", 0.0))
self.settings._add(StaticTextSetting("separator_2d_viewer", _("2D viewer options"), "", group = "Viewer"))
self.settings._add(FloatSpinSetting("preview_extrusion_width", 0.5, 0, 10, _("Preview extrusion width"), _("Width of Extrusion in Preview"), "Viewer", increment = 0.1), self.update_gviz_params)
......@@ -1386,12 +1387,17 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
dlg = None
if filename is None:
dlg = wx.FileDialog(self, _("Open file to print"), basedir, style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
dlg.SetWildcard(_("GCODE files (*.gcode;*.gco;*.g)|*.gcode;*.gco;*.g|OBJ, STL, and GCODE files (*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ)|*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ|All Files (*.*)|*.*"))
dlg.SetWildcard(_("OBJ, STL, and GCODE files (*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ)|*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ|GCODE files (*.gcode;*.gco;*.g)|*.gcode;*.gco;*.g|OBJ, STL files (*.stl;*.STL;*.obj;*.OBJ)|*.stl;*.STL;*.obj;*.OBJ|All Files (*.*)|*.*"))
try:
dlg.SetFilterIndex(self.settings.last_file_filter)
except:
pass
if filename or dlg.ShowModal() == wx.ID_OK:
if filename:
name = filename
else:
name = dlg.GetPath()
self.set("last_file_filter", dlg.GetFilterIndex())
dlg.Destroy()
if not os.path.exists(name):
self.statusbar.SetStatusText(_("File not found!"))
......
......@@ -26,13 +26,16 @@ if __name__ == "__main__":
from printrun.printcore import __version__ as printcore_version
usage = "Usage:\n"+\
" pronsole [OPTION]\n\n"+\
" pronsole [OPTIONS] [FILE]\n\n"+\
"Options:\n"+\
" -h, --help\t\t\tPrint this help message and exit\n"+\
" -V, --version\t\t\tPrint program's version number and exit\n"+\
" -h, --help\t\t\tPrint this help message and exit\n"
" -v, --verbose\t\t\tIncrease verbosity\n"+\
" -c, --conf, --config=CONFIG_FILE\tLoad this file on startup instead of .pronsolerc; you may chain config files, if so settings auto-save will use the last specified file\n"+\
" -e, --execute=COMMAND\t\tExecutes command after configuration/.pronsolerc is loaded; macros/settings from these commands are not autosaved"
try:
opts, args = getopt.getopt(sys.argv[1:], "hV", ["help", "version"])
opts, args = getopt.getopt(sys.argv[1:], "hVvc:e:", ["help", "version", "verbose", "conf=", "config=", "execute="])
except getopt.GetoptError, err:
print str(err)
print usage
......
......@@ -37,16 +37,17 @@ if __name__ == '__main__':
from printrun.printcore import __version__ as printcore_version
usage = "Usage:\n"+\
" pronterface [OPTION]\n\n"+\
" pronterface [OPTIONS] [FILE]\n\n"+\
"Options:\n"+\
" -V, --version\t\t\tPrint program's version number and exit\n"+\
" -h, --help\t\t\tPrint this help message and exit\n"+\
" -a, --autoconnect\t\t\tautomatically try to connect to printer on startup\n"+\
" -c, --conf\t\t\tload this file on startup instead of .pronsolerc ; you may chain config files, if so settings auto-save will use the last specified file\n"+\
" -e, --execute\t\t\texecutes command after configuration/.pronsolerc is loaded ; macros/settings from these commands are not autosaved"
" -V, --version\t\t\tPrint program's version number and exit\n"+\
" -v, --verbose\t\t\tIncrease verbosity\n"+\
" -a, --autoconnect\t\tAutomatically try to connect to printer on startup\n"+\
" -c, --conf, --config=CONFIG_FILE\tLoad this file on startup instead of .pronsolerc; you may chain config files, if so settings auto-save will use the last specified file\n"+\
" -e, --execute=COMMAND\t\tExecutes command after configuration/.pronsolerc is loaded; macros/settings from these commands are not autosaved"
try:
opts, args = getopt.getopt(sys.argv[1:], "hVcea", ["help", "version", "conf", "execute", "autoconnect"])
opts, args = getopt.getopt(sys.argv[1:], "hVvac:e:", ["help", "version", "verbose", "autoconnect", "conf=", "config=", "execute="])
except getopt.GetoptError, err:
print str(err)
print usage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment