• [Python-announce] peek: like print, but easy

    From Ruud van der Ham@rt.van.der.ham@gmail.com to comp.lang.python.announce on Sun Dec 1 18:59:30 2024
    From Newsgroup: comp.lang.python.announce

    This is to announce the availability of a new package: peek.

    To include powerful debug print statement, all you have to do is:
    import peek
    my_string = "hallo"
    my_dict = dict(a=1, b=2)
    peek(my_string, my_dict)
    And you get
    my_string='hallo', my_dict={'a': 1, 'b': 2}
    Or, if you add
    peek.show_line_number = True
    you get something like
    #5 ==> my_string='hallo', my_dict={'a': 1, 'b': 2}

    For those who know icecream: peek goes much further in adding benchmarking,
    a Pythonic interface, import time customization, better docs, etc.
    And ... no dependencies whatsoever!

    For more information, see www.salabim.org/peek
    --- Synchronet 3.20a-Linux NewsLink 1.114