03 2013 档案
摘要:首先要确定一个问题,任何的编码转化都是要先将字串decode为unicode 然后再encode为你想要的编码 注意这个encode的参数不能是unicode 原因很简单,你总不能讲unicode再次转化为unicode吧 首先在ide eclipse里面 文件本身都是有文件格式的 windows下面默认是anci 也就是gbk 文件在开头的时候可以写上文件的代码的编码#coding: ...
        阅读全文
            
摘要:>>> class counter:... count = 0 ... def __init__(self):... self.__class__.count += 1 ... >>> counter<class __main__.counter at 010EAECC>>>> counter.count ...
        阅读全文
            
摘要:pydev debugger: starting ******************** Tactic Installation ******************** Verifying the database is installed. The default is no password if you have followed the instructions to...
        阅读全文
            
摘要:http://tiffanylam2010.blog.163.com/blog/static/17078035120116250553238/ython以目录来组织模块, 就是所谓的包. 用包的一大好处: 可以解决名字空间冲突的问题, 即文件重名问题. 下面主要说3点: 1. 如何使一个目录变成包,如何import 目录下放一个__init__.py文件(内容可以为空), import包内模块的时候使用"."分割, 比如import Apackage.Amodule 2. __init__.py的__all__变量 __all__指定的是指此包被import * 的时候, 
        阅读全文
            
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号