File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -113,16 +113,22 @@ framework build within the virtualenv. To run a script you can do
113
113
framework build. To run an interactive ``IPython `` session with the framework
114
114
build within the virtual environment you can do ``frameworkpython -m IPython ``
115
115
116
- ``PYTHONHOME `` Alias
117
- --------------------
116
+ ``PYTHONHOME `` Function
117
+ -----------------------
118
118
119
- Alternatively you can define an alias in your ``.bashrc `` using
119
+ Alternatively you can define a function in your ``.bashrc `` using
120
120
121
121
.. code :: bash
122
122
123
- alias frameworkpython=' [[ ! -z "$VIRTUAL_ENV" ]] && PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python || /usr/local/bin/python'
123
+ function frameworkpython {
124
+ if [[ ! -z " $VIRTUAL_ENV " ]]; then
125
+ PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python " $@ "
126
+ else
127
+ /usr/local/bin/python " $@ "
128
+ fi
129
+ }
124
130
125
- This alias can then be used in all of your virtualenvs without having to
131
+ This function can then be used in all of your virtualenvs without having to
126
132
fix every single one of them.
127
133
128
134
PythonW Compiler
You can’t perform that action at this time.
0 commit comments