Skip to content

Instantly share code, notes, and snippets.

@juanluisrto
Created October 29, 2020 16:44
Show Gist options
  • Save juanluisrto/00839581703d37e945d524353c0911c2 to your computer and use it in GitHub Desktop.
Save juanluisrto/00839581703d37e945d524353c0911c2 to your computer and use it in GitHub Desktop.
Import a file at a given path with autoreload
%load_ext autoreload
%autoreload 2
import sys, os
file_path = r"\path\to\file.py"
path = os.path.dirname(file_path)
sys.path.append(path)
from file import *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment