1. 21

  2. 3

    The one thing my PYTHONSTARTUP does that I would recommend to other is add a function to read from/write to the clipboard. It’s very useful for manipulating whatever I run into.

    1. 2

      I’d recommend using inspect from rich. It allows you to introspect into python objects. For example, try running this in your repl:

      from rich import inspect
      1. 1

        How do you set up this env var in jupyterlab/jupyterhub?

        1. 2

          I wrote a tutorial on setting env vars just before this one because I assumed this question would come up. You can read it here: https://bitecode.substack.com/p/environment-variables-for-beginners

          1. 1

            I read it, but still didn’t find the answer where do I set this variable for jupyterlab/jupyterhub? I assume it has to be set before the interpreter is invoked, so I can’t do it in my notebook. Jupyterlab invokes a kernel, which in my case resides in a conda environment. So probably I could use one of those new conda env commands to set it, but I was wondering if there is a different, conda agnostic, way.

            1. 1

              Setting an env variable must be done in the program that starts the program, or above.How you do this therefore depends on:

              • your operating system

              • how you start jupyterlab

              Depending of these factors, the answer will differ.