上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
摘要: Source code: Lib/HTMLParser.pyThis module defines a class HTMLParser which serves as the basis for parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML. Unlike the parser in htmllib, this parser is not based on the SGML parser in sgmllib.class HTMLParser.HTMLParserAn HTMLParse 阅读全文
posted @ 2012-08-12 21:36 苍术厚朴 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 文档:http://docs.python.org/library/pdb.htmlThe debugger recognizes the following commands. Most commands can be abbreviated to one or two letters; e.g. h(elp) means that either h or help can be used to enter the help command (but not he or hel, nor H or Help or HELP). Arguments to commands must be se 阅读全文
posted @ 2012-08-12 16:26 苍术厚朴 阅读(634) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-# Copyright 2012 splinter authors. All rights reserved.# Use of this source code is governed by a BSD-style# license that can be found in the LICENSE file.from __future__ import with_statementfrom splinter.driver import ElementAPIfrom splinter.element_list import ElementListcl 阅读全文
posted @ 2012-08-12 16:01 苍术厚朴 阅读(1635) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-# Copyright 2012 splinter authors. All rights reserved.# Use of this source code is governed by a BSD-style# license that can be found in the LICENSE file.from __future__ import with_statementimport loggingimport subprocessimport timeimport refrom contextlib import contextmana 阅读全文
posted @ 2012-08-12 15:52 苍术厚朴 阅读(3470) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-:# Copyright 2012 splinter authors. All rights reserved.# Use of this source code is governed by a BSD-style# license that can be found in the LICENSE file."""This module contains the basic API for splinter drivers and elemnts."""from splinter.wit 阅读全文
posted @ 2012-08-12 15:45 苍术厚朴 阅读(1715) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python# Copyright 2012 splinter authors. All rights reserved.# Use of this source code is governed by a BSD-style# license that can be found in the LICENSE file.import unittestfrom splinter import Browserclass TestGoogleSearch(unittest.TestCase): @classmethod def setUpClass(cls)... 阅读全文
posted @ 2012-08-12 15:41 苍术厚朴 阅读(478) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-# Copyright 2012 splinter authors. All rights reserved.# Use of this source code is governed by a BSD-style# license that can be found in the LICENSE file."""This snippet show how to "test" a Facebook feature: the creation of an event.It creates an eve 阅读全文
posted @ 2012-08-12 15:39 苍术厚朴 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 作为脚本语言Python上手容易,但要学好Python能写出一手漂亮的、Pythonic的Python代码并非一日之功,本文的目的在于推荐一些优秀的Python相关的文章(至于书大家可以看dip、learning python和官方手册去),让你在成长为一名Python高手的路上少走一点弯路。注:文章都是英文的,学好Python读懂英文资料这是必须的了。1. PEP8 Style Guide for Python Code排第一的当属Python的编码规范PEP8,这个就不用我多说吧,无论是初学还是高手PEP8都是必须烂熟于胸的。在遵循里面讲述的规则的同时,大家也要记住两句比较特殊的话,不过这 阅读全文
posted @ 2012-08-12 11:41 苍术厚朴 阅读(1135) 评论(0) 推荐(2) 编辑
摘要: 为了防止下面的过程出错,建议:sudo apt-get install build-essential python-dev libxml2-dev libxslt1-dev1.下载splinter 0.4.7.tar.gz包http://pypi.python.org/pypi/splinter/0.4.72.解压 tar -zxvf 安装包 进入cd splinter 0.4.73.安装 sudo python setup.py install ImportError: No module named setuptools wgethttp://pypi.python.org/packag 阅读全文
posted @ 2012-08-12 11:27 苍术厚朴 阅读(1403) 评论(2) 推荐(0) 编辑
摘要: #!/user/bin/python # -*- coding:utf8 -*- import Basic import os ##################################################### ######## Input #### folder = "D:\\安装包" folder = folder.encode("gbk") ######## Global #### fileList =... 阅读全文
posted @ 2012-08-11 20:39 苍术厚朴 阅读(812) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页