sciris.sc_fileio.loadobj2or3

loadobj2or3(filename=None, filestring=None, recursionlimit=None, **kwargs)[source]

Try to load as a (Sciris-saved) Python 3 pickle; if that fails, try to load as a Python 2 pickle. For legacy support only.

For available keyword arguments, see sc.load().

Parameters
  • filename (str) – the name of the file to load

  • filestring (str) – alternatively, specify an already-loaded bytestring

  • recursionlimit (int) – how deeply to parse objects before failing (default 1000)