Commit b6d9b575 authored by Guillaume Seguin's avatar Guillaume Seguin

Move Settings utils to printrun/settings.py

parent 5fa7ca48
This diff is collapsed.
...@@ -33,7 +33,7 @@ except ImportError: import json ...@@ -33,7 +33,7 @@ except ImportError: import json
from . import pronsole from . import pronsole
from . import printcore from . import printcore
from .utils import install_locale, setup_logging, \ from .utils import install_locale, setup_logging, dosify, \
iconfile, configfile, format_time, format_duration, \ iconfile, configfile, format_time, format_duration, \
hexcolor_to_float, parse_temperature_report, \ hexcolor_to_float, parse_temperature_report, \
prepare_command, check_rgb_color, check_rgba_color prepare_command, check_rgb_color, check_rgba_color
...@@ -45,8 +45,7 @@ except: ...@@ -45,8 +45,7 @@ except:
logging.error(_("WX is not installed. This program requires WX to run.")) logging.error(_("WX is not installed. This program requires WX to run."))
raise raise
from printrun.gui.widgets import SpecialButton, MacroEditor, \ from .gui.widgets import SpecialButton, MacroEditor, PronterOptions, ButtonEdit
PronterOptions, ButtonEdit
winsize = (800, 500) winsize = (800, 500)
layerindex = 0 layerindex = 0
...@@ -58,9 +57,10 @@ pronterface_quitting = False ...@@ -58,9 +57,10 @@ pronterface_quitting = False
class PronterfaceQuitException(Exception): class PronterfaceQuitException(Exception):
pass pass
from printrun.gui import MainWindow from .gui import MainWindow
from printrun.excluder import Excluder from .excluder import Excluder
from pronsole import dosify, wxSetting, HiddenSetting, StringSetting, SpinSetting, FloatSpinSetting, BooleanSetting, StaticTextSetting from .settings import wxSetting, HiddenSetting, StringSetting, SpinSetting, \
FloatSpinSetting, BooleanSetting, StaticTextSetting
from printrun import gcoder from printrun import gcoder
tempreading_exp = re.compile("(^T:| T:)") tempreading_exp = re.compile("(^T:| T:)")
......
This diff is collapsed.
...@@ -117,6 +117,9 @@ def get_command_output(command, replaces): ...@@ -117,6 +117,9 @@ def get_command_output(command, replaces):
blocking = False) blocking = False)
return p.stdout.read() return p.stdout.read()
def dosify(name):
return os.path.split(name)[1].split(".")[0][:8] + ".g"
class RemainingTimeEstimator(object): class RemainingTimeEstimator(object):
drift = None drift = None
......
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