易截截图软件、单文件、免安装、纯绿色、仅160KB

对python的isinstance的认识

>>> class objA:
...     pass
...
>>> A = objA()
>>> B = 'a','V'
>>> B
('a', 'V')
>>> C = 'a string'
>>> print instance(A,objA)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'instance' is not defined
>>> print isinstance(A,objA)
True
>>> print isinstance(B,tuple)
True
>>> print isinstance(C,tuple)
False
>>> print isinstance(C,string)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'string' is not defined
>>> print isinstance(C,basestring)
True
>>>


相关文档:

Python & XML


Chapter 1
Python and XML
Python and XML are two very different animals, each with a rich
history. Python is a full-scale programming language that has grown
from scripting world roots in a very organic way, through the vision
and guidance of Python's inventor, Guido van Rossum. Guido continue ......

(python)http://www.python.org/

中文简介
  Python (发音:[ 'paiθ(?)n; (US) 'paiθ?n ]n.蟒蛇,巨蛇 ),是一种面向对象的解释性的计算机程序设计语言,也是一种功能强大而完善的通用型语言,已经具有十多年的发展历史,成熟且稳定。Python 具有脚本语言中最丰富和强大的类库,足以支持绝大多数日常应用。它的名字来源于一个喜剧,也许最初设 ......

python 中文乱码 问题深入分析

 
转自:http://hi.baidu.com/%C1%EE%BA%FC%CF%F3/blog/item/efb76fb7f0411dc437d3ca20.html
 
在本文中,以'哈'来解释作示例解释所有的问题,“哈”的各种编码如下:
  1. UNICODE (UTF8-16),C854;
  2. UTF-8,E59388;
  3. GBK,B9FE。
一、python中 ......

Python的串口通讯第三方库PySerial

 最近要用到串口通讯,简单易用的Python又帮上忙了,多亏了庞大的第三方资源~~~ :)
pySerial
Overview
This module encapsulates the access for the serial port. It provides
backends for Python running on Windows, Linux, BSD (possibly any POSIX
compliant system), Jython and IronPython (.NET and M ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号