Python sys.path[0] is not getcwd
While providing feedback to participants of Online Seminar of Informatics I’ve encountered a code, which used sys.path[0] to get the current working directory. sys.path is a list of folders used by Python interpreter during import resolving. For simple cases sys.path[0] is indeed the current working directory, but beware that there are a lot of things, which can change the sys.path variable - automatic reload of a Flask server is one of them....