tkouter

https://img.shields.io/pypi/v/tkouter.svg https://img.shields.io/pypi/pyversions/Django.svg https://travis-ci.org/dokelung/tkouter.svg?branch=master https://img.shields.io/coveralls/github/dokelung/tkouter.svg

tkouter is a python package for creating tkinter layout by html (xml).

Installation

$ pip install tkouter

Taste it

from tkinter import Tk, messagebox
from tkouter import *


class HelloWorld(TkOutWidget):
    layout = """
        <html>
            <head>
                <title> hello world </title>
            </head>
            <body>
                <button width="20" command="{self.hello}">
                    Click
                </button>
            </body>
        </html>"""

    def hello(self):
        messagebox.showinfo('welcome to tkouter', 'hello world')


if __name__ == '__main__':
    root = Tk()
    hl = HelloWorld(root)
    hl.pack()
    root.mainloop()