python 3 fixes
This commit is contained in:
parent
e1c2eacd8a
commit
dfb41d54a1
|
@ -27,7 +27,7 @@ from .drawing import (
|
||||||
A3_BOUNDS,
|
A3_BOUNDS,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .hershey import text, justify_text
|
from .hershey import text, Font
|
||||||
from .hershey_fonts import (
|
from .hershey_fonts import (
|
||||||
ASTROLOGY,
|
ASTROLOGY,
|
||||||
CURSIVE,
|
CURSIVE,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from __future__ import division
|
from __future__ import division, print_function
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -170,11 +170,11 @@ class Device(object):
|
||||||
self.run_plan(plan)
|
self.run_plan(plan)
|
||||||
|
|
||||||
def run_drawing(self, drawing, progress=True):
|
def run_drawing(self, drawing, progress=True):
|
||||||
print 'number of paths : %d' % len(drawing.paths)
|
print('number of paths : %d' % len(drawing.paths))
|
||||||
print 'pen down length : %g' % drawing.down_length
|
print('pen down length : %g' % drawing.down_length)
|
||||||
print 'pen up length : %g' % drawing.up_length
|
print('pen up length : %g' % drawing.up_length)
|
||||||
print 'total length : %g' % drawing.length
|
print('total length : %g' % drawing.length)
|
||||||
print 'drawing bounds : %s' % str(drawing.bounds)
|
print('drawing bounds : %s' % str(drawing.bounds))
|
||||||
self.pen_up()
|
self.pen_up()
|
||||||
position = (0, 0)
|
position = (0, 0)
|
||||||
bar = Bar(drawing.length, enabled=progress)
|
bar = Bar(drawing.length, enabled=progress)
|
||||||
|
|
|
@ -60,7 +60,8 @@ class Bar(object):
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
print
|
sys.stdout.write('\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
items = [
|
items = [
|
||||||
|
|
|
@ -2,4 +2,3 @@ cairocffi
|
||||||
pyserial
|
pyserial
|
||||||
pyhull
|
pyhull
|
||||||
Shapely
|
Shapely
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ setup(
|
||||||
author='Michael Fogleman',
|
author='Michael Fogleman',
|
||||||
author_email='michael.fogleman@gmail.com',
|
author_email='michael.fogleman@gmail.com',
|
||||||
packages=['axi'],
|
packages=['axi'],
|
||||||
install_requires=['pyserial', 'shapely'],
|
install_requires=['pyserial', 'shapely', 'pyhull', 'cairocffi'],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'axi = axi.main:main'
|
'axi = axi.main:main'
|
||||||
|
|
Loading…
Reference in New Issue