Skip to content

Instantly share code, notes, and snippets.

@sglyon
Last active May 10, 2017 19:04
Show Gist options
  • Save sglyon/a8737e3f394954d266f91d08f36b8d94 to your computer and use it in GitHub Desktop.
Save sglyon/a8737e3f394954d266f91d08f36b8d94 to your computer and use it in GitHub Desktop.
python imports

Run with python other_file.py

MY_SETTING = 42
from conf import MY_SETTING
print("I'm in other_file.py and this is MY_SETTING: ", MY_SETTING)
python_imports|⇒ ipython Spencers-MBP-2
run otPython 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00)
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: run other_file.py
I'm in other_file.py and this is MY_SETTING: 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment