Skip to main content

Display syntax highlighted code in customtkinter

Project description

CustomTkinter CodeViewer

This is a package for displaying code with syntax highlighting in a customtkinter application

CTkCodeViewer

Example

codeviewer = CTkCodeViewer(root, code=code, language="python", theme="monokai")

Arguments

Argument Value
root root, tkinter.Frame or CTkFrame
width textbox width in px
height textbox height in px
code code to display
allow_selecting allow users to select or not (True or False)
language the language given (default = "python"). This supports all the languages available in pygments
theme theme of the syntax highlighting (default = "monokai"). This supports all the themes available in pygments

Methods

  • .allstyles()

    returns all the available themes

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

CustomtkinterCodeViewer-0.0.3.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

CustomtkinterCodeViewer-0.0.3-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

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