前言 Front Matter Contents 1. 开胃菜 Whetting Your Appetite 2. 使用Python解释器 Using the Python Interpreter 2.1 调用解释器 Invoking the Interpreter 2.1.1 参数传递 Argument Passing 2.1.2 交互模式 Interactive Mode 2.2 解释器及其环境 The Interpreter and Its Environment 2.2.1 错误处理
本书全面系统地介绍了Red Hat Linux 6。全书共分为五个部分,包括35章和四个附录。第一部分为Red Hat Linux的介绍和安装;第二部分为服务配置;第三部分为系统管理;第四部分为Linux编程;第五部分为附录。本书内容翔实、涉及领域广泛,并且提供了详细的例子和大量的参考资料(包括书籍、电子文档和Internet站点),是一本学习、使用和管理Linux不可多得的好书。 目 录 译者序 前言 第一部分 Red Hat Linux的介绍与安装 第1章 Red Hat Linux和UN
前言 Front Matter Contents 1. 开胃菜 Whetting Your Appetite 2. 使用Python解释器 Using the Python Interpreter 2.1 调用解释器 Invoking the Interpreter 2.1.1 参数传递 Argument Passing 2.1.2 交互模式 Interactive Mode 2.2 解释器及其环境 The Interpreter and Its Environment 2.2.1 错误处理
本文实例讲述了Python实现文件按照日期命名的方法。分享给大家供大家参考。具体实现方法如下:
这里实现文件按照创建的时期批量重命名的功能
# -*- coding: utf-8 -*-
import os
import time
import datetime
rootDir = "I:/1/"
dic={}
for dirName,subDirs,fileList in os.walk(rootDir):
print dirName
for fn in fileList: