These are chat archives for ipython/ipython

29th
Sep 2015
Ng Oon-Ee
@ngoonee
Sep 29 2015 06:33
Only just realized that ipython, if not installed in my virtualenv, permanently acts like --use-system-packages was used in creating the venv. The official way to handle this seems to be installing ipython into my venv, but that would pollute my pip freeze output, not just with ipython, but also with all its dependencies. Not keen on manually cleaning that up when distributing. Any other way to handle that?
Min RK
@minrk
Sep 29 2015 09:49
@ngoonee IPython is a package. If you want to use it in a virtualenv it has to be in that virtualenv, just like every other package. If you want to use IPython that's not in the env in the env, that's violating the env's isolation by definition.
You could probably do a weird workaround by putting IPython somewhere strange on its own and adding that location to PYTHONPATH.
cel4
@cel4
Sep 29 2015 11:51
When exactly happens the re-evalution of my interact function, when I drag the slider? I would expect that from the moment I start dragging there are no computations until the silder is in its final position. Can I somehow force ipython to not evaluate anything during adjusting the slider?
Min RK
@minrk
Sep 29 2015 12:04
@cel4 @interact_manual gives you a button to press for evaluation
cel4
@cel4
Sep 29 2015 12:05
@minrk, oh that's awesome. Thanks.
Ng Oon-Ee
@ngoonee
Sep 29 2015 12:17
@mirnk thanks. My issue may just be a conceptual one. I see ipython as a tool which I use when coding (similar to vim etc), and a virtual environment as a place for python packages required for the particular project to run. ipython would not be required for the project to run. Would be great if there was a way to configure ipython to use only what's in the venv, but I totally understand that that's probably an edge case.
Min RK
@minrk
Sep 29 2015 12:18
By the time IPython is running, it is in an Python env. It can't decide to leave its current env and move into a new one. Python can't do that.
Min RK
@minrk
Sep 29 2015 12:31
There is a major difference between IPython and an editor, in that IPython is itself a Python library, and is imported and run in the same environment as the code you run in IPython.
Cyrille Rossant
@rossant
Sep 29 2015 15:50
I'm writing code that depends on ipyparallel (for example something with client.map(...)). I'd like to write a test fixture that automatically launches a couple of engines on the local computer, so that I can test the code that depends on ipyparallel. What is the proper way to do it?
Min RK
@minrk
Sep 29 2015 16:49
@rossant you can see how IPython itself does it here. You could also see if ipython-cluster-helper would help write fixtures.
Cyrille Rossant
@rossant
Sep 29 2015 18:26
hmm I tried to use the setup() and teardown() functions directly but there's a nose-related error (AttributeError: 'module' object has no attribute 'iptest_stdstreams_fileno'). It looks like this depends on nose whereas I'm using py.test. I guess I'll have to copy-paste the fixtures and adapt them to pytest..?
Min RK
@minrk
Sep 29 2015 18:29
Yup, it actually relies on extensions to nose in iptest. You will probably need to copy/paste, modify as appropriate for py.test
Cyrille Rossant
@rossant
Sep 29 2015 18:47
ok thanks
Cyrille Rossant
@rossant
Sep 29 2015 19:07
came up with this particularly elegant solution, seems to work...
https://gist.github.com/rossant/87a2c147f94f8729ac96
Shaun Hutchins
@shaun10
Sep 29 2015 21:38
Anyone used pineapple?
Is it any good?