0
我有一個允許導入很多噪音的包。我曾嘗試使用__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__'問題。根據[此GitHub問題](https://github.com/ipython/ipykernel/issues/129),此行爲是[可配置的](https://ipython.readthedocs.io/en/stable/config/options/terminal .html)(儘管該選項已被棄用)。 – jonafato
謹慎回答,我會接受 – codyc4321