Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mahmoud Harmouch
    @wiseaidev
    Glad it helped. I am currently working on something that hopefully will help me break into google as a software engineer. Behold!
    Mahmoud Harmouch
    @wiseaidev
    Oh, Wait! Textualize is currently hiring. Lemme check if there is an entry level position available.
    lllama
    @lllamaboy:matrix.org
    [m]
    Probably worth heading over to https://community.textualize.io now that it’s launched.
    Warm
    @warm:pony.cx
    [m]
    is it possible in Rich to render a widget at an exact position? Like using X and Y coords for example
    pawamoy
    @pawamoy:matrix.org
    [m]
    hey Will McGugan we can continue chatting here instead of on twitter if you prefer :) and thanks for your help! I'll share it here as well: https://pawamoy.github.io/markdown-exec/gallery/#build-an-svg-image-from-code-snippets-with-rich
    does anyone know how I can prevent interpretation of stars in my code snippet? I'm basically doing this:
    console = Console(record=True)
    renderable = Syntax(code, "python", line_numbers=True, indent_guides=True)
    console.print(renderable)
    pawamoy
    @pawamoy:matrix.org
    [m]
    I've tried setting markup=False on both the console and print call, without success
    pawamoy
    @pawamoy:matrix.org
    [m]
    to clarify: the output in the terminal is correct, but not the SVG
    Max Rossmannek
    @mrossinek_gitlab
    Hey everyone :) I just found Textualize/textual#24 and was wondering if it's status has changed since July of last year.. If so, what would be the best approach for an interactive Table widget. Are contributions for such a thing welcome/encouraged or should I hold out for 0.2 (css) to be released first?
    ReisgoldmanX
    @reisgoldmanX
    Hi im trying to make a listbox with rich and textualize. I cant add renderable texts in a Panel or a layout is there way to do this?
    ReisgoldmanX
    @reisgoldmanX
    Oh i figured it out by looking at others code
    Will McGugan
    @willmcgugan
    Hi everyone. We have new Discourse community for all things Textual https://community.textualize.io/
    Sorry I haven't been responsive here, but we're working really hard on this new CSS version, which will make things much easier for you.
    I'm thinking of closing the gitter.im channel unless you really like the chat format over a forum.
    pawamoy
    @pawamoy:matrix.org
    [m]
    I really like the chat format over the forum one ^^
    out of curiosity, what does a discourse forum brings that is not possible with github discussions? centralization of discussions instead of scaterring them in multiple repos? ownership of the data (self-hosting?)?
    Paul m. p. Peny
    @pmp-p
    hi there, usually for a chat to be usefull general/support/devel should be clearly separated in channels. otherwise i think a chat is way better over a forum until release and freezing api. Is there any sixel support, and if not is it planned ?
    Marcelo Trylesinski
    @Kludex
    While investigating a memory leak, I've noticed that I'm unable to print gc.garbage with rich.pretty.pprint, when I set gc.set_debug(gc.DEBUG_LEAK)... Not sure about the meaning of this
    unable to print = gc.garbage blocks
    @graingert do u have any idea? /\
    1 reply
    graingert
    @graingert:matrix.org
    [m]
    ooh
    Can you link me to the pprint source?
    graingert
    @graingert:matrix.org
    [m]
    @Kludex: also can you get a traceback from where it hangs?
    You can dig it out of sys._current_frames()
    Marcelo Trylesinski
    @Kludex
    (I'll do it tomorrow night, jfyk - Thanks :pray: )
    graingert
    @graingert:matrix.org
    [m]
    It's very rude to nerd snipe someone this way :/ ;)
    1 reply
    Marcelo Trylesinski
    @Kludex
    import asyncio
    import gc
    from gc import get_objects
    from pprint import pprint
    
    from starlette.applications import Starlette
    from starlette.responses import JSONResponse, Response
    from starlette.routing import Route
    from starlette.requests import Request
    
    gc.set_debug(gc.DEBUG_LEAK)
    
    
    async def homepage(request: Request):
        request.state.test = [x for x in range(999999)]
        return JSONResponse({'hello': 'world'})
    
    
    async def collect(request: Request):
        n = gc.collect()
        pprint(gc.garbage) 
        return JSONResponse({"collected": n})
    
    
    app = Starlette(routes=[Route('/', homepage), Route('/collect', collect)])
    I spent the whole day debugging this
    encode/uvicorn#1564 << I think there's a reference cycle on ServerState <-> HTTP Protocol
    what I'm saying it's unrelated to rich
    it's just to give you context...
    While debugging the uvicorn issue, I tried to use from rich.pretty import pprint but the pprint(gc.garbage) blocks me 4ever
    graingert
    @graingert:matrix.org
    [m]
    Have you fiddled around with pyobjgraph?
    Marcelo Trylesinski
    @Kludex
    pyobjgraph?
    graingert
    @graingert:matrix.org
    [m]
    pip install objgraph
    It's got a thing for finding out what's keeping something alive

    So you'd do something like
    class Canary: pass
    o = Canary()
    request.state.foo = o
    del o
    ...
    objgraph.show_chain(

    objgraph.find_backref_chain(
    
        random.choice(objgraph.by_type('Canary')),
    
        objgraph.is_proper_module),
    
    filename='chain.png')

    ```

    Marcelo Trylesinski
    @Kludex
    image.png
    what do I get from this? :laughing:
    this is just to give me the confirmation, right? because I think I've spotted the reference cycle in the code already
    graingert
    @graingert:matrix.org
    [m]
    Oh right no it shouldn't end up in gc.garbage
    The issue you have is there's a reference cycle that the GC resolves, but you don't want to wait for that?
    Marcelo Trylesinski
    @Kludex
    I don't fully understand the question, and I don't want to give an answer that may mislead us here. So to enrich my knowledge here...
    What does it mean that the "GC resolves, but I don't want to wait for that"? On my situation, if I manually run gc.collect(), my memory goes back to what I'd expect it be - does this say something?
    4 replies
    graingert
    @graingert:matrix.org
    [m]
    But yeah that's what I mean
    graingert
    @graingert:matrix.org
    [m]
    I mean if it's just a cycle then the GC should clean it up for you
    You need to find out what's keeping a reference after the request is finished?
    Steven Bell
    @stevebell117
    @Harmouch101 Just wanted to say thanks for your Definitive Guide, is really helping me get set up creating my own hooked-in Console on my TUI
    1 reply
    Paul m. p. Peny
    @pmp-p
    (sorry to ask again) Is there any sixel support, and if not is it planned by anyone ?
    Pierce Jamieson
    @jamiesonpa
    Does anyone have an example of putting a rich panel inside of another rich panel and getting event handling to work for both? Is that even possible?