What is sys._MEIPASS in Python

≡放荡痞女 提交于 2020-01-02 02:15:14

问题


What is sys._MEIPASS. What is the value of this variable and it's use ? I was a looking one python script but when I ran it on eclipse(pydev). It showing error.


回答1:


sys._MEIPASS is a temporary folder for PyInstaller. See this question for more information.




回答2:


If you want to disable the error Lint gives you in your editor (Eclipse, MS-Code, ...) add the following comment at end of your line:

if getattr(sys, 'frozen', False): # Running as compiled
        running_dir = sys._MEIPASS + "/files/" # pylint: disable=no-member

The solution was from here if you want to disable a single line of code, not all errors of a kind.



来源:https://stackoverflow.com/questions/22472124/what-is-sys-meipass-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!