Python
文章平均质量分 60
y100100
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python实现命令行火车票查看器--参考实验楼文档
程序运行效果图: 首先简单介绍下用到的2个重要的库:requests和docopt,可使用命令pip install requests docopt进行安装。 requests是一个很实用的Python HTTP客户端库,编写爬虫和测试服务器响应数据时经常会用到。docopt 命令行参数解析库,docopt 本质上是在 Python 中引入了一种针对命令行参数的形式语言,需实现原创 2018-01-14 22:00:24 · 662 阅读 · 2 评论 -
提示raw_input()和传递参数
from sys import argv # 参数列表中包含两个参数,分别赋值给script, user_name script, user_name = argv#提示符 prompt = '%%%% print "Hi %s, I'm the %s script." % (user_name, script) print "I'd like to ask you a few questio原创 2017-12-26 23:02:30 · 1583 阅读 · 0 评论 -
原字符串中包含单引号,字符串输出则用双引号括起来
my_formatter = "%r %r %r %r" print my_formatter % (1, 2, 3, 4) print my_formatter % ("one", "two", "three", "four") print my_formatter % (True, False, False, True) print my_formatter % (my_formatter,原创 2017-12-25 17:54:58 · 3821 阅读 · 0 评论 -
Python字符串运算符
Python字符串运算符 下表实例变量 a 值为字符串 "Hello",b 变量值为 "Python": 操作符 描述 实例 + 字符串连接 >>>a + b 'HelloPython' * 重复输出字符串 >>>a * 2 'HelloHello' [] 通过索转载 2017-12-25 17:11:40 · 411 阅读 · 0 评论 -
python + selenium搭建自动化测试环境
1、安装Python3.62、安装selenium3.11.03、安装FireFox浏览器4、编写测试示例,保存在test.py中from selenium import webdriver from selenium.webdriver.common.keys import Keys #需要引入keys包 import time driver = webdriver.Firefox() dri...原创 2018-04-21 14:50:57 · 368 阅读 · 0 评论
分享