巴扎黑
浏览量13238    |    粉丝242    |    关注1
  • 巴扎黑

    巴扎黑

    2016-12-08 10:01:51
    python访问纯真IP数据库
    通过IP地址判断客户端是网通的还是电信的。 使用一个纯文本的IP纯真数据库,用Python写了一个小程序。核心代码: #!/usr/bin/env python #site www.jbxue.com
    2124
  • 巴扎黑

    巴扎黑

    2016-12-08 10:07:48
    Python2.7安装pydbg
    一、环境 Windows XP 安装Microsoft Visual Studio 2010 安装Python2.7 设置环境变量:VS90COMNTOOLS=%VS100COMNTOOLS% 下载安装依赖包并分别解压缩: http://libdasm.googlecode.com/files/libdasm-1.5.tar.gz https://codeload.github.com/OpenRC ...
    2039
  • 巴扎黑

    巴扎黑

    2016-12-08 10:13:06
    一道python笔试题
    有一个record.txt的文档,内容如下: # name, age, score tom, 12, 86 Lee, 15, 99 Lucy, 11, 58 Joseph, 19, 56 第一栏为姓名(name),第二栏为年纪(age),第三栏为得分(score) 现在,写一个Python程序, 1)读取文件 2)打印如下结果: 得分低于60的人都有谁?
    3899
  • 巴扎黑

    巴扎黑

    2016-12-08 10:14:42
    python判断闰年
    #-*- coding:utf-8 -*- try: year = int(raw_input('请输入年份(如2008): ')) except: print '请输入正确的年份' exit() is_leap = False if year % 100 == 0 and year % 400 == 0: is_leap = True elif year % ...
    4135
  • 巴扎黑

    巴扎黑

    2016-12-08 10:26:58
    python的函数定义和调用
    Forward declaration http://en.wikipedia.org/wiki/Forward_declaration everything has to be defined before you call it This is exactly the same as in C/C++" Well no it is isn't at all really. You ca ...
    1760
  • 巴扎黑

    巴扎黑

    2016-12-08 10:32:00
    python实现二叉查找树
    这次用完成的是二叉树,是一种简单的树型结构。同样使用python实现 多的不说了,上代码吧。 # -*- coding: cp936 -*- #--------------------------------------------- # # author chile ...
    1466
  • 巴扎黑

    巴扎黑

    2016-12-08 10:34:24
    Python程序的执行原理
    1. 过程概述   Python先把代码(.py文件)编译成字节码,交给字节码虚拟机,然后虚拟机一条一条执行字节码指令,从而完成程序的执行。 2. 字节码   字节码在Python虚拟机程序里对应的是PyCodeObject对象。   .pyc文件是字节码在磁盘上的表现形式。 3. pyc文件   PyCodeObject对象的创建时机是模块加载的时候,即import。   Pyt ...
    1997
  • 巴扎黑

    巴扎黑

    2016-12-08 10:39:02
    Python 数据库相关操作
    主要是通过python的DBUtils库、MySQLdb库来实现连接池操作数据库 import MySQLdb from DBUtils.PooledDB import PooledDB class DBHelper(object): __pool = None def __init__(self): self._conn ...
    1485
  • 巴扎黑

    巴扎黑

    2016-12-08 10:40:55
    使用python将mysql的查询数据导出到文件
    mysql官方提供了很多种connector,其中包括python的connector。 下载地址在:http://dev.mysql.com/downloads/connector/python/ 直接安装即可。 在python中: 1. 连接: import mysql.connector cnx = mysql.connector.connect(user='scott ...
    2018
  • 巴扎黑

    巴扎黑

    2016-12-08 10:42:57
    Python简单时间日期处理
    在使用一个编程语言的时候,有些功能必不可少。 其中就有日期的计算。 import datetime #日期初始化: d1 = datetime.datetime(2005, 2, 16) d2 = datetime.datetime(2004, 12, 31) #日期相减: print (d1 - d2).days starttime = datetime.datet ...
    1324

最新下载

更多>
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号