草庐IT

autoflake

全部标签

python - 编写一个脚本来运行带参数的命令

如何在Windows中编写运行以下命令的脚本?autoflake-i-r--remove-all-unused-imports%file_directory%我的脚本是这样的:file_directory=input("Enterdirectorynametorunautoflake:")defautoflake_run():try:#Iwouldliketorunthecommandhere.except:print("Pathfileerror.Pleasemakesuredirectoryexists.")autoflake_run() 最佳答案