首页 软件开发 代码片段 python ( Page 14 )

python 1073

#Python
自己实现的2048

# _*_utf-8_*_ SCREEN_SIZE = (640,480) import pygame from pygame.locals import * from gameo…

2015-11-10 390

#Python
获取文件的MD5码等

#/usr/bin/env python #coding:utf-8 import sys import os def getFileHashCode(filename,type)…

2015-11-10 539

#Python
if elif else 使用

1 #!/usr/bin/env python 2 while True: 3 4 score=int(raw_input('please input your score(0-1…

2015-11-08 662

#Python
用Python配置JDK环境

#!usr\bin\env python # -*- coding: utf-8 -*- ''' 设置JDK的环境变量,基本逻辑: 若已有JAVA_HOME则替换其值,否则创建并添…

2015-11-07 777

#Python
python3下载妹子图,你懂的。

#author:lenglingx@gmail.com #date:2014-12-08 #coding:utf-8 import os import sys import re …

2015-11-06 416

#Python
打印命令行参数

#打印命令行参数 #!/usr/bin/python import sys import string if len(sys.argv) < 2: print "NO can…

2015-11-06 985

#Python
将十进制的数转换为任意进制

#coding: utf-8 import math def translate(num,base_num): if num < base_num: return str(n…

2015-11-05 158

#Python
基于tornado的web linux远程登录

import select import socket import errno from threading import Thread from tornado.websock…

2015-11-05 422

#Python
根据定义实现基本的回文数检测程序

#! -*- coding: utf-8 -*- #/usr/local/env python def check_huiwen(number): number = list(nu…

2015-11-05 335

#Python
文件结构扁平化

def flatten(dictionary): stack = [((), dictionary)] result = {} while stack: path, current…

2015-11-04 379
1 12 13 14 15 16 90