Python linecache, glob module, linecacheglob
Today I learned two interesting modules: linecache and glob.
Linecache Module
In python, there is a handy module linecache, which allows any row from any file and is optimized using the cache. It is
How to Use the glob module in Python to find the file path
This article mainly introduces how to use the glob module in Python to find the file path. It is very simple to use the iglob method in the module. For more information, see
The glob module
Author: vamei Source: http://www.cnblogs.com/vamei welcome reprint, please also keep this statement. Thank you!
1. Introduction to paths and files
See Linux File System
Http://www.cnblogs.com/vamei/archive/2012/09/09/2676792.html
2. OS. Path
Glob uses the Unix shell rule to find a file name that matches a pattern. This module is available whenever the program needs to find a set of files in the file system that match the name to a pattern.Glob pattern rules are not the same as regular
This article mainly introduces in Python uses the Glob module to look for the file path the method, uses the module the Iglob method to realize is very simple, needs the friend to be possible to refer to under
The Glob module is one of the simplest
One, subprocess module1.subprocess and commonly used encapsulation functionsWhen we run Python, we are all creating and running a process. Like the Linux process, a process can fork a child process and let the child process exec another program. In
first, batch and Shell
Directories and files:
The code is as follows:
C:\TESTFOLDER\TEST├─test2└─test3Test.txt
Delete the directory and all files under it:
The code is as follows:
RMDIR/S/q C:\TestFolder\test
Delete files from all directories,
First, batch and shell
Directories and documents:
Copy Code code as follows:
C:\TESTFOLDER\TEST
├─test2
└─test3
Test.txt
Delete the directory and all the files under it:
Copy Code code as follows:
From http://blog.sina.com.cn/s/blog_5d236e060100ep4y.html ~ Type = v5_one & label = rela_nextarticle a forum: http://www.python-forum.org/pythonforum/index.php
A python Article Index
Total number is: 102
Python basics:
Python basics 31 [_ XXX _
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.