unitedstates / congressional-record

A parser for the Congressional Record.
Other
128 stars 40 forks source link

Please include support for python 3 #28

Closed napsternxg closed 6 years ago

napsternxg commented 6 years ago

The current script fails on python 3. You can use the library https://docs.python.org/2/library/2to3.html to do the conversion.

$ python -m congressionalrecord.cli -h
Traceback (most recent call last):
  File "/homed/content/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/homed/content/anaconda3/lib/python3.6/runpy.py", line 153, in _get_module_details
    code = loader.get_code(mod_name)
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/homed/content/anaconda3/lib/python3.6/site-packages/congressionalrecord/cli.py", line 69
    print "Haven't written the hooks for other functionality yet."
                                                                 ^
SyntaxError: Missing parentheses in call to 'print'
napsternxg commented 6 years ago

Also, this is a good resource to write compatible code. http://python-future.org/compatible_idioms.html