Begin with a simple program that reads in a filename from the command-line.
首先从一个简单的程序开始,该程序从命令行读入一个文件名。
If you provide a filename as an argument, the monkeyrunner command runs the file's contents as a Python program; otherwise, it starts an interactive session.
如果您提供一个文件名作为运行参数,则monkeyrunner将视文件内容为Python程序,并加以运行;否则,它将提供一个交互对话环境。
You will notice that this program takes two parameters: the filename and the longest delay one is willing to wait.
您将注意到这个程序采用两个参数:文件名和客户愿意等待的最长延迟。
Typically, if a filename argument is specified, the program takes that as its input.
通常,如果指定了文件名参数,则程序把它作为输入。
You can run the program from the command line with an XML filename as a command-line argument.
可以在命令行中运行该程序,输入以下XML文件名作为命令行参数。
The program in Listing 3 shows how to do that in Python: the code takes a tar filename as a command-line argument and then prompts the user with several options.
清单3中的程序说明了如何在Python中完成这项工作:这段代码接受一个tar文件的名称作为命令行参数,然后向用户提供几种选择。
This program gets a filename (from the command-line, which it passes into the class's constructor), and then executes the following code.
该程序取得文件名(从命令行获得并传递给类的构造函数),然后执行下面的代码。
The program does the following: On start-up, the program prompts the user for the property listings filename.
该程序如下:在启动时,程序会提示用户输入文件名的清单。
The filename is a text file that contains the locations and sizes of all the DLLs your program will use.
文件名是包含程序将使用的所有dll的位置和大小的文本文件。
The filename is a text file that contains the locations and sizes of all the DLLs your program will use.
文件名是包含程序将使用的所有dll的位置和大小的文本文件。
应用推荐