Batch processing can be easily mixed with other languages programming, in addition to fun, there is considerable practical value, such as the Windows version of the Ruby Gem Package Manager is the use of batch processing and Ruby mixed writing, Bathome produced by the Command Toolkit manager BCN used bat+ A mixed implementation of JScript.
Cn-dos and Bathome Forum has a post introduction and demonstration of batch processing and a variety of language scripts mixed programming, interested can search to see.
Python does not criticize the file suffix, as long as the program contains the correct Python code can be interpreted with the Python interpreter execution.
The hybrid programming method for batching and Python is simple, save as Xx.bat, and the code is as follows:
"" ":: ================= This is a note:: Batch-to-Python programming:: May 18, 2016 14:26:03 Codegay:: Write Batch code below @echo Off&clsecho batch Echopython.exe%0&pause::================= This is the comment "" "#下面写你的python代码print (" python print ") #如果需要python输出中文, Need to save the file as Utf8print ("Chinese")
The above is a small series to introduce you to the batch processing and Python code mixed programming method of knowledge, I hope to help you, if you have any questions please give me a message, small series will promptly reply to you. Thank you very much for the support of the Scripting House website!