1.2.3 Simulating command line arguments

There are two ways to simulate command-line arguments with MacPython-OS9.

  1. via Interpreter options

  2. via drag and drop If you save the script as an applet (see Section 1.3.4), you can also simulate some command-line arguments via ``Drag-and-Drop''. In this case, the names of the files that were dropped onto the applet will be appended to sys.argv, so that it will appear to the script as though they had been typed on a command line. As on Unix systems, the first item in sys.srgv is the path to the applet, and the rest are the files dropped on the applet.

Vedete Circa questo documento... per informazioni su modifiche e suggerimenti.