且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

相当于 Windows 中的 Unix eval

更新时间:2022-01-25 05:00:12

如果它在 cmd.exe 中,使用临时文件是唯一的选择 [据我所知]:

If it's in cmd.exe, using a temporary file is the only option [that I know of]:

python -c "print(\"Hi\")" > temp.cmd
call temp.cmd
del temp.cmd