Created
May 5, 2020 10:19
-
-
Save QuantVI/6f1319a7f0955091a202b2ce99119efd to your computer and use it in GitHub Desktop.
Python commads that either came in handy or I really like
This file contains 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
# Within a Jupyter Notebook | |
import sys | |
sys.path.append("C:/somewhere/else/not/in/the/tree/of/this/jpfile") | |
# Now we can import Windows directories as packages, and refer to Python files within them | |
# the folder jpyfile need not have an __init__.py file in it | |
# folders that we import from within jpfile should | |
from folder_w_in_jpfile import my_modular_code | |
# folder_w_in_jpfile contains an __init__.py file whihc can be empty | |
# my_modular_code is a file my_modular_code.py with any other Python code you've written. | |
# This snippet is for when there are issues with | |
# adding Jupyter to the Windows PATH variable | |
# launching Jupyter from a specific folder | |
# such as when the Jupyter command (in CMD.EXE) is linked to the different version of Python |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trick to remember that I had to use on a virtual machine within scattered permissions.