码迷,mamicode.com
首页 >  
搜索关键字:chdir    ( 475个结果
python编程快速上手之第13章实践项目参考答案(13.6.3)
import os,PyPDF2 os.chdir('C:\\Users\\Administrator\\Python35-32') dict=open('C:\\Users\\Administrator\\Python35-32\\dictionary.txt')#读入字典 pdfReader =... ...
分类:编程语言   时间:2017-05-21 09:49:50    阅读次数:218
python编程快速上手之第13章实践项目参考答案(13.6.1)
import os,PyPDF2 os.chdir('D:\\My Documents') for folderName, subfolders, filenames in os.walk('D:\\My Documents'): for file in filenames: if file.end... ...
分类:编程语言   时间:2017-05-18 22:36:09    阅读次数:445
python编程快速上手之第12章实践项目参考答案(12.13.3)
1 #! python3 2 import openpyxl,os,glob 3 os.chdir('C:\\Users\\Administrator\\Python35-32') 4 list=glob.glob('*.txt') 5 print(list) 6 wb = openpyxl.Wor... ...
分类:编程语言   时间:2017-05-16 00:42:33    阅读次数:152
Long Way To Go 之 Python 5 (2)
os 模块 提供对操作系统进行调用的接口 os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") 改变当前脚本工作目录;相当于shell下cd os.curdir 返回当前目录: ('.') os.pardir 获取当前目录的父目录字符 ...
分类:编程语言   时间:2017-05-15 21:05:49    阅读次数:173
python编程快速上手之第12章实践项目参考答案(12.13.2)
#! python3 # blankRowInserter.py import openpyxl,os os.chdir('C:\\Users\\Administrator\\Python35-32') n=int(input('rowNum')) m=int(input('insertrowNum... ...
分类:编程语言   时间:2017-05-14 10:29:00    阅读次数:417
大文件不断行切割
#! /usr/bin/python #! -*- coding:utf-8 -*- import os def SplitFile(cnt): path='e:\data' filename=path+'\\qunti_deal.txt' os.chdir(path) i=0 n=0 size=o ...
分类:其他好文   时间:2017-05-13 11:18:42    阅读次数:163
python编程快速上手之第10章实践项目参考答案(12.13.1)
#! python3 # multiplicationTable.py import openpyxl,os from openpyxl.styles import Font, NamedStyle os.chdir('C:\\Users\\Administrator\\Python35-32') ... ...
分类:编程语言   时间:2017-05-12 01:38:15    阅读次数:241
OS模块
os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") 改变当前脚本工作目录;相当于shell下cd os.curdir 返回当前目录: ('.') os.pardir 获取当前目录的父目录字符串名:('..') os.makedirs ...
分类:其他好文   时间:2017-05-06 01:00:02    阅读次数:212
DOS:第一天
cd,有时也写作chdir(change directory,改变目录),是在Unix、Windows和DOS操作系统下用于改变工作目录的命令行命令。在Unix的外壳脚本与Windows或DOS的批处理文件中亦可使用。CHDIR()还是Visual Basic改变工作目录的一个函数。 目录 [隐藏] ...
分类:其他好文   时间:2017-05-03 17:26:57    阅读次数:227
Python 3 运行 shell 命令
#python 3.5 , win10 引入包 #os.chdir('path') import osimport subprocess #https://docs.python.org/3.5/library/subprocess.html?highlight=subprocess#module- ...
分类:编程语言   时间:2017-05-02 13:52:43    阅读次数:1474
475条   上一页 1 ... 33 34 35 36 37 ... 48 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!