adding directory to sys.path /PYTHONPATH - Stack Overflow
This is working as documented. Any paths specified in PYTHONPATH are documented as normally coming after the working directory but before the standard interpreter-supplied paths. sys.path.append () appends to the existing path. See here and here. If you want a particular directory to come first, simply insert it at the head of sys.path:
Source: stackoverflow.com