Chapter 10 Flashcards
argv
argv is short for argument vector and is a variable in the sys module which stores a list of command line arguments passed to a program at run time.
attribute
A variable defined inside a module (or class or instance – as we will see later). Module attributes are accessed by using the dot operator ( .).
command line
The sequence of characters read into the command interpreter in a command line interface
command line argument
A value passed to a program along with the program’s invocation at the command prompt of a command line interface (CLI).
command prompt
A string displayed by a command line interface indicating that commands can be entered.
continue statement
A statement that causes the current iteration of a loop to end. The flow of execution goes to the top of the loop, evaluates the condition, and proceeds accordingly.
delimiter
A sequence of one or more characters used to specify the boundary between separate parts of text.
directory
A named collection of files, also called a folder. Directories can contain files and other directories, which are refered to as subdirectories of the directory that contains them.
dot operator
The dot operator ( .) permits access to attributes and functions of a module (or attributes and methods of a class or instance – as we will see later).
file
A named entity, usually stored on a hard drive, floppy disk, or CD-ROM, that contains a stream of characters.
file system
A method for naming, accessing, and organizing files and the data they contain.
import statement
A statement which makes the objects contained in a module available for use within another module. There are two forms for the import statement. Using a hypothetical module named mymod containing functions f1 and f2, and variables v1 and v2, examples of these two forms include:
import mymod
and
from mymod import f1, f2, v1, v2
The second form brings the imported objects into the namespace of the importing module, while the first form preserves a seperate namespace for the imported module, requiring mymod.v1 to access the v1 variable.
Jython
An implementation of the Python programming language written in Java.
method
Function-like attribute of an object. Methods are invoked (called) on an object using the dot operator. For example:
>>> s = "this is a string." >>> s.upper() 'THIS IS A STRING.' >>> We say that the method, upper is invoked on the string, s. s is implicitly the first argument to upper.
mode
A distinct method of operation within a computer program. Files in Python can be opened in one of three modes: read (‘r’), write (‘w’), and append (‘a’).