GithubHelp home page GithubHelp logo

decouple from urwid? about fbed HOT 8 CLOSED

twinklebear avatar twinklebear commented on September 16, 2024
decouple from urwid?

from fbed.

Comments (8)

Twinklebear avatar Twinklebear commented on September 16, 2024

Thanks! I think it should be possible to decouple from urwid, but I don't have a decoupled version of it. I think to make a non-urwid version you can just take out all the use of urwid in the code, and just make sure to call man.monitor_encoding in a loop: https://github.com/Twinklebear/fbed/blob/main/fbed.py#L252. This is done by calling it every 0.5s using urwid's loop/alarm stuff, but just calling it a loop and sleeping for 0.5s should work fine as well.

from fbed.

ajeema avatar ajeema commented on September 16, 2024

Awesome, that k you so much for your reply. I will give it a go! Cheers

from fbed.

ajeema avatar ajeema commented on September 16, 2024

I'm relatively new to Python. Do you mean a for loop or an event loop?

from fbed.

Twinklebear avatar Twinklebear commented on September 16, 2024

I think you could just do a for loop, with a sleep in it

from fbed.

ajeema avatar ajeema commented on September 16, 2024

I've been trying and trying. First tried an asyncio loop, then a for loop. I keep getting recursion errors. Any direction you may give, when you have time, would be very. much appreciated.

from fbed.

Twinklebear avatar Twinklebear commented on September 16, 2024

No worries! I took a look at hacking up a version without urwid that just logs the encoding status to the terminal, check it out here: https://github.com/Twinklebear/fbed/blob/no-ui/fbed.py .

from fbed.

ajeema avatar ajeema commented on September 16, 2024

oh man, that is so awesome! I really appreciate you taking time out to help me! I'll take a look. Again, thank you so much!

from fbed.

Twinklebear avatar Twinklebear commented on September 16, 2024

No problem! Let me know if you have some questions, but I'll go ahead and close this issue

from fbed.

Related Issues (3)

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.