Standard library
1. import time
time.sleep(1)
time.strftime('%y-%m-%d %H:%M:%S' ) #Print time time.time #Returns the
current time distance from January 1, 1970 Seconds
2. import os # operating system
os.system(“calc”) # call the operating system’s calculator
os.system(“cmd”) # call the operating system’s command window
os.system(“mstsc”) # call the operating system’s remote Desktop connection
3. import sys
#Load system module sys.path #Print the current path of python, project path, standard path
-
Temporarily add the path to the standard path
sys.path.append('d:/') -
Permanently add the path to the standard path.
Create a new .py file in \lib\site-packages under the python directory. The file name is arbitrary, and the suffix must be .pth
edit this file and add the path: d:/package name
Note: When naming a custom module, do not have the same name as a third-party library
Third party library
The location of the third-party library, stored in \lib\site-packages in the python directory
pip install seleium is installed from the official website. The official website is abroad. The slow speed may cause the installation to fail.
pip list Check which third-party libraries are installed.
pip show Module name Check the specific information of a module.
pip uninstall Module name
pip install seleium==3.0.2 Specify Install version 3.0.2
pip install seleium>=3.0.2 Specify installation not less than version 3.0.2
pip install seleium -U Update selenium