05 2019 档案

摘要:python subprocess popen 静默模式(不弹出console控制台) 参考链接:https://blog.csdn.net/ztb3214/article/details/19256849?utm_source=blogxgwz9 阅读全文
posted @ 2019-05-30 17:55 ibingshan 阅读(3587) 评论(0) 推荐(0)
摘要:python __file__ is not defined 解决方法 __file__ 是在python module 被导入之后的时候生成的一个变量,所以在 __file__ 不能被使用,但是又想获取当前文件的路径应该怎么做: 方法一: import inspect, os.path filen 阅读全文
posted @ 2019-05-28 14:55 ibingshan 阅读(9567) 评论(0) 推荐(2)
摘要:bat 获取当前文件夹的文件名 阅读全文
posted @ 2019-05-22 17:37 ibingshan 阅读(6671) 评论(0) 推荐(0)
摘要:bat 获取当前目录的父目录 @echo off echo batchfile=%0 echo full=%~f0 setlocal for %%d in (%~dp0.) do set Directory=%%~fd echo Directory=%Directory% for %%d in (% 阅读全文
posted @ 2019-05-22 17:22 ibingshan 阅读(4925) 评论(0) 推荐(0)
摘要:bat echo 每行不同的颜色 先看代码: 使用注意事项: 1.你的代码放在 :start 和第一行 goto :eof之间 2.换行使用 echo. 3.最好使用双引号把内容括起来,不然遇到空格就会报拒绝访问的错误,内容如果包含特殊字符(例如:"a:!aa" 等等,一般是win不允许我们用来命名 阅读全文
posted @ 2019-05-22 16:19 ibingshan 阅读(5419) 评论(0) 推荐(0)
摘要:bat 判断命令是否执行成功 连接符形式,&& 表示成功,|| 表示失败,例如: call xxx.bat && (goto succeed) || goto failed :succeed echo successfully :failed echo failed pause 使用%errorle 阅读全文
posted @ 2019-05-22 15:24 ibingshan 阅读(8379) 评论(0) 推荐(0)
摘要:Python 获得程序 exe 的版本号 python中需要安装 pywin32 包 阅读全文
posted @ 2019-05-17 16:12 ibingshan 阅读(1559) 评论(0) 推荐(1)
摘要:Python 列出 windows 安装的软件 参考链接:https://stackoverflow.com/questions/802499/how-can-i-enumerate-list-all-installed-applications-in-windows-xp 阅读全文
posted @ 2019-05-16 16:45 ibingshan 阅读(851) 评论(0) 推荐(0)
摘要:bat 判断变量字符串中是否包含字符串 代码注释: 在 way 1 中,加了 >nul 就可以不打印 echo 的内容, way1 可以不设置 setlocal 阅读全文
posted @ 2019-05-15 10:23 ibingshan 阅读(19651) 评论(2) 推荐(0)
摘要:bat 读取 ini 配置文件 config.ini: .bat: 注意:.bat 和 config.ini 在同一个文件夹 参考链接:https://www.cnblogs.com/urwlcm/p/4433871.html 阅读全文
posted @ 2019-05-15 09:32 ibingshan 阅读(5216) 评论(1) 推荐(0)
摘要:git -C <other-git-repo-path> [git-command] 指定其它路径的仓库 执行命令 注意,-C 要在命令之前 例如: git -C d:/testRepo status 阅读全文
posted @ 2019-05-14 16:58 ibingshan 阅读(1266) 评论(0) 推荐(0)
摘要:git diff 检查更新 git fetch #需要先 fetch git diff master..origin/master --name-only -- [path] #path:指定检查 可以是文件或者文件夹,--name-only:只列出有变化的文件名 git diff master.. 阅读全文
posted @ 2019-05-10 10:41 ibingshan 阅读(2064) 评论(0) 推荐(0)
摘要:git log master..origin/master --oneline | wc -l 怎么知道本地仓库是不是最新的 git fetch # 一定要先 fetch git log master..origin/master --oneline | wc -l 如果得出的结果是 0,代表本地仓 阅读全文
posted @ 2019-05-10 09:05 ibingshan 阅读(481) 评论(0) 推荐(0)
摘要:python -m pip install [package] --no-deps 有些 packages 会依赖一些其它的 package,当我们离线安装 whl 的时候,就无法联网下载依赖包,所以我们需要 --no-deps 来去掉依赖包的安装,这样就能离线安装 whl 了 但是 如果 whl 阅读全文
posted @ 2019-05-08 11:11 ibingshan 阅读(6394) 评论(0) 推荐(1)
摘要:python pip 'nonetype' object has no attribute 'bytes' 更新 pip for Windows : for Linux : 阅读全文
posted @ 2019-05-07 16:49 ibingshan 阅读(566) 评论(0) 推荐(0)