随笔分类 - python
摘要:class _AttributeHolder(object): """Abstract base class that provides __repr__. The __repr__ method returns a string in the format:: ClassName(attr=nam
阅读全文
摘要:Python sorted() 函数 Python 内置函数 描述 sorted() 函数对所有可迭代的对象进行排序操作。 sort 与 sorted 区别: sort 是应用在 list 上的方法,sorted 可以对所有可迭代的对象进行排序操作。 list 的 sort 方法返回的是对已经存在的
阅读全文
摘要:callable() 函数用于检查一个对象是否是可调用的。如果返回 True,object 仍然可能调用失败;但如果返回 False,调用对象 object 绝对不会成功。
阅读全文
摘要:vim ~/.bashrc VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh source ~/.bas
阅读全文
摘要:cd mkdir .pip cd .pip vim pip.conf [global]#阿里index-url=http://mirrors.aliyun.com/pypi/simple/#百度index-url=https://mirror.baidu.com/pypi/simple#清华inde
阅读全文
摘要:新建:C:\Users\Administrator\pip\pip.ini 添加: [global]index-url = http://pypi.douban.com/simple[install]trusted-host = pypi.douban.com
阅读全文
摘要:Python rpartition() 方法 Python 字符串 描述 rpartition() 方法类似于 partition() 方法,只是该方法是从目标字符串的末尾也就是右边开始搜索分割符。。 如果字符串包含指定的分隔符,则返回一个3元的元组,第一个为分隔符左边的子串,第二个为分隔符本身,第
阅读全文
摘要:class Field(object): widget = TextInput # Default widget to use when rendering this type of Field. hidden_widget = HiddenInput # Default widget to use
阅读全文
摘要:python版本:Python-3.5.5.tgz yum install -y gcc-c++ tar -xvf Python-3.5.5.tgz cp Python-3.5.5 /usr/local cd /usr/local/Python-3.5.5 ./configure make && m
阅读全文
浙公网安备 33010602011771号