Merge branch 'master' of github.com:kliment/Printrun into experimental
Conflicts: gcoder.pymaster
commit
37e27101f2
|
@ -180,3 +180,5 @@ GNU General Public License for more details.
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
All scripts should contain this license note, if not, feel free to ask us. Please note that files where it is difficult to state this license note (such as images) are distributed under the same terms.
|
||||||
|
|
|
@ -340,8 +340,9 @@ def main():
|
||||||
print "usage: %s filename.gcode" % sys.argv[0]
|
print "usage: %s filename.gcode" % sys.argv[0]
|
||||||
return
|
return
|
||||||
|
|
||||||
d = [i.replace("\n","") for i in open(sys.argv[1])]
|
# d = [i.replace("\n","") for i in open(sys.argv[1])]
|
||||||
gcode = GCode(d)
|
# gcode = GCode(d)
|
||||||
|
gcode = GCode(list(open(sys.argv[1])))
|
||||||
|
|
||||||
gcode.measure()
|
gcode.measure()
|
||||||
|
|
||||||
|
@ -355,4 +356,3 @@ def main():
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ if __name__ == '__main__':
|
||||||
while p.printing:
|
while p.printing:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if statusreport:
|
if statusreport:
|
||||||
sys.stdout.write("\b\b\b\b%02.1f%%" % (100 * float(p.queueindex) / len(p.mainqueue),) )
|
sys.stdout.write("%02.1f%%\r" % (100 * float(p.queueindex) / len(p.mainqueue),) )
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
p.disconnect()
|
p.disconnect()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from skeinforge.fabmetheus_utilities import archive
|
from skeinforge.fabmetheus_utilities import archive
|
||||||
from skeinforge.fabmetheus_utilities import settings
|
from skeinforge.fabmetheus_utilities import settings
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# create a simple image slide show using the
|
# create a simple image slide show using the
|
||||||
# wx.PaintDC surface as a canvas and
|
# wx.PaintDC surface as a canvas and
|
||||||
# DrawBitmap(bitmap, x, y, bool transparent)
|
# DrawBitmap(bitmap, x, y, bool transparent)
|
||||||
|
|
|
@ -18,26 +18,20 @@ url:
|
||||||
__author__ = 'Daniel Keep <daniel.keep.sp4msux0rz@gmail.com>'
|
__author__ = 'Daniel Keep <daniel.keep.sp4msux0rz@gmail.com>'
|
||||||
|
|
||||||
__license__ = """
|
__license__ = """
|
||||||
This library is free software; you can redistribute it and/or
|
This file is part of the Printrun suite.
|
||||||
modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
published by the Free Software Foundation; either version 2.1 of the
|
|
||||||
License, or (at your option) any later version.
|
|
||||||
|
|
||||||
As a special exception, the copyright holders of this library
|
Printrun is free software: you can redistribute it and/or modify
|
||||||
hereby recind Section 3 of the GNU Lesser General Public License. This
|
it under the terms of the GNU General Public License as published by
|
||||||
means that you MAY NOT apply the terms of the ordinary GNU General
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
Public License instead of this License to any given copy of the
|
(at your option) any later version.
|
||||||
Library. This has been done to prevent users of the Library from being
|
|
||||||
denied access or the ability to use future improvements.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful, but
|
Printrun is distributed in the hope that it will be useful,
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
You should have received a copy of the GNU General Public License
|
||||||
License along with this library; if not, write to the Free Software
|
along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__all__ = ['BufferedCanvas']
|
__all__ = ['BufferedCanvas']
|
||||||
|
|
|
@ -1,7 +1,22 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#Interactive RepRap e axis calibration program
|
#Interactive RepRap e axis calibration program
|
||||||
#(C) Nathan Zadoks 2011
|
#(C) Nathan Zadoks 2011
|
||||||
#Licensed under CC-BY-SA or GPLv2 and higher - Pick your poison.
|
|
||||||
s = 300 #Extrusion speed (mm/min)
|
s = 300 #Extrusion speed (mm/min)
|
||||||
n = 100 #Default length to extrude
|
n = 100 #Default length to extrude
|
||||||
m= 0 #User-entered measured extrusion length
|
m= 0 #User-entered measured extrusion length
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import math
|
import math
|
||||||
import wx
|
import wx
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
import gettext
|
import gettext
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Parsers for specific attributes
|
Parsers for specific attributes
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from .transform import transformList
|
from .transform import transformList
|
||||||
from .inline import inlineStyle
|
from .inline import inlineStyle
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
""" CSS at-rules"""
|
""" CSS at-rules"""
|
||||||
|
|
||||||
from pyparsing import Literal, Combine
|
from pyparsing import Literal, Combine
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
CSS blocks
|
CSS blocks
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Parsing for CSS colour values.
|
Parsing for CSS colour values.
|
||||||
Supported formats:
|
Supported formats:
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
""" Parse CSS identifiers. More complicated than it sounds"""
|
""" Parse CSS identifiers. More complicated than it sounds"""
|
||||||
|
|
||||||
from pyparsing import Word, Literal, Regex, Combine, Optional, White, oneOf, ZeroOrMore
|
from pyparsing import Word, Literal, Regex, Combine, Optional, White, oneOf, ZeroOrMore
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
""" Parser for inline CSS in style attributes """
|
""" Parser for inline CSS in style attributes """
|
||||||
|
|
||||||
def inlineStyle(styleString):
|
def inlineStyle(styleString):
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Parsing for CSS and CSS-style values, such as transform and filter attributes.
|
Parsing for CSS and CSS-style values, such as transform and filter attributes.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Parser for various kinds of CSS values as per CSS2 spec section 4.3
|
Parser for various kinds of CSS values as per CSS2 spec section 4.3
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
SVGDocument
|
SVGDocument
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
SVG path data parser
|
SVG path data parser
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
# This file is part of the Printrun suite.
|
||||||
|
#
|
||||||
|
# Printrun is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Printrun is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import pronterface
|
import pronterface
|
||||||
import cherrypy, re, ConfigParser, threading, sys
|
import cherrypy, re, ConfigParser, threading, sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
|
@ -28,6 +28,7 @@ except:
|
||||||
import sys, glob, time, datetime, threading, traceback, cStringIO, subprocess
|
import sys, glob, time, datetime, threading, traceback, cStringIO, subprocess
|
||||||
|
|
||||||
from printrun.pronterface_widgets import *
|
from printrun.pronterface_widgets import *
|
||||||
|
from serial import SerialException
|
||||||
|
|
||||||
StringIO = cStringIO
|
StringIO = cStringIO
|
||||||
|
|
||||||
|
@ -72,7 +73,11 @@ class Tee(object):
|
||||||
self.target(data)
|
self.target(data)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self.stdout.write(data.encode("utf-8"))
|
try:
|
||||||
|
data = data.encode("utf-8")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.stdout.write(data)
|
||||||
def flush(self):
|
def flush(self):
|
||||||
self.stdout.flush()
|
self.stdout.flush()
|
||||||
|
|
||||||
|
@ -1420,7 +1425,19 @@ class PronterWindow(MainWindow, pronsole.pronsole):
|
||||||
self.paused = 0
|
self.paused = 0
|
||||||
if self.sdprinting:
|
if self.sdprinting:
|
||||||
self.p.send_now("M26 S0")
|
self.p.send_now("M26 S0")
|
||||||
|
try:
|
||||||
self.p.connect(port, baud)
|
self.p.connect(port, baud)
|
||||||
|
except SerialException as e:
|
||||||
|
# Currently, there is no errno, but it should be there in the future
|
||||||
|
if e.errno == 2:
|
||||||
|
print _("Error: You are trying to connect to a non-exisiting port.")
|
||||||
|
elif e.errno == 8:
|
||||||
|
print _("Error: You don't have permission to open %s.") % port
|
||||||
|
print _("You might need to add yourself to the dialout group.")
|
||||||
|
else:
|
||||||
|
print e
|
||||||
|
# Kill the scope anyway
|
||||||
|
return
|
||||||
self.statuscheck = True
|
self.statuscheck = True
|
||||||
if port != self.settings.port:
|
if port != self.settings.port:
|
||||||
self.set("port", port)
|
self.set("port", port)
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -112,7 +112,7 @@ if sys.argv[1] in ("install", "uninstall") and len (prefix):
|
||||||
sys.argv += ["--prefix", prefix]
|
sys.argv += ["--prefix", prefix]
|
||||||
|
|
||||||
target_images_path = "share/pronterface/images/"
|
target_images_path = "share/pronterface/images/"
|
||||||
data_files = [('share/pixmaps/', ['P-face.ico','plater.ico'])]
|
data_files = [('share/pixmaps/', ['P-face.ico','plater.ico','pronsole.ico'])]
|
||||||
|
|
||||||
for basedir, subdirs, files in os.walk("images"):
|
for basedir, subdirs, files in os.walk("images"):
|
||||||
images = []
|
images = []
|
||||||
|
@ -145,7 +145,7 @@ setup (
|
||||||
license = "GPLv3",
|
license = "GPLv3",
|
||||||
data_files = data_files,
|
data_files = data_files,
|
||||||
packages = ["printrun", "printrun.svg"],
|
packages = ["printrun", "printrun.svg"],
|
||||||
scripts = ["pronsole.py", "pronterface.py", "plater.py", "printcore.py"],
|
scripts = ["pronsole.py", "pronterface.py", "plater.py", "printcore.py", "gcoder.py"],
|
||||||
cmdclass = {"uninstall" : uninstall,
|
cmdclass = {"uninstall" : uninstall,
|
||||||
"install" : install,
|
"install" : install,
|
||||||
"install_data" : install_data}
|
"install_data" : install_data}
|
||||||
|
|
Loading…
Reference in New Issue