PYTHONSTARTUP 官网解释:
If this is the name of a readable file, the Python commands in that file are executed before the first prompt is displayed in interactive mode. The file is executed in the same namespace where interactive commands are executed so that objects defined or imported in it can be used without qualification in the interactive session. You can also change the prompts sys.ps1 and sys.ps2 in this file.
简单来说就是这个文件会在第一次进入交互模式的时候会被执行,所以把tab.py 加入到这个变量设定的文件中就可以达到自动导入tab.py,实现自动补全的功能