forked from 0x2620/pandora
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
|
|
@ -5,9 +5,12 @@ import sys
|
|||
root_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
|
||||
os.chdir(root_dir)
|
||||
|
||||
#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))
|
||||
with open(activate_this) as f:
|
||||
code = compile(f.read(), activate_this, 'exec')
|
||||
exec(code, dict(__file__=activate_this))
|
||||
# execfile(activate_this, dict(__file__=activate_this))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue