python 3 fixes

This commit is contained in:
Michael Fogleman 2018-03-04 20:05:31 -05:00
parent e1c2eacd8a
commit dfb41d54a1
5 changed files with 10 additions and 10 deletions

View File

@ -27,7 +27,7 @@ from .drawing import (
A3_BOUNDS,
)
from .hershey import text, justify_text
from .hershey import text, Font
from .hershey_fonts import (
ASTROLOGY,
CURSIVE,

View File

@ -1,4 +1,4 @@
from __future__ import division
from __future__ import division, print_function
import time
@ -170,11 +170,11 @@ class Device(object):
self.run_plan(plan)
def run_drawing(self, drawing, progress=True):
print 'number of paths : %d' % len(drawing.paths)
print 'pen down length : %g' % drawing.down_length
print 'pen up length : %g' % drawing.up_length
print 'total length : %g' % drawing.length
print 'drawing bounds : %s' % str(drawing.bounds)
print('number of paths : %d' % len(drawing.paths))
print('pen down length : %g' % drawing.down_length)
print('pen up length : %g' % drawing.up_length)
print('total length : %g' % drawing.length)
print('drawing bounds : %s' % str(drawing.bounds))
self.pen_up()
position = (0, 0)
bar = Bar(drawing.length, enabled=progress)

View File

@ -60,7 +60,8 @@ class Bar(object):
self.stop()
def stop(self):
print
sys.stdout.write('\n')
sys.stdout.flush()
def render(self):
items = [

View File

@ -2,4 +2,3 @@ cairocffi
pyserial
pyhull
Shapely

View File

@ -7,7 +7,7 @@ setup(
author='Michael Fogleman',
author_email='michael.fogleman@gmail.com',
packages=['axi'],
install_requires=['pyserial', 'shapely'],
install_requires=['pyserial', 'shapely', 'pyhull', 'cairocffi'],
entry_points={
'console_scripts': [
'axi = axi.main:main'