Comments (9)
That can be done by adding site-packages to the PYTHONPATH of the xonsh's venv. I think it should be a separate xontrib than vox itself. It just manages the virtualenv, and to facilitate imports from the current env, seems a different thing.
from xontrib-vox.
Hm. Could be done with caching state (sys.path
and $PATH
) and using site.addsitedir().
from xontrib-vox.
note: vox has an 'enter' command which is an alias of activate.
from xontrib-vox.
@astronouth7303 Could you elaborate a bit more of what you mean? {env_name}
in $PROMPT is already there. Do you mean a feature that would allow setting an unique $PROMPT for every virtual env?
I use something like this with xonsh-autoxsh
~ $ cd ~/test
~/test $ echo "$PROMPT = 'foobar $'" > .autoxsh
~/test $ cd .
Unauthorized ".autoxsh" file found in this directory. Authorize and invoke? (y/n/ignore): y
foobar $ echo "prompt was changed!"
Since it's usually a good idea to use a new virtualenvironment for every project this snipped kinda serves the same purpose.
from xontrib-vox.
I mean applying a virtual environment to your xonsh session.
Or maybe spawning a xonsh shell in the environment?
Either way, it involves crossing environments and other weirdness, so it's certainly non-trivial.
from xontrib-vox.
@AstraLuma vox activate
already applies virtual environment to the current xonsh session. perhaps you want to spawn a new shell session with the env variable applied, like pew does?
from xontrib-vox.
No, the python contents, not just the commands.
from xontrib-vox.
No, the python contents, not just the commands.
could you elaborate on this? I still don't get it.
from xontrib-vox.
Add the python environment of the venv to xonsh's python environment.
So you have a repl kinda matching the project you're working on.
from xontrib-vox.
Related Issues (9)
- Vox does not clean up organizational directories HOT 7
- Out of the box xonsh will not execute within a Python Virtual Env on Windows 10 HOT 1
- `vox activate` fails when currently active virtualenv is removed HOT 4
- vox doesn't expand ~ for $VIRTUALENV_HOME HOT 3
- Autovox: [bug, feature] Allow subfolder virtualenvs HOT 2
- `vox new`: `--link-project` option makes everything after creating the basic venv fail
- `vox help` crashes xonsh 0.18.2 HOT 2
- Activating a non-existent environment causes xonsh to crash HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xontrib-vox.