
python
liuxizhen2009
这个作者很懒,什么都没留下…
展开
-
Python之数据类型讲解
http://www.2cto.com/kf/201009/74920.htmlPython之数据类型讲解Number(数字) 包括int,long,float,double,complexString(字符串) 例如:hello,"hello",helloList(列表) 例如:[1,2,3],[1,2,3,[1,2,3],4]转载 2012-12-01 23:13:12 · 482 阅读 · 0 评论 -
Python进制转换(二进制、十进制和十六进制)
原处http://www.cnblogs.com/zhangpengshou/archive/2012/03/12/2392068.html#!/usr/bin/env python# -*- coding: utf-8 -*-# 2/10/16 base trans. wrote by srcdog on 20th, April, 2009# ld elements in bas转载 2012-12-01 20:06:05 · 642 阅读 · 0 评论 -
python输入输出
百度文库上的吧,不知道出处了在这篇文章中,将学习如何处理文件。首先,回顾一种使用 Python 输出数据的简单方式,然后学习文件对象,Python 程序用它从文件读取数据和把数据写入文件。将演示打开文件的不同模式,最后将显示如何读取和写入二进制文件。 读取、写入和 Python 在 “探索 Python” 系列以前的文章中,学习了基本的 Python 数据类型和一些容器数据类型,例转载 2013-01-21 15:57:16 · 902 阅读 · 0 评论 -
python实现串口通信 要导入serial的包 而且刚开始在等待接受收到0x45退出
import sys,threading,time;import serial;import binascii,encodings;import re;import socket;from struct import *;class ComThread: def __init__(self, Port=1): self.l_serial = None;转载 2014-11-23 10:27:57 · 9134 阅读 · 0 评论 -
python tcp client multithread
#-*- coding:utf-8 -*-import os,sys,timeimport socketimport threadingADDR0 = ('192.168.1.140',30202,0)ADDR1 = ('192.168.1.141',30010,1)ADDR2 = ('192.168.1.142',30202,2)ADDR3 = ('192.168.1.1...原创 2018-11-06 21:42:20 · 485 阅读 · 0 评论 -
securecrt能支持脚本
下面是一个例子 # $language = "python"# $interface = "1.0"def Main(): crt.Screen.Synchronous = True crt.Screen.Send("rm -rf demofile\n") # 先删除旧文件 crt.Screen.WaitForString("[xxx@linux xx]$ ")...转载 2018-11-08 22:47:38 · 1659 阅读 · 0 评论 -
python 连接mysql
python大法好用。#!/usr/bin/python# -*- coding: UTF-8 -*-import mysql.connectorconn = mysql.connector.connect(host='192.168.1.41', user='admin', password='123456', database='thinkcmf5', ...原创 2018-12-20 11:16:20 · 233 阅读 · 0 评论