Neal Norwitz writes: > mimetypes.py:405: No global (sys) found > > This is inside usage() which presumably should only be used internally. > sys is imported if __name__ == '__main__'. > So the problem can only be triggered if usage() is called by external source. > > Possible fixes are: > sys could be locally imported in usage() > sys could be imported at the module scope > usage could be made _usage() to denote it's private Neal, I'll propose another fix, but I don't know what pychecker would say. ;-) I'd like to move the definition of usage() into the if __name__ == "__main__" block, in which case the problem goes away since there wouldn't be a usage() unless sys has been imported. I'll check it in that way. ;-) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4