Python book recommendations

Source: Internet
Author: User

Python book recommendation list:

Tip: about how to get the file name under the directory on the Windows platform upstream. (The location of my Python book E:\Python\Python_book)

D:\>e:

E:\>CD Python

E:\PYTHON>CD Python_book

e:\python\python_book>dir/b > Name.csv

E:\python\python_book>

A name.csv file is generated under E:\Python\Python_book, which is a list of the names of the files under the directory.

A similar method under Linux can also get a list of the names of the files.

[Email protected]~] #ll-rth > Name.csv

Of course, you can blindly use awk for preliminary cropping to get a more appropriate list of file names. (however, after the CSV format, we can easily use Excel to do further processing (separated by a space to easily extract the file name list))

When we get a list of the names of the files, we can rename them in batches, which is the most useful. However, these can be handled through Excel, of course, if you feel that the lattice is not enough, you can write your own script to deal with, then Python provides a powerful text processing ability is appropriate.

Sub-platform Processing mode:

Windows platform:

Re Old_file_name new_file_name

.......

Re Old_file_name new_file_name

Then the file needs to change the name of the above side of the syntax to do, copy and paste into Notepad to save the. bat end of the file format, when we double-click to run, we want to modify the name of the file will be batch modified.

Linux platforms:

MV Old_file_name New_file_name

.......

MV Old_file_name New_file_name

Then make the sh script and execute it.

Linux has a lot of methods, here is enumerated one, if combined with regular words, may be unexpected effect, you might want to try the rename function, which need to involve the regular expression.

Python book recommendations

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.