towards supporting python 2 and 3
- use absolute_imports - make use of six.moves - use exec instead of execfile - use list(dict) instead if dict.keys()
This commit is contained in:
parent
728ed14499
commit
1468ddbecb
89 changed files with 400 additions and 265 deletions
|
|
@ -6,9 +6,12 @@ import os
|
|||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
# using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|
||||
execfile(activate_this, dict(__file__=activate_this))
|
||||
if os.path.exists(activate_this):
|
||||
with open(activate_this) as f:
|
||||
code = compile(f.read(), activate_this, 'exec')
|
||||
exec(code, dict(__file__=activate_this))
|
||||
|
||||
from PIL import Image
|
||||
from optparse import OptionParser
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue