Search code examples
pythontclitcl

Itcl supported by Python?


I was wondering if itcl is supported by python, cause it seems to be a part of the tcl/tk lib. And while I have not found out where the widgets in cpython actually gets created, I guess it should be somewhat itcl. So my attempt was a copy of this in the documentation.

import tkinter as tk

root = tk.Tk()
root.tk.eval('''
    itcl::widget Foo {
    protected common boolean
    set boolean(true) 1
    set boolean(false) 0
}''')

But failed with _tkinter.TclError: invalid command name "itcl::widget"


Solution

  • I am almost positive that Itcl is not supported by python, although it can be created. Here it is for C -> https://github.com/tcltk/itcl