m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
646 B

6 months ago
  1. from __future__ import print_function, unicode_literals, absolute_import
  2. import sys
  3. if sys.version_info[0] >= 3:
  4. import collections
  5. PY3 = True
  6. def callable(x):
  7. return isinstance(x, collections.Callable)
  8. def execfile(fname, glob, loc=None):
  9. loc = loc if (loc is not None) else glob
  10. with open(fname) as fil:
  11. txt = fil.read()
  12. exec(compile(txt, fname, 'exec'), glob, loc)
  13. unicode = str
  14. bytes = bytes
  15. from io import StringIO
  16. else:
  17. PY3 = False
  18. callable = callable
  19. execfile = execfile
  20. bytes = str
  21. unicode = unicode
  22. from StringIO import StringIO