码迷,mamicode.com
首页 >  
搜索关键字:file python3    ( 63124个结果)
Python读写文件
1.open使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。file_object = open('thefile.txt')try: all_the_text = file_object.read( )finally: f...
分类:编程语言   时间:2014-07-27 22:58:39    阅读次数:221
sphinx的配置
## Sphinx configuration file sample## WARNING! While this sample file mentions all available options,# it contains (very) short helper descriptions on...
分类:其他好文   时间:2014-07-27 22:46:29    阅读次数:476
中山大学2007级硕士研究生泛函分析考试题
分类:其他好文   时间:2014-07-27 22:44:09    阅读次数:213
Linux中vi显示中文乱码的问题
由于在windows下默认是gb编码,而我的vim默认是utf-8(gedit默认也是utf-8),所以打开会成乱码。修改了一下配置文件,使vi支持gb编码就好了。$vi~/.vimrclet &termencoding=&encodingset fileencodings=utf-8,gbk$:w...
分类:系统相关   时间:2014-07-27 22:40:29    阅读次数:303
Sed 整理
1. basic optionssed [options] {command} {input-file}sed -nsed -n 'p' a.out打印a.out文件内容-n: 取消默认打印到屏幕功能sed -fsed [options] -f {sed-commands-in-file} {i.....
分类:其他好文   时间:2014-07-27 22:35:39    阅读次数:375
samba4.1.9安装
./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var ...
分类:其他好文   时间:2014-07-27 22:22:19    阅读次数:323
rails下mysql出错问题mysql_api,blog/text
问题一:提示出错:cannot load such file -- mysql/mysql_api (LoadError)此时我们回来看gem install mysql 时提示At the time of building this gem, the necessary DLL files whe...
分类:数据库   时间:2014-07-27 22:18:29    阅读次数:289
java压缩解压zip文件,中文乱码还需要ant.jar包
va] view plaincopyprint?packagecn.cn;importjava.io.BufferedOutputStream;importjava.io.File;importjava.io.FileInputStream;importjava.io.FileOutputStrea...
分类:编程语言   时间:2014-07-27 21:33:35    阅读次数:316
文件操作工具类
package?com.mzq.util; import?java.io.File; import?java.io.FileInputStream; import?java.io.FileOutputStream; import?java.io.FileWriter; import?java.io.IOException; import?java.io.PrintWriter...
分类:其他好文   时间:2014-07-27 12:12:40    阅读次数:242
[Python]ConfigParser解析配置文件
最近发现很多接口配置都硬编码在soucefile中了,于是就看了下python怎么解析配置文件,重构下这一块。这个应该是早就要作的。。。[mysqld] user=mysql pid-file=/var/run/mysqld/mysqld.pid skip-external-locking old_passwords=1 skip-bdb skip-innodb users=aa,bb,cc [name..
分类:编程语言   时间:2014-07-27 12:02:08    阅读次数:255
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!