Prevent ipython.py from being imported by accident #701

Closed
wants to merge 164 commits into
from

Conversation

Projects
None yet
5 participants
@stefanv
Contributor

stefanv commented Aug 15, 2011

Suggest importing IPython instead

ellisonbg added some commits Jul 14, 2011

Fixing code to assume msg_type and msg_id are top-level.
* I have gone through and looked for instances of ['msg_type'] and
  ['msg_id'] and tried to make sure that I added ['header'] so
  pull the values out of the header.
* But there are many cases where I can't tell if the dict is the
  full message or the header already. This is especially true
  of the msg_id in the parallel db parts of the code.
* Tests pass, but this is scary.
Different clients now share a single zmq session.
Previously, each client (browser window) would open its own set
of ZMQ sockets to a kernel. Now one master set of connections
to the kernel is created and all clients share those connections.
In some ways, this simplifies the URL design.

I have also made kernel_ids server-side created.
Cleaned up kernel action interface.
* Using POST rather than GET.
* Using simple URLs rather than a query string.
* Using a regexp to match the action.
Status monitoring added to notebook.
* Busy == red
* Idle == gray
* Restarting == black
Fixes to notebook scrolling and layout.
We are now using the flexible box model, so the layout won't work
on IE9, but it already doesn't work on IE9 because of WS support.
Tweaking and cleanup of notebook.css.
* Adjusted font sizes for improved readability.
* Got rid of unused css attributes and styles.
* Changed font of Title to Verdana.
Further font adjustments to the notebook.
* Using Fernando's recommended monospaced font list.
* Increased tool/tab menus to 10 pt.
Work on the notebook's code cell.
* Cleaned up the js code for creating the code cell.
* Added a div around the input text area to allow the text area
  to have a width of 100%.
* Added CodeCell.toJSON.
Basic notebook saving and loading.
* The logic in the server and javascript frontend is there for
  a basic JSON notebook format with a .ipynb extension.
* To save a new notebook: "%notebook save filename.ipynb"
* To save a notebook that is already saved: "%notebook save"
* To load a notebook from the cwd: "notebook load filename.ipynb"
Refactoring of the output and display system.
* LaTeX rendering now works.
* Font's are reworked in the css style sheet.
* Testing on FF and Chrome.

ellisonbg and others added some commits Aug 9, 2011

Updating notebook configuration.
* ipython_notebook_config.py is now created and staged.
* New certfile/keyfile config=True attributes for enabling SSL/TLS.
* Examples of usage added.
* New handling for --ip=*
* Aliases added.
Created new notebook magic that can export/convert notebooks.
* %notebook --export foo will export the current IPython history
  to a file foo.ipynb.
* %notebook --format=json foo.ipynb will convert foo.ipynb to
  foo.json.
Reducing/adjusting the padding of cells to make the notebook more
compact.

* Reduced padding between cells from 15px to 5px.
* Prompt width is now dynamic to grow/shrink as the prompt number
  increases in width.
* Reduced padding between input and output from 15px to 5px.
Updates to the display system.
* New publish_* functions created in IPython.core.displaypub.
* A raw=True argument has been added to the display_* functions
  in IPython.core.display.
* Display object classes such as Html, Png, etc. have been added
  to IPython.core.display to make it easier to diplay raw data
  from the internet.
Finishing display system work.
* Added image/jpeg MIME type to notebook format, the core display
  logic and the notebook.
* Finished HTML, SVG, Image, Math, Javascript, JSON classes.
Major refactor of kernel connection management in the notebook.
* Full kernel heartbeating is working.
* Connections between the notebook and server and now created
  a new each time there is a WebSocket connection. Each channel is
  also handled separately. This dramatically simplifies the
  server code and makes for a more scalable system.
Fixing bug that caused plots to not be saved.
CodeCell.append_mime_type needed a default element.

@stefanv stefanv closed this Aug 15, 2011

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Aug 17, 2011

Member

Is a naked print a good idea here? If so, then at least we should do

from __future__ import print_function

at the top and use print() instead, so the 2to3 changes are minimized.

Is a naked print a good idea here? If so, then at least we should do

from __future__ import print_function

at the top and use print() instead, so the 2to3 changes are minimized.

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Aug 17, 2011

Member

Since it's one of the few things 2to3 handles well, making the from __future__ import print_function change manually, really has zero benefits as far as I know, and is primarily a cause for annoyance.

Member

minrk replied Aug 17, 2011

Since it's one of the few things 2to3 handles well, making the from __future__ import print_function change manually, really has zero benefits as far as I know, and is primarily a cause for annoyance.

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Aug 17, 2011

Member

I guess I'm just getting used to using print as a function everywhere in anticipation of the transition to 3, so it doesn't bother me much. But I agree that it's not a big deal, and I have no problem if it stays as-is.

Member

fperez replied Aug 17, 2011

I guess I'm just getting used to using print as a function everywhere in anticipation of the transition to 3, so it doesn't bother me much. But I agree that it's not a big deal, and I have no problem if it stays as-is.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau May 6, 2012

Member

Those 2 bindings seem not to be used. The collapse/expand_pager triggerd seem to be in notebook.js. Am I wrong ? Should I remove them from here ?

Those 2 bindings seem not to be used. The collapse/expand_pager triggerd seem to be in notebook.js. Am I wrong ? Should I remove them from here ?

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau May 6, 2012

Member

Hum, it seem that I'm wrong... I'm not sure t understand how it works then... and what's the difference between those binding and the ones in notebooks.js
Sorry for the noise.

Member

Carreau replied May 6, 2012

Hum, it seem that I'm wrong... I'm not sure t understand how it works then... and what's the difference between those binding and the ones in notebooks.js
Sorry for the noise.

This comment has been minimized.

Show comment
Hide comment
@ellisonbg

ellisonbg May 8, 2012

Member

I don't know why we have both of them, but I did a test and confirm that both are being called when pager.js L62 is run. W can probably move all that logic to pager.js as I don't see anything notebook specific in the notebook.js version. This code was written very early on so I am not surprised it is crusty.

Member

ellisonbg replied May 8, 2012

I don't know why we have both of them, but I did a test and confirm that both are being called when pager.js L62 is run. W can probably move all that logic to pager.js as I don't see anything notebook specific in the notebook.js version. This code was written very early on so I am not surprised it is crusty.

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau May 8, 2012

Member

I think the one in pager.js grow/shrink the pager below the separator while the one in notebook.js shrink/grow the height of the notebook area. So it kind of make sens to have function dealing with notebook in notebook..

Member

Carreau replied May 8, 2012

I think the one in pager.js grow/shrink the pager below the separator while the one in notebook.js shrink/grow the height of the notebook area. So it kind of make sens to have function dealing with notebook in notebook..

This comment has been minimized.

Show comment
Hide comment
@ellisonbg

ellisonbg May 8, 2012

Member
Member

ellisonbg replied May 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment