Created
March 19, 2014 21:57
-
-
Save happysundar/9652296 to your computer and use it in GitHub Desktop.
import subpackage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# use this if you want to include modules from a subfolder | |
# | |
__ = os.path.abspath(sys.argv[0]) | |
while os.path.dirname(__) != __: | |
if os.path.exists(os.path.join(__, 'common', '__init__.py')): | |
sys.path.insert(0, __) | |
break | |
__ = os.path.dirname(__) | |
# | |
# | |
# | |
try: | |
from common import prints, formats, env | |
except ImportError: | |
exit("This script requires that the source code for common package (present in the SVN source, under ../common) be checkout, and available in PYTHONPATH") | |
env.check_env() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment