拷贝来自:http://www.cnblogs.com/plateFace/p/5018686.html using System; namespace StateMachine2.State { public enum AnimationState { Walk = 1, Dead, } publ... ...
分类:
其他好文 时间:
2018-04-28 14:33:14
阅读次数:
136
一、os os.walk是一个非常强大的方法,可以将文件夹下的子文件夹里的文件遍历出来 os.walk返回的是一个二维数组,数组每个元素都包含绝对路径、文件夹、文件三个元素,可以用三个变量来循环 二、sys 三、random 四、string 五、time 六、hashlib 七、json ...
分类:
编程语言 时间:
2018-04-27 19:52:35
阅读次数:
188
json SSAVL2470 10.90.24.81 将json编码的字符串转换为一个Python的数据结构 json_str = json.loads(doc) 如果将一个Python的数据结构转换为json编码的字符串用json.dumps(json_str) 如果你要处理的是文件而不是字符串, ...
分类:
编程语言 时间:
2018-04-24 18:57:53
阅读次数:
228
概述 os.walk() 方法用于通过在目录树中游走输出在目录中的文件名,向上或者向下。 os.walk() 方法是一个简单易用的文件、目录遍历器,可以帮助我们高效的处理文件、目录方面的事情。 在Unix,Windows中有效。 语法 walk()方法语法格式如下: 参数 top -- 是你所要便利 ...
分类:
编程语言 时间:
2018-04-20 16:18:24
阅读次数:
188
#coding=utf-8 import osdef find_file(arg,dirname,files): #for i in arg: #print i for file in files: file_path=os.path.join(dirname,file) print 'file_p ...
分类:
编程语言 时间:
2018-04-20 16:18:00
阅读次数:
205
#!/usr/bin/env python # -*- coding: utf-8 -*- from zipfile import * import zipfile #解压zip文件 def unzip(): source_zip="c:\\update\\SW_Servers_20120815.z... ...
分类:
编程语言 时间:
2018-04-18 13:33:05
阅读次数:
175
Of course it was not a cake-walk in the beginning 3. This is going to be a cakewalk 这将易如反掌。 4. Julia roberts : pretending to be a parent is a cakewalk ...
分类:
其他好文 时间:
2018-04-17 19:59:39
阅读次数:
186
1、获取当前月份前一个月月份 import datetime aaa = ((datetime.datetime.now() + datetime.timedelta(days = -30))).strftime("%Y%m") print(aaa) 2、遍历目录 os.walk(dir_name)... ...
分类:
其他好文 时间:
2018-04-16 16:22:27
阅读次数:
172
一.依据闭包实现一个容器 二.使用闭包作为回调 三.使用闭包函数调用类中方法 关联文章:http://www.cnblogs.com/fps2tao/p/8727482.html 转:https://www.cnblogs.com/itfenqing/p/7073307.html ...
分类:
Web程序 时间:
2018-04-16 16:09:37
阅读次数:
274
Problem Statement Fox Ciel is going to walk through an unpaved road to meet her friend. The road is one dimensional. It is separated into N parts numb ...
分类:
其他好文 时间:
2018-04-14 12:44:21
阅读次数:
166