Alexis-benoist / eralchemy

Entity Relation Diagrams generation tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3.x compatibility issue (print function)

momijiame opened this issue · comments

I found some Python 3.x compatibility issue.

My environment is following

$ python --version
Python 3.6.3

-s option does not work at Python 3.x environment.

$ eralchemy -i sqlite:///example.db -s example.er 
Traceback (most recent call last):
  File "/Users/amedama/.virtualenvs/py36/bin/eralchemy", line 11, in <module>
    sys.exit(cli())
  File "/Users/amedama/.virtualenvs/py36/lib/python3.6/site-packages/eralchemy/main.py", line 29, in cli
    check_args(args)
  File "/Users/amedama/.virtualenvs/py36/lib/python3.6/site-packages/eralchemy/helpers.py", line 22, in check_args
    fail('Cannot draw ER diagram with no output file.')
  File "/Users/amedama/.virtualenvs/py36/lib/python3.6/site-packages/eralchemy/helpers.py", line 6, in fail
    print >> sys.stderr, 'Error:', message % args
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(<message>, file=<output_stream>)"?

Since print became a function at Python 3.x.