Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. usly@m-430:~/PycharmProjects/MemberBot$ cat env/bin/activate
  2. # This file must be used with "source bin/activate" *from bash*
  3. # you cannot run it directly
  4.  
  5. deactivate () {
  6. unset -f pydoc >/dev/null 2>&1
  7.  
  8. # reset old environment variables
  9. # ! [ -z ${VAR+_} ] returns true if VAR is declared at all
  10. if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then
  11. PATH="$_OLD_VIRTUAL_PATH"
  12. export PATH
  13. unset _OLD_VIRTUAL_PATH
  14. fi
  15. if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
  16. PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
  17. export PYTHONHOME
  18. unset _OLD_VIRTUAL_PYTHONHOME
  19. fi
  20.  
  21. # This should detect bash and zsh, which have a hash command that must
  22. # be called to get it to forget past commands. Without forgetting
  23. # past commands the $PATH changes we made may not be respected
  24. if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
  25. hash -r 2>/dev/null
  26. fi
  27.  
  28. if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
  29. PS1="$_OLD_VIRTUAL_PS1"
  30. export PS1
  31. unset _OLD_VIRTUAL_PS1
  32. fi
  33.  
  34. unset VIRTUAL_ENV
  35. if [ ! "${1-}" = "nondestructive" ] ; then
  36. # Self destruct!
  37. unset -f deactivate
  38. fi
  39. }
  40.  
  41. # unset irrelevant variables
  42. deactivate nondestructive
  43.  
  44. VIRTUAL_ENV="/home/usly/PycharmProjects/MemberBot/env"
  45. export VIRTUAL_ENV
  46.  
  47. _OLD_VIRTUAL_PATH="$PATH"
  48. PATH="$VIRTUAL_ENV/bin:$PATH"
  49. export PATH
  50.  
  51. # unset PYTHONHOME if set
  52. if ! [ -z "${PYTHONHOME+_}" ] ; then
  53. _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
  54. unset PYTHONHOME
  55. fi
  56.  
  57. if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
  58. _OLD_VIRTUAL_PS1="$PS1"
  59. if [ "x" != x ] ; then
  60. PS1="$PS1"
  61. else
  62. PS1="(`basename \"$VIRTUAL_ENV\"`) $PS1"
  63. fi
  64. export PS1
  65. fi
  66.  
  67. # Make sure to unalias pydoc if it's already there
  68. alias pydoc 2>/dev/null >/dev/null && unalias pydoc
  69.  
  70. pydoc () {
  71. python -m pydoc "$@"
  72. }
  73.  
  74. # This should detect bash and zsh, which have a hash command that must
  75. # be called to get it to forget past commands. Without forgetting
  76. # past commands the $PATH changes we made may not be respected
  77. if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
  78. hash -r 2>/dev/null
  79. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement