#๐Ÿ”’ im using curser module

48 messages ยท Page 1 of 1 (latest)

steel kernelBOT
#

@soft storm

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

soft storm
#

im using curser module and this is what shows up, didnt expect it like that. i might have done something wrong
i expect the menu to be under the ------- stuff and the ASCII not to be like that... and ofcourse the colors should be working

code snippet: https://pastebin.com/376yvHtK

#

python menu broken (no error)

karmic pasture
#

Your only issue seems to be the miscalculation of the offset on line 71?

#

But, also, if you're starting from scratch I have to strongly recommend textual for anything with a lot of complex state and layout

delicate osprey
#

but yeah, could be it

karmic pasture
#

Well, 71 to 76

#

He has some ANSI codes that aren't properly escaped

soft storm
#

well

karmic pasture
#

Or arent' supported by the windows terminal

soft storm
#

what should i edit it to

charred citrus
#

You calculate the offset to be 6 and the UI definitely takes more than 6

karmic pasture
#

But the position is what's broken

charred citrus
#

It write on where you ask it to write

karmic pasture
#

Again

#

Wrong person

soft storm
charred citrus
soft storm
#

what should i put it as? if anyone can edit it and send here, would appreciate

#

idrk know that much lol

charred citrus
soft storm
#

idek

#

just under the -----

#

that is printed

charred citrus
#

And then just count how many line

karmic pasture
#

@soft storm Do you see the ^[[35m and the ^[[94 in your screenshot?

soft storm
#

yeah

karmic pasture
#

Those are the color codes for a magenta foreground and blue-ish foreground, which your terminal isn't handling

soft storm
#

how should i fix that??

karmic pasture
#

Where is Fore coming from?

#

Colorama?

charred citrus
soft storm
#

also

#

all colors are working

#

except the banner

karmic pasture
#

Your screenshot literally shows no colors ๐Ÿ˜›

soft storm
#

its just the banner that isnt working

karmic pasture
#

That's not the same thing

#

You're mixing both curses and colorama

#

(Also, again, this is all infinitely easier with https://textual.textualize.io/ if there's no reason you have to use curses)

steel kernelBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.