Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import os
  2. import sys
  3.  
  4. activate_this = '/home/ybenzaki/python-programming/flask-rest-example/env/bin/activate_this.py'
  5. """
  6. with open(activate_this) as file_:
  7. exec(file_.read(), dict(__file__=activate_this))
  8. """
  9. execfile(activate_this, dict(__file__=activate_this))
  10.  
  11.  
  12. ##Replace the standard out
  13. sys.stdout = sys.stderr
  14.  
  15. ##Add this file path to sys.path in order to import settings
  16. sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..'))
  17.  
  18. ##Add this file path to sys.path in order to import app
  19. sys.path.append('/home/ybenzaki/python-programming/flask-rest-example/')
  20.  
  21. ##Create appilcation for our app
  22. #from app import app as application
  23.  
  24. import app from app as application
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement