Here are changes I noted down.
SocketServer > socketserver
cPickle>pickle
ConfigParser ->configparser
- when index is needed range(10) -> list(range(10)
- y_dict.has_keyx in y_dict.keys()
- integer math 5/2 -> 5//2
- types
long -> int
02 octa -> 0o2 octa
- string module can not be used to operate as an instance of a text string.
- string.join([‘a’,’b’]) -> “ “.join([‘a’, ‘b’])
string.join([‘a’,’b’],”:") -> “:“.join([‘a’, ‘b’])
- Exceptions
- except Exception, e -> Exception as e
- sort(cmpfunc0 -> sort(key=functools.cmp_to_key(cmpfunc)
- numpy
- numpy.frombuffer(‘REAL’, numpy.int32) -> numpy.frombuffer(b‘REAL’, numpy.int32)
- numpy.dtype(‘Int’) -> numpy.dtype(‘int’)
- wxPython
1,$s/pyDeadObjectError/RuntimeError
1,$s/wx.wizard/wx.adv.wizard
1,$s/Wizard.EVT_WI/EVT_WI
1,$s/from \./from leginon
1,$s/gui.wx/leginon.gui.wx
1,$s/shortHelpString/shortHelp
1,$s/AppendItem(/Append(/g
1,$s/BitmapFromImage/Bitmap/g
1,$s/EmptyBitmap/Bitmap/g
1,$s/FindItemData/FindItem/g
1,$s/SetStringItem/SetItem/g
1,$s/InsertStringItem/InsertItem/g
1,$s/StockCursor/StockCursor/g
dc.BeginDrawing nad EndDrawing dprecated (just comment them out)
wx.colour is not hashable -> tuple(wx.colour)