Source Insight unexpectedly does not support utf-8, in order to support the Chinese display, so write a Python applet will be a directory of all files from Utf-8 transcoding to GBK code as follows: #!/usr/local/bin/python#-*-Coding: Utf-8-*-"Source Insight unexpectedly does not support utf-8, in order to support the Chinese display, so write the program will be a directory of all files from Utf-8 transcoding to Gbkusage:chmod +x convert.py./convert.py src Mysrc "Import osimport shutilimport reimport sys ########
1. Common File Transcoding Tool summary
Introduction: Source Insight unexpectedly does not support utf-8, in order to support the Chinese display, so write a Python applet will be a directory of all files from Utf-8 transcoding to GBK code as follows:#!/usr/local/bin/python# -*- coding: utf-8 -*-& #39;& #39;& #39, source insight unexpectedly does not support utf-8, in order to support the Chinese display, So write the program will be a ...
2. Python applet: Scissors, stone, cloth instance Code
Introduction: This article mainly for you in detail the Python applet: scissors, stone, cloth instance code, with a certain reference value, interested in small partners can refer to
3. Python-written file transcoding gadget
Introduction: Source Insight unexpectedly does not support utf-8, in order to support the Chinese display, so write a Python applet will be a directory of all files from Utf-8 transcoding to GBK code as follows: #!/usr/local/bin/python #-*-Coding: Utf-8-*-"Source Insight unexpectedly does not support utf-8, in order to support the Chinese display, so write the program will be a directory of all the files from Utf-8 transcoding to ...
4. Python directory operation Python traverses the folder and stores the result as XML
Introduction: The requirement is to get some types of files in a server directory, considering that the server is Linux, and Windows, so write a Python applet to complete the work, we refer to the use of it
5. Write a Python applet to count the keywords for the test script
Introduction: This article mainly introduces the method of writing Python applet to statistical test script keyword, the example can not only count the number of keywords, but also can be categorized by the main key words, the need for friends can refer to the following
6. A Python applet that calculates the check digit of the ID number
Brief introduction: Idle No matter, then want to write a practical point of the Python applet, how to check the computer ID number, such an article on the internet a grab a lot, here is only a brief introduction
"Related question and answer recommendation":
Windows-server-linux node IP, username and password, how to log into the Linux environment?
Linux-about detecting the CPU and GPU temperature of the Raspberry Pi, why is the two-segment script that is circulating online different?
Windows-server-How do I run a python program in a Linux environment after I log in to Remote Desktop (Windows desktop)?
An "Application exception" Memory error occurred while running the Python program?