Coder Social home page Coder Social logo

Cursor position? about asciimatics HOT 3 CLOSED

peterbrittain avatar peterbrittain commented on July 23, 2024
Cursor position?

from asciimatics.

Comments (3)

peterbrittain avatar peterbrittain commented on July 23, 2024

The README actually states that it supports "cursor positioning", by which I mean you can position the cursor at any point on the screen (in order to print something at a specific location).

Given that asciimatics:

  • hides the actual terminal cursor (as it ruins any animations)
  • does all input with no echo (so that you can control whether there is any output at all)
  • handles all the messy interactions for you to get your output to the desired location
  • optimizes any screen output on every refresh (so the cursor is almost certainly not where you think it is)...

Why do you need to read the cursor position at all?

from asciimatics.

imdaveho avatar imdaveho commented on July 23, 2024

Hey Peter,

Re-read the README right after posting; and, yeah...face palm moment.

I'm actually using the lib to create a more interactive cli tool that's in
between your typical cli and a TUI. I'm looking to port/fork
python-inquirer to use asciimatics instead of blessings to render these
prompts for cross platform consistency.

Cursor positioning would have been nice just to handle where to print the
next set of questions/choices, but I can imagine building that into my
tool-- just thought there was a method that did that already.

You might be wondering why use asciimatics for this? Like you, I quickly
realized that there were not any frameworks/libraries that handle console
output consistently between linux/mac/windows. I've tried used
python-prompt-toolkit, but found it to be difficult to reason about, esp.
for my use case.

Thanks for the quick reply, you can close this ticket.

On Aug 11, 2016 4:24 AM, "peterbrittain" [email protected] wrote:

The README actually states that it supports "cursor positioning", by which
I mean you can position the cursor at any point on the screen (in order to
print something at a specific location).

Given that asciimatics:

  • hides the actual terminal cursor (as it ruins any animations)
  • does all input with no echo (so that you can control whether there
    is any output at all)
  • handles all the messy interactions for you to get your output to the
    desired location
  • optimizes any screen output on every refresh (so the cursor is
    almost certainly not where you think it is)...

Why do you need to read the cursor position at all?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANV4g1NTkclU4fKXDwHh6u__0TmzA3-Eks5qetwxgaJpZM4JhsAW
.

from asciimatics.

peterbrittain avatar peterbrittain commented on July 23, 2024

Thanks for the vote of confidence in this project! I'm glad I could help...

from asciimatics.

Related Issues (20)

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.