ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

grc doesn't work with Python 3 #64

Closed cdeil closed 9 years ago

cdeil commented 9 years ago

I tried running grc with Python 3 and it fails like this:

$ grc
Traceback (most recent call last):
  File "/Users/deil/Library/Python/3.4/bin/grc", line 4, in <module>
    __import__('pkg_resources').run_script('ginga==2.1.20141207082012', 'grc')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 517, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 1435, in run_script
    code = compile(source, script_filename, 'exec')
  File "/Users/deil/Library/Python/3.4/lib/python/site-packages/ginga-2.1.20141207082012-py3.4.egg/EGG-INFO/scripts/grc", line 42
    print res
            ^
SyntaxError: Missing parentheses in call to 'print'

When I fix this it fails like this:

$ grc
Traceback (most recent call last):
  File "/Users/deil/Library/Python/3.4/bin/grc", line 4, in <module>
    __import__('pkg_resources').run_script('ginga==2.1.20141207082012', 'grc')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 517, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 1436, in run_script
    exec(code, namespace, namespace)
  File "/Users/deil/Library/Python/3.4/lib/python/site-packages/ginga-2.1.20141207082012-py3.4.egg/EGG-INFO/scripts/grc", line 23, in <module>
    import xmlrpclib
ImportError: No module named 'xmlrpclib'

Could you please make grc work with Python 3?

ejeschke commented 9 years ago

Fixed in commit d0a7f2b15bef8f8de6a5ce18dca9d096b8d69e4d. Thanks!