Skip to content

Provide hooks for arbitrary mimetypes handling. - #11848

Merged
Carreau merged 4 commits into
ipython:masterfrom
Carreau:mime-repr-hook
Nov 21, 2019
Merged

Carreau merged 4 commits into
ipython:masterfrom
Carreau:mime-repr-hook

Conversation

@Carreau

@Carreau Carreau commented Aug 11, 2019 •

Copy link
Copy Markdown
Member

This should allow at some point inline images, an math in the terminal.

Screen Shot 2019-11-17 at 10 48 45

Screen Shot 2019-11-17 at 10 49 45

This should allow at some point inline images, an math in the terminal.
@Carreau
Carreau requested review from minrk and takluyver August 11, 2019 20:56
@Carreau

Carreau commented Nov 17, 2019

Copy link
Copy Markdown
Member Author

@asmeurer I know you are a Terminal IPython user with many extensions.
Thoughts ?

register_mimerenderer(ipython, 'text/latex', mathcat)

This example only work for iterm2 on macOS and skip error handling for brevity.
One could also invoke an external viewer with ``subporcess.run()`` and a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is spelled wrong.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thanks.

@asmeurer

Copy link
Copy Markdown
Contributor

I don't use IPython, but if this supports iTerm2 I think it's great. My only comment would be to make the images be full retina resolution.

@Carreau

Carreau commented Nov 21, 2019

Copy link
Copy Markdown
Member Author

I don't use IPython, but if this supports iTerm2 I think it's great. My only comment would be to make the images be full retina resolution.

Sorry I thought you had some custom prompt extensions at some points. I might be confusing with something else. Apologies for the wrong ping and thanks for spotting the typo.

@asmeurer

Copy link
Copy Markdown
Contributor

I did have some custom stuff at one point but I gave up trying to finagle IPython at some point and just wrote my own thing https://github.com/asmeurer/mypython.

@Carreau

Carreau commented Nov 21, 2019

Copy link
Copy Markdown
Member Author

@Carreau Carreau added this to the 7.10 milestone Nov 21, 2019
@Carreau
Carreau merged commit fb277ea into ipython:master Nov 21, 2019
@Carreau
Carreau deleted the mime-repr-hook branch December 1, 2019 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants