Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1.Location
2.Name
3.Extension
Directory:
It is a collection of sub-directories or files or both
It do have 2 characterstics
1.Location
2.Name
*****
OS:OS is module where we can work with files n directories in our system
*****we can work with with the files in python using following functions
1.open()
2.read()
3.write()
4.close()
5.read_lines()
NOTE:rb,wb are used to worked with binary files like audio,video,image etc.
CSV FILES:
comma seperated values
In python a data set can be collected n processed using following formats:
1.CSV
2.XML
3.JSON-java script object notation
The common format to use the data n their values processed using above mentioned
modules/libraries
3.JSON: java script object notation recently using for web API (application
programming
Interface) between web services n websites.
*****JSON is dictionary of dictionary's.
DATE:
OS: In order to access resource from a system we use python's bulid in module OS
it's not specific to any OS
We can walk through individual files n directories through specific functions
Methods:
1.path()-its a combination of name,location,extension
2.getcwd()-current working directory
3.chwd()-change working directory
4.mkdir()-make a directory(folder)
5.makedirs()-it's a creating directorie's(more than one folder),hierarchial folders
6.rmdir()-means remove directory-to delete a single folder use rmdir
7.removedirs()-remove directory's-to remove multiple folders n files
8.walk()-internally searching for folders n files
************9.split()-divide into 3-location,name,extension
10.splitext()-name,extension
11.join()-to join paths-path is not a string
12.listdir()-list of directories(specific folder search)
13.environ.set-speciaaaly used for database,email n passowords
14.environ.get
search for environmental variables in google
its a environmental varaiables can be used to work with environ
phone /d(10,11)+
CONTEXT MANAGER:
Context manager is used for files and connections(database/network connections)
It is a good practice whenever we are working with context manager in files and
database works