Chapter 10 Flashcards

1
Q

argv

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

attribute

A

A variable defined inside a module (or class or instance – as we will see later). Module attributes are accessed by using the dot operator ( .).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

command line

A

The sequence of characters read into the command interpreter in a command line interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

command line argument

A

A value passed to a program along with the program’s invocation at the command prompt of a command line interface (CLI).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

command prompt

A

A string displayed by a command line interface indicating that commands can be entered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

continue statement

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

delimiter

A

A sequence of one or more characters used to specify the boundary between separate parts of text.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

directory

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

dot operator

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

file

A

A named entity, usually stored on a hard drive, floppy disk, or CD-ROM, that contains a stream of characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

file system

A

A method for naming, accessing, and organizing files and the data they contain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

import statement

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Jython

A

An implementation of the Python programming language written in Java.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

method

A

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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

mode

A

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’).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

module

A

A file containing Python definitions and statements intended for use in other Python programs. The contents of a module are made available to the other program by using the import statement.

17
Q

namespace

A

A syntactic container providing a context for names so that the same name can reside in different namespaces without ambiguity. In Python, modules, classes, functions and methods all form namespaces.

18
Q

naming collision

A

A situation in which two or more names in a given namespace cannot be unambiguously resolved. Using

import string
instead of

from string import *
prevents naming collisions.

19
Q

non-volatile memory

A

Memory that can maintain its state without power. Hard drives, flash drives, and rewritable compact disks (CD-RW) are each examples of non-volatile memory.

20
Q

path

A

The name and location of a file within a file system. For example:

/usr/share/dict/words
indicates a file named words found in the dict subdirectory of the share subdirectory of the usr directory.

21
Q

pydoc

A

A documentation generator that comes with the Python standard library.

22
Q

standard library

A

A library is a collection of software used as tools in the development of other software. The standard library of a programming language is the set of such tools that are distributed with the core programming language. Python comes with an extensive standard library.

23
Q

text file

A

A file that contains printable characters organized into lines separated by newline characters.

24
Q

volatile memory

A

Memory which requires an electrical current to maintain state. The main memory or RAM of a computer is volatile. Information stored in RAM is lost when the computer is turned off.