【发布时间】:2017-09-23 04:31:51
【问题描述】:
我有一个允许导入大量噪音的包。我曾尝试使用__all__ 之类的:
__all__ = ["WebdriverChauffeurMixin", "ChromeDriver", "FirefoxDriver"]
但这无济于事:
cchilders:~/projects/webdriver_chauffeur (master)
$ pip uninstall webdriver-chauffeur
Can't uninstall 'webdriver-chauffeur'. No files were found to uninstall.
cchilders:~/projects/webdriver_chauffeur (master)
$ pip uninstall webdriver_chauffeur
Can't uninstall 'webdriver-chauffeur'. No files were found to uninstall.
In [2]: from webdriver_chauffeur import
BeautifulSoup Keys os
By Select random
ChromeDriver TimeoutException subprocess
EC WebDriverWait time
FirefoxDriver WebdriverChauffeurMixin webdriver
包在 pypi 上,但也在我的机器上~/projects/webdriver_chauffeur
包裹在https://github.com/codyc4321/webdriver_chauffeur
如何隐藏这些不必要的导入?
【问题讨论】:
-
这看起来像是
ipython问题,而不是__all__问题。根据this GitHub issue,这种行为是configurable(尽管该选项已被弃用)。 -
关心回答,我会接受