Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent %pylab from clobbering interactive #5071

Closed
stefanv opened this issue Feb 8, 2014 · 10 comments
Closed

Prevent %pylab from clobbering interactive #5071

stefanv opened this issue Feb 8, 2014 · 10 comments

Comments

@stefanv
Copy link
Contributor

stefanv commented Feb 8, 2014

Currently, %pylab clobbers interactive. It's probably best not to import interactive from matplotlib at all.

WARNING: pylab import has clobbered these variables: ['interactive']
`%pylab --no-import-all` prevents importing * from pylab and numpy
@Carreau Carreau modified the milestone: no action Feb 8, 2014
@Carreau
Copy link
Member

Carreau commented Feb 8, 2014

Seeing that (--|%)pylab should never be used and is deprecated I don't see any reason to change its behavior. Also this would break backward compatibility which is one of the only reason we still have %pylab.

I'm in favor of closing at "nothing to be done" unless someone else object.

@ellisonbg
Copy link
Member

I think this needs more thought

Sent from my iPhone

On Feb 8, 2014, at 8:05 AM, Matthias Bussonnier notifications@github.com wrote:

Seeing that (--|%)pylab should never be used and is deprecated I don't see any reason to change its behavior. Also this would break backward compatibility which is one of the only reason we still have %pylab.

I'm in favor of closing at "nothing to be done" unless someone else object.


Reply to this email directly or view it on GitHub.

@stefanv
Copy link
Contributor Author

stefanv commented Feb 8, 2014

It I deprecated? I've never seen a deprecation warning when using it.

@ellisonbg ellisonbg added this to the 2.0 milestone Feb 8, 2014
@ellisonbg
Copy link
Member

I am not sure if we are going to formally deprecate %pylab but we are going to never mention it again and strongly recommend people to never use it.

@Carreau
Copy link
Member

Carreau commented Feb 8, 2014

You will just not see any reference to it in the doc except on auto generated one.
It is too troublesome to have references and we push as much as possible people from not using it in tutorial and everything.

@Carreau
Copy link
Member

Carreau commented Feb 8, 2014

not using it in tutorial. Comment edited.

@Carreau
Copy link
Member

Carreau commented Feb 8, 2014

Idea : replace %pylab at some point by set_next_input(<everything that pylab does>) ?

@stefanv
Copy link
Contributor Author

stefanv commented Feb 8, 2014

Also, why not suggest to the user (print to screen) to use %matplotlib
whenever it is used?

@ivanov
Copy link
Member

ivanov commented Mar 6, 2014

We now do that if we've clobered something:

In [1]: plt = 'pilot'

In [2]: %pylab
Using matplotlib backend: agg
Populating the interactive namespace from numpy and matplotlib
WARNING: pylab import has clobbered these variables: ['plt']
`%matplotlib` prevents importing * from pylab and numpy

@stefanv
Copy link
Contributor Author

stefanv commented Mar 6, 2014

Thanks!

@stefanv stefanv closed this as completed Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants