-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
The formatted print(..%..) statements in sixdb are python3-only, but the script is being invoked with #! /usr/bin/env python (i.e defaults to python2), and contains an explicit version check for "2.6 or above".
With python2, this gives
SyntaxError: invalid syntax
File "/afs/cern.ch/project/sixtrack/SixDesk_utilities/pro/utilities/externals/SixDeskDB/sixdb", line 88
print("%s:"%cmd, end=' ')
Either the formatted print() should be redone:
$ grep -n 'print(.*%' sixdb
53: print("Error: command `%s' not found"%cmd)
60: print("Error in `%s' command."%cmd)
84: print("%-11s: %s"%(cmd,doc))
88: print("%s:"%cmd, end=' ')
355: print(('Error in da_vs_turns: database %s not found!'%dbname))
372: print("db=SixDeskDB('%s')\n"%study)
432: print("Wrong plot option: %s"%name)
, or the script should declare itself to be for python3-only?
Metadata
Metadata
Assignees
Labels
No labels