Giter Site home page Giter Site logo

tklog's Introduction

tklog

a few handy log widgets based on tkinter

Log is just like a cup of Latte, and I like it anytime.

There are four classes in tklog.py:

  • tklog class, which is the base component for all others. It can be packed into root or Toplevel window easily, and has a little power to log pictures (png and gif).

  • tklogHandler class, which is inherited from logging.Handler and contains a tklog.

  • winlog class, which is created in a Toplevel window, contains a tklog, and has the ability to withdraw or destroy root.

  • winlogHandler class, which is inherited from logging.Handler and contains a winlog.

There are also four piece of example code files for these classes.

The log interface has an argument named sync from V0.12, default is False. You should be very careful about this argument, you can never use it in GUI event loop. Normally, sync=True should only be set in background thread which needs synchronization. For example, you want to make sure the log interface would be blocked until after the log info is shown on text window.

Please run and check the example code before enjoying the classes from tklog, and don't forget to try right click on the log area. Maybe it's a surprise for you. All the classes are thread-safe!

$python3 example_tklog.py
$python3 example_tklogHandler.py
$python3 example_winlog.py
$python3 example_winlogHandler.py

中文参考: https://www.pynote.net/archives/1207

Hope you like tklog.

tklog's People

Contributors

xinlin-z avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.