Phythonic Productivity Techniques#

Getting Help#

import datetime
dir(datetime)
dir
['MAXYEAR',
 'MINYEAR',
 '__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__spec__',
 'date',
 'datetime',
 'datetime_CAPI',
 'sys',
 'time',
 'timedelta',
 'timezone',
 'tzinfo']
# Check objects with specific keywords
[_ for _ in dir(datetime) if 'date' in _.lower()]
['date', 'datetime', 'datetime_CAPI']

Virtual Environments#

The following codes are run under terminal.

The following codes show how to create a virtual environment in the terminal.

which pip

pytho3 -m venv `DIRECTORY`
ls `DIRECTORY`

source activate `DIRECTORY`
pip list
pip install `PACKAGE_NAME`
source deactivate