Skip to main content

IPython magic command for displaying images in kitty terminal

Project description

ipython-icat

PyPI version

Installation

You can install ipython-icat using pip:

pip install ipython-icat

Requirements

  • Python 3.9+
  • IPython
  • matplotlib
  • Pillow (PIL)
  • kitty terminal

Usage

Loading the Extension

In your IPython session, load the extension:

%load_ext icat

Displaying Matplotlib Plots

To use the kitty backend for matplotlib:

%plt_icat

After running this command, any matplotlib plots you create will be displayed directly in your kitty terminal.

Displaying Images

To display an image file or a PIL Image object:

%icat path/to/your/image.jpg

or

from PIL import Image
img = Image.open('path/to/your/image.jpg')
%icat img

You can also resize the image when displaying:

%icat path/to/your/image.jpg -w 300 -h 200

Features

  • Display matplotlib plots directly in kitty terminal
  • Show PIL Image objects or image files
  • Resize images on display
  • Seamless integration with IPython workflow

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Contact

If you have any questions or feedback, please open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipython_icat-0.2.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

ipython_icat-0.2.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ipython_icat-0.2.1.tar.gz.

File metadata

  • Download URL: ipython_icat-0.2.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for ipython_icat-0.2.1.tar.gz
Algorithm Hash digest
SHA256 decb3d651cc9bd8c60f368e3dbea6d051f7defaeb89e53b860ff36696512ee3c
MD5 5e6a8014ccc673e3afc359f4c3839ed3
BLAKE2b-256 651361e27986a8ed04ed6503dfb3b91721675dcbfda27a2e0e917b33c647f977

See more details on using hashes here.

File details

Details for the file ipython_icat-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ipython_icat-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for ipython_icat-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30b31328067caeebeabf4c2dec7f822b60b5fa1d0e71940375d7e595a80eb739
MD5 3ab4fbc8b8484a80bae2e7889ffcf3f0
BLAKE2b-256 f7ca7073e289e7180e6c7d41500caa969c273681d4dc083b68c67b9a789991a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page