Skip to content

Python3 syntax errors #219

@t0rrant

Description

@t0rrant

Usage of print as a macro, i.e https://github.com/assemblerflow/flowcraft/blob/master/flowcraft/bin/renamePE_samtoolsFASTQ.py#L98:

print 'Runtime :' + str(hours) + 'h:' + str(minutes) + 'm:' + str(round(seconds, 2)) + 's'

is not allowed, all print '<string>' references should be updated to print('<string>') formatted or python3 installation fails:

# python3 setup.py install
...
byte-compiling build/bdist.linux-x86_64/egg/flowcraft/bin/renamePE_samtoolsFASTQ.py to renamePE_samtoolsFASTQ.cpython-35.pyc
  File "build/bdist.linux-x86_64/egg/flowcraft/bin/renamePE_samtoolsFASTQ.py", line 98
     print 'Runtime :' + str(hours) + 'h:' + str(minutes) + 'm:' + str(round(seconds, 2)) + 's'
                     ^
SyntaxError: invalid syntax

This and other fixes can be automatically applied by using 2to3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions