例如,可以使用sys . argv变量在命令行中访问传递给脚本的参数。
For example, you can access parameters passed to scripts on the command line using the sys.argv variable.
而且,它还故意忽略针对CLASSPATH的全部环境变量设置,还忽略您提供的命令行参数- cp。
Moreover, it deliberately ignores any environment variable Settings for CLASSPATH or the command-line argument -cp that you supply.
要是这个应用程序的内容更充实,那么我就可能用命令行选项、环境变量或配置文件来配置这些参数。
If this were a more fleshed-out application, I might configure these parameters with command-line options, environment variables, or a configuration file. But for now, this style is adequate.
应用推荐