57 lines
1.3 KiB
Bash
57 lines
1.3 KiB
Bash
# Python bizsnitch here
|
|
alias p3='python3'
|
|
alias piplist='pip --isolated list'
|
|
|
|
# pip should only run if there is a virtualenv currently activated
|
|
export PIP_REQUIRE_VIRTUALENV=true
|
|
|
|
# Python 2 (python 2 is losing support fast)
|
|
# alias venv='virtualenv'
|
|
|
|
# Python 3
|
|
#
|
|
alias pip3='python3 -m pip'
|
|
alias venv3='python3 -m venv'
|
|
venv3.a () {
|
|
source $1/bin/activate;
|
|
}
|
|
|
|
# using a global virtural environment location, but I usually put it in the project path
|
|
# to reduce my own confusion =)
|
|
SRC_DIRECTORY="/Volumes/malloc-dev/virtenvs"
|
|
alias venv3.cd="cd $SRC_DIRECTORY"
|
|
venv3.aa () {
|
|
source $SRC_DIRECTORY/$1/bin/activate;
|
|
}
|
|
venv3.ls () {
|
|
ll $SRC_DIRECTORY
|
|
}
|
|
|
|
|
|
|
|
# python interpreter w/auto complete
|
|
# pip install bpython
|
|
bbpython () {
|
|
source $SRC_DIRECTORY/bpython/bin/activate;
|
|
bpython
|
|
}
|
|
|
|
# django
|
|
# alias djm="python ./manage.py"
|
|
# alias dja="django-admin.py"
|
|
|
|
# virtualenv
|
|
# export WORKON_HOME=$HOME/dev/virtenvs
|
|
# source /usr/local/bin/virtualenvwrapper.sh
|
|
# virtualenv aliases
|
|
# http://blog.doughellmann.com/2010/01/virtualenvwrapper-tips-and-tricks.html
|
|
# alias v='workon'
|
|
# alias v.de='deactivate'
|
|
# alias v.mk='mkvirtualenv --no-site-packages'
|
|
# alias v.mkpkg='mkvirtualenv'
|
|
# alias v.rm='rmvirtualenv'
|
|
# alias v.add='add2virtualenv'
|
|
# alias v.cd='cdvirtualenv'
|
|
# alias v.cdpkg='cdsitepackages'
|
|
# alias v.ls='lssitepackages'
|