Written in python in windows to pit bat file

1. The file name must be sure not to use Chinese .py, even if you use the # encode-gbk work correctly in the compiler, but when integrated into a bat or script will complain because the cmd window by default, it is another compilation method, in order to properly use also need to change the character set right-click cmd window, to the versatility of the script file name in English or honest it.
2. If you want the user to see the print information, and then there is no other statement, the script finally remember line plus INPUT ()
3. If the path is used symbol interval \ then remember to add the path in front of r (e.g.: r'C: / a ')
4. use of the open file is modified, then remember to finish to add f.flush () for the changes to take effect immediately

Guess you like

Origin www.cnblogs.com/yingyingdeyueer/p/11885452.html
Recommended