https://my.oschina.net/mcyang000/blog/289460 打开路径含有中文的文件时,要注意: 1 在windows对文件名编码是采用gbk等进行编码保存,所以要将文件路径先解码,在按gbk编码: 字符串--解码成unicode--编码(注意str和unicode的转换) with open(r"D:\我的文档\桌面\python\config.ini".decode('utf8').encode('gbk'),'rb') as f: print f
适用场景 在存在固定长度的算法中可以可视化算法执行的过程,比如对一个固定长度的数组的遍历,就是一种适合使用进度条来进行可视化的场景.而一些条件循环,比如while循环,不一定适合使用进度条来对算法执行过程进行可视化,典型的一个场景就是自洽的优化算法. tqdm进度条的使用方法与效果 调用的方法也非常的容易,只需要将我们常用的range函数替换成tqdm中自带的trange即可. # test_tqdm.py from tqdm import trange import time for i in
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication3 { public partial class Form1 :