草庐IT

Check_Program_Installed

全部标签

c++ - win32 : check if window is minimized

如何使用win32api检查窗口是否已最小化? 最佳答案 使用IsIconic功能。 关于c++-win32:checkifwindowisminimized,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/4309282/

python - pip 卡住 : show only packages installed via pip

我想知道哪些python包是通过pip安装的,哪些是通过rpm安装的。我在任何virtualenv的外部运行,想知道是否有一些软件包是通过pip安装的。背景:我们的政策是在“根级别”使用RPM。我想找到违反政策的地方。 最佳答案 如何稍微扭转一下问题,只检查哪些属于rpms,哪些不属于rpm。尝试:importos,sys,subprocess,globdeftype_printed(pth,rpm_dirs=False):ifnotos.path.exists(pth):print(pth+'--doesnotexist')ret

python - 模型类未声明显式 app_label 并且不在 INSTALLED_APPS 的应用程序中

我正在使用sphinx并试图为我的Django项目生成文档。我决定首先尝试记录模型,所以在我的.rst文件中我这样做了wdland\.models==============..automodule::wdland.models:members::undoc-members::show-inheritance:但是得到以下错误WARNING:/home/fabou/wdlandenvpy3/source/docs/wdland.rst:9:(WARNING/2)autodoc:failedtoimportmodule'wdland.models';thefollowingexcepti

安卓 4.1 : How to check notifications are disabled for the application?

Android4.1为用户提供了一个复选框来禁用特定应用程序的通知。但是,作为开发人员,我们无法知道通知的调用是否有效。我确实需要检查当前应用程序是否禁用了通知,但我在API中找不到任何设置。有没有办法在代码中检查此设置? 最佳答案 你不能100%不能。在thisGoogleI/O2012video中询问并且新通知的项目负责人声明您不能。编辑2016年更新:现在可以查看了,如thisGoogleI/O2016video中所述.使用NotificationManagerCompat.areNotificationsEnabled(),

安卓 4.1 : How to check notifications are disabled for the application?

Android4.1为用户提供了一个复选框来禁用特定应用程序的通知。但是,作为开发人员,我们无法知道通知的调用是否有效。我确实需要检查当前应用程序是否禁用了通知,但我在API中找不到任何设置。有没有办法在代码中检查此设置? 最佳答案 你不能100%不能。在thisGoogleI/O2012video中询问并且新通知的项目负责人声明您不能。编辑2016年更新:现在可以查看了,如thisGoogleI/O2016video中所述.使用NotificationManagerCompat.areNotificationsEnabled(),

python - 带有 MultiIndex : check if string is contained in index level 的 Pandas 数据框

假设我有一个多索引的pandas数据框,如下所示,取自documentation.importnumpyasnpimportpandasaspdarrays=[np.array(['bar','bar','baz','baz','foo','foo','qux','qux']),np.array(['one','two','one','two','one','two','one','two'])]df=pd.DataFrame(np.random.randn(8,4),index=arrays)看起来像这样:0123barone-0.096648-0.0802980.859359-0.

python - Django/PIL 错误 - 呈现 : The _imagingft C module is not installed 时捕获异常

我正在尝试在我的机器上运行一个网络应用程序/网站,它在OSX10.6.2上运行,但我遇到了一些问题:Caughtanexeptionwhilerending:The_imagingftCmoduleisnotinstalled在python中执行import_imagingft给我这个:>>>import_imagingftTraceback(mostrecentcalllast):File"",line1,inImportError:dlopen(/Library/Python/2.6/site-packages/PIL/_imagingft.so,2):Symbolnotfound

python Selenium : How to check whether the WebDriver did quit()?

我想控制我的WebDriver是否退出,但我找不到相应的方法。(ItseemsthatinJavathere'sawaytodoit)fromseleniumimportwebdriverdriver=webdriver.Firefox()driver.quit()driver#driverisNone#False我还探索了WebDriver的属性,但找不到任何特定方法来获取有关驱动程序状态的信息。同时检查sessionID:driver.session_id#u'7c171019-b24d-5a4d-84ef-9612856af71b' 最佳答案

python - check_call check_output 调用和子进程模块中的 Popen 方法之间的实际区别是什么?

老实说,我只是不明白“非零”状态的行话,无法真正解释帮助页面上正在发生的事情或这意味着什么(甚至没有定义)。有哪些使用python调用其他脚本的例子,其中的这些过程subprocess.call子进程.check_output子进程.popen真的不一样吗?您什么时候会使用其中任何一个,这些方法的明确细节是什么?如果我想要简单的操作系统调用,我应该改用os.system吗? 最佳答案 主要区别在于,popen是一个非阻塞函数(意味着您可以继续执行程序而无需等待调用完成),call和check_output正在阻塞。另一个区别在于它们

python - Pytesseract : "TesseractNotFound Error: tesseract is not installed or it' s not in your path", 我该如何解决这个问题?

我正在尝试在python中运行一个基本且非常简单的代码。fromPILimportImageimportpytesseractim=Image.open("sample1.jpg")text=pytesseract.image_to_string(im,lang='eng')print(text)这就是它的样子,我实际上已经通过安装程序安装了tesseractforwindows。我是Python的新手,我不确定如何继续?此处的任何指导都会非常有帮助。我试过重新启动我的Spyder应用程序但无济于事。 最佳答案 我看到步骤分散在不同