Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A simple python package to get the path of the current IPython / Jupyter Notebook file.

Project description

A simple python package to get the path of the current IPython / Jupyter Notebook file.

Installation

pip install ipynb-path

Usage

If you can access to your Jupyter Notebook/Lab server without a password, you can use just ipynb_path.get() in a .ipynb file.

import ipynb_path
__file__ = ipynb_path.get()

If you need a password to access the server, you should specify it.

import ipynb_path
__file__ = ipynb_path.get(password='foo')

You can also specify __name__ for compatibility between .py and .ipynb. In this case, ipynb_path.get() does not overwrite __file__ even if it is called in a .py file.

import ipynb_path
__file__ = ipynb_path.get(__name__)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ipynb-path, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size ipynb_path-0.1.4-py3-none-any.whl (2.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ipynb-path-0.1.4.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page