Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
We do not share your email address with others. It is only used to allow you to reset your password. For details read our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

Remove Ads
Don't know
Know
remaining cards
Save
0:01
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
Retries:
restart all cards




share
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

files

python files

QuestionAnswer
file definition sequence of bytes stored on a secondary memory device, such as a disk drive. A file could be a text document or spreadsheet, an html file, or a Python module. Such files are referred to as text files. All files are managed by the file system
file system the component of a computer system that organizes files and provides ways to create, access, and modify files. provides a uniform view of the files that hides the differences between how files are stored on the different hardware devices.
directories Files are grouped together into directories or folders. A folder may contain other folders in addition to (regular) files. file system organizes files and folders into a tree structure, typically drawn upside down
root directory The folder on top of the hierarchy is called the root directory. Every folder and file in a file system has a name. However, a name is not sufficient to locate a file efficiently.
pathname Every file can be specified using a pathname that is useful for locating the file efficiently. The file pathname can be specified in two ways.
absolute pathname of a file consists of the sequence of folders, starting from the root directory, that must be traversed to get to the file. represented as a string, sequence of folders is separated by forward (/) or backward (\) slashes, depending on the operating system.
current working directory . When using the command shell, the current working directory is typically listed at the shell prompt. When executing a Python module, the current working directory is typically the folder containing the module.
relative pathname of a file is the sequence of directories that must be traversed, starting from the current working directory, to get to the file.
parent folder , which is the folder containing the current working directory. The double-period notation (..)
file mode read infile = open(‘example.txt’, ‘r’) Reading mode (default)
file mode write Writing mode; if the file already exists, its content is wiped infile = open(‘example.txt’, ‘w’)
file mode append Append mode; writes are appended to the end of the file infile = open(‘example.txt’, ‘a’)
file mode read and write Reading and writing mode (beyond the scope of this book) infile = open(‘example.txt’, ‘r’+)
file mode text Text mode (default) infile = open(‘example.txt’, ‘t’) Text files, however, are treated as encoded files using some encoding.
file mode binary Binary mode infile = open(‘example.txt’, ‘b’) binary files are treated as a sequence of bytes and are not decoded when read or encoded when written to.
file object The open() function returns an object of an Input or Output Stream type that supports methods to read and/or write characters. Different modes will give us file objects of different file types. the file type will support all or some of the methods
Created by: kbaldwin