Ticket #4244: execfile.diff
| File execfile.diff, 1.5 KB (added by loewis, 3 years ago) |
|---|
-
twisted/python/dist.py
15 15 from distutils import core 16 16 from distutils.core import Extension 17 17 18 try: 19 execfile 20 except NameError: 21 from twisted.python.compat import execfile 18 from twisted.python.compat import execfile 22 19 23 20 24 21 twisted_subprojects = ["conch", "lore", "mail", "names", -
twisted/python/compat.py
15 15 import sys, string, socket, struct 16 16 17 17 18 def execfile(filename, *args): 19 return exec(compile(open(filename).read(), filename, 'exec'), *args) 18 if sys.version_info >= (3,0): 19 # 3.x doesn't have execfile anymore, so we define our own 20 # The code below is syntactically valid 2.x, but 2.x thinks that a tuple 21 # gets passed to the exec statement. 22 def execfile(filename, globals=None, locals=None): 23 exec(compile(open(filename).read(), filename, 'exec'), globals, locals) 24 else: 25 from __builtin__ import execfile 20 26 21 27 22 28 def inet_pton(af, addr): -
setup.py
16 16 import sys, os 17 17 18 18 19 try: 20 execfile 21 except NameError: 22 from twisted.python.compat import execfile 19 from twisted.python.compat import execfile 23 20 24 21 25 22 def getExtensions():
