按类别查询搜索结果
关于关键词 的检测结果,共 2199
【Python/Ruby】 角形
还看今早 | 2015-08-06 16:51:51 | 阅读(1740) | 评论(0)
还看今早 | 2015-08-06 16:48:50 | 阅读(290) | 评论(0)
【Python/Ruby】 符串大小写转换
wq4113 | 2015-08-03 11:40:22 | 阅读(1420) | 评论(0)
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="background-color:#ffe4ff;">str</span> = <span style="color:#008080;font-weight:bold;">"www.runoob.com"&nbsp;</span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000...【阅读全文】
【Python/Ruby】 符串判断
wq4113 | 2015-08-03 11:36:11 | 阅读(1490) | 评论(0)
# 测试实例一
print("测试实例一")
str = "w3cschool.cc"
print(str.isalnum()) # 判断所有字符都是数字或者字母
print(str.isalpha()) # 判断所有字符都是字母
print(str.isdigit()) # 判断所有字符都是数字
print(str.islower()) # 判断所有字符都是小写
print(str.isupper())...【阅读全文】
zhhhzhang | 2015-08-01 11:14:29 | 阅读(110) | 评论(0)
本文详细介绍了Python中iterator的概念及原理,以及怎么自定义一个自己的iterator。【阅读全文】
wq4113 | 2015-07-30 19:58:47 | 阅读(960) | 评论(0)
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 用户输入字符&nbsp;</span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;">c = <span style="color:#000080;">input</span>(<span style="color:#008080;font...【阅读全文】
【Python/Ruby】 、创建自己的View
jxt_next | 2015-07-30 18:49:31 | 阅读(0) | 评论(0)
在django中,网站的页面或其他内容实际上就是一个个的View。View不是一个类,而是一个方法,声明在views.py文件中。
一、定义一个View
(1)创建一个View:index
点击(【阅读全文】
runningsparrow | 2015-07-26 08:19:43 | 阅读(2080) | 评论(0)
由于目前的Web开发中AJAX、Javascript、CSS的大量使用,一些网站上的重要数据是由Ajax或Javascript动态生成的,并不能直接通过解析html页面内容就能获得(例如采用mechanize、lxml、Beautiful Soup )。要实现对这些页面数据的爬取,爬虫必须支持Javacript、DOM、HTML解析等一些浏览器html、javascript引擎的基本功能。【阅读全文】
【Python/Ruby】 twisted的入门讲
yueming | 2015-07-25 10:33:01 | 阅读(1350) | 评论(0)
<span style="color:#333333;font-family:Arial;font-size:18px;line-height:26px;white-space:normal;background-color:#FFFFFF;"><br />原文链接:&nbsp;<a href="http://blog.csdn.net/zhthl20091003/article/details/7699154" target="_blank">http://blog.csdn.net/zhthl20091003/article/details/7699154</a><br />...【阅读全文】
yueming | 2015-07-25 09:18:15 | 阅读(1260) | 评论(0)
二、应用实例解析2.1 subprocess模块的使用1. subprocess.call>>> subprocess.call(["ls", "-l"])  0  >>> subprocess.call("exit 1", shell=True)  1 2. 调用系统中cmd命令,显示命令执行的结果:x=subprocess.check_output(["echo", "Hello World!"],shell=True)   &n...【阅读全文】
yueming | 2015-07-25 09:17:57 | 阅读(1230) | 评论(0)
1.2. Popen 对象Popen类的实例有下列方法:1. Popen.poll()检查子进程是否已经结束,设置并返回返回码值。2. Popen.wait()等待子进程结束,设置并返回返回码值。WARNING: 当使用 stdout=PIPE 或 stderr=PIPE 并且子进程生成了足够多的输出信息到管道,以至于管道阻塞,将会造成死锁。      &...【阅读全文】
yueming | 2015-07-25 09:17:28 | 阅读(1290) | 评论(0)
subprocess--子进程管理器一、subprocess 模块简介subprocess最早是在2.4版本中引入的。subprocess模块用来生成子进程,并可以通过管道连接它们的输入/输出/错误,以及获得它们的返回值。它用来代替多个旧模块和函数:os.systemos.spawn*os.popen*popen2.*commands.*关于这个模块可以取代的旧函数可以参见 sub...【阅读全文】
wq4113 | 2015-07-22 16:14:24 | 阅读(640) | 评论(0)
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"># -*- coding: UTF-8 -*-&nbsp;# Filename :判断字符串 &nbsp;&nbsp;def is_number(s):&nbsp;&nbsp; &nbsp; try:&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; float(s)&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; return True &nbsp;&nbsp; &nbsp; except Va...【阅读全文】
【Python/Ruby】 python 杂记(
典雅的土地雷 | 2015-07-14 11:17:17 | 阅读(720) | 评论(0)
1、文件读写:
    f    = open(name, "r")
    line = f.readline()
    f.write('abc')
    f.close()
    务必要调用f.close()来关闭文件,为了保险使用  &nb...【阅读全文】
darennet | 2015-07-11 18:08:35 | 阅读(750) | 评论(0)
darennet | 2015-07-11 18:06:53 | 阅读(570) | 评论(0)
【Python/Ruby】 双色球组合程序
浪子回头515 | 2015-07-10 09:39:45 | 阅读(1390) | 评论(0)
版权 归原创作者小宝左右,欢迎转载!转载请注明出处,保留作者信息,谢谢!#!/usr/bin/env python#coding:utf-8#双色球排列组合程序""" autor: xiaobaowang    QQ: 305737438    版权 归原创作者小宝左右,欢迎...【阅读全文】
寂寞暴走伤 | 2015-07-06 16:58:25 | 阅读(840) | 评论(0)
序列以及相关内置函数max,min,reversed,enumerate,sorted,sum,len,str,list,zip【阅读全文】
寂寞暴走伤 | 2015-07-05 16:29:25 | 阅读(8210) | 评论(0)
格式化函数format【阅读全文】