Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 24 Jul 2021 18:59:55 +0200
From: Jakub Wilk <>
To: <>
Subject: Re: ipython3 may execute code from the current
 working directory

* Mats Wichmann <>, 2021-07-23, 14:39:
>normally (cpython), an empty string in sys.path doesn't mean "current 
>directory", it means "script directory", the directory the script 
>you're running is found in [1].

No, empty string in sys.path always means cwd.

sys.path[0] is the script directory (if available), but that's a 
non-empty string.

But you might be right that this is IPython's failure to mimic how the 
normal Python interpreter initializes sys.path.

Jakub Wilk

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.