这是个奇怪的需求,但是习惯 Linux 下工作的兄弟们应该会觉得很正常。先留着脚本,回头有空再写注释吧。

1 @echo off
2 echo normal 
3 echo batch code
4 echo Switch to python
5 more +7 "%~f0" | "%python_path%\python.exe"
6 exit /b
7 ::::::::::::::Start of  Python code::::::::::::::::::::::::::
8 print "This is Python code"

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2021-05-15
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-03
  • 2022-12-23
  • 2021-08-03
  • 2021-11-23
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案