Skip to content

Instantly share code, notes, and snippets.

@jmquintana79
Created April 8, 2025 14:09
Show Gist options
  • Save jmquintana79/7a3939259644b8fa2f0e9134924e08f3 to your computer and use it in GitHub Desktop.
Save jmquintana79/7a3939259644b8fa2f0e9134924e08f3 to your computer and use it in GitHub Desktop.
## for example, append src folder from a module
# when this command does not work
sys.path.append("../")
# replace by
src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))
sys.path.append(src_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment