Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python_notes [2019/06/26 15:07]
python_notes [2019/09/16 18:28] (current)
Line 5: Line 5:
   * https://​​how-to-install-python-3-6-1-on-centos-7.html   * https://​​how-to-install-python-3-6-1-on-centos-7.html
-Do some local configuration for my scripts:+Do some local configuration for my scripts ​(su - root):
   pip3.6 install --upgrade pip   pip3.6 install --upgrade pip
   pip3.6 install --upgrade httplib2   pip3.6 install --upgrade httplib2
   pip3.6 install pymysql   pip3.6 install pymysql
 +  pip3.6 install selenium-wire
 +  pip3.6 install chromedriver
 +  pip3.6 install chromedriver_binary
 +  pip3.6 install dictor
 +  pip3.6 install wget
 +  pip3.6 install pip-upgrade-outdated
 +  ​
 +To update all pip packages:
 +  # pip_upgrade_outdated
 +Note that https://​​project/​pip-upgrade-outdated/​ is a good resource to update all PIP packages.
 +  ​
 +Download and install geckodriver (see https://​​mozilla/​geckodriver/​releases)
 +As root, copy geckodriver to /​usr/​local/​bin and ensure permissions are 755
 +Notes at https://​​questions/​40208051/​selenium-using-python-geckodriver-executable-needs-to-be-in-path
   ​   ​
 Notes about [[https://​​python3/​python_database_access.htm|Python database access]] Notes about [[https://​​python3/​python_database_access.htm|Python database access]]
Line 25: Line 43:
   ​   ​
   $ pip list   $ pip list
 +  ​
 +[[https://​​3/​howto/​logging.html|Logging in python]]
 +  logging.basicConfig(format='​%(asctime)s %(message)s',​ filename=log_file,​ level=logging.DEBUG)
 +  logging.debug('​This message should go to the log file')
 +'​So should this')
 +  logging.warning('​And this, too')
 +[[https://​​python-pep8/​|Write beautiful python code with PEP-8]]
python_notes.1561576036.txt.gz ยท Last modified: 2019/06/26 15:07 by juckins