Skip to main content
11 events
when toggle format what by license comment
Apr 8 at 14:34 comment added newbie @amon Thanks for your suggestion! I hadn't heard of contextlib.chdir() before. I was already implementing a similar solution myself.
Apr 8 at 14:24 comment added newbie @GregBurghardt Yes. This is my current choice. I change it as needed, and switch it back afterward. I use a context manager to handle this, and it works fine. But it looks a bit awkward when the code is littered with context managers. So I wonder whether there is a more elegant way to handle this kind of situation.
Apr 7 at 4:29 comment added amon Fix the script. Alternatively, use contextlib.chdir() instead of os.chdir() in order to temporarily change the working directory.
Apr 6 at 20:13 history became hot network question
Apr 6 at 18:33 history edited Doc Brown
edited tags
Apr 6 at 18:31 answer added Doc Brown timeline score: 5
Apr 6 at 17:31 comment added Doc Brown Close voters, please hold your breath, I am working on an answer, this is a real conceptional issue, which is not just restricted to Python or Jupyter notebooks.
Apr 6 at 15:10 comment added Greg Burghardt Have you tried keeping the working directory fixed? Does that work? What are the drawbacks with respect to your workbook?
Apr 6 at 12:56 review Close votes
Apr 11 at 3:02
S Apr 6 at 11:35 review First questions
Apr 6 at 20:08
S Apr 6 at 11:35 history asked newbie CC BY-SA 4.0