nickjj/ansigenome

Python 2.6 support

Closed this issue · 1 comments

Is there support for Python2.6 planned? I want to use ansigenome on RHEL6 and Python 2.6 is the default there.

Currently, it crashes with the following exception, as Python 2.6 doesn't support dict comprehensions (I guess).

Traceback (most recent call last):
  File "/usr/bin/ansigenome", line 5, in <module>
    pkg_resources.run_script('ansigenome==0.5.1', 'ansigenome')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.6/site-packages/ansigenome-0.5.1-py2.6.egg/EGG-INFO/scripts/ansigenome", line 8, in <module>
    import ansigenome.constants as c
  File "/usr/lib/python2.6/site-packages/ansigenome-0.5.1-py2.6.egg/ansigenome/constants.py", line 4, in <module>
    import utils
  File "/usr/lib/python2.6/site-packages/ansigenome-0.5.1-py2.6.egg/ansigenome/utils.py", line 128
    return {v[key]: v for v in items}.values()
                        ^
SyntaxError: invalid syntax

I think that's the only spot I'm using one. If you want to rewrite that filter to not use a comprehension I'd gladly support a pull request if it makes Python 2.6 work.