Questions tagged [ansi-escape]

ANSI escape code (or escape sequences) is the method of in-band signaling to control formatting, color, and other output options on video text terminals.

To encode this formatting information, it embeds certain sequences of bytes into the text, which have to be interpreted specially, not as codes of characters. Although hardware text terminals have become increasingly rare in the 21st century, the relevance of this standard persists because most terminal emulators interpret at least some of the ANSI escape sequences in the output text. One notable exception is the win32 console component of Microsoft Windows.

655 questions
0
votes
0 answers

Odd behavior with long file names and Win10 console VT-100 escape sequences

I have a Windows 10 batch file that runs ffprobe on all files in a directory. Each file name is displayed on the screen on a specific line. When the next file is processed the previous file name is erased and the next file name is written on the…
gregm
  • 157
  • 6
  • 20
0
votes
0 answers

Character “^[[A” “^[[B” “^[[C” “^[[D” when pressing the arrow keys in pyspark 2.0

I am getting the characters ^[[A ^[[B ^[[C ^[[D when pressing the arrow keys in pyspark 2.0. I have spark 1.6 and spark 2.0 installed on my virtual machine on Cent OS. There is no issue with spark 1.6. Since I am using python 2.7 with pyspark 2.0,…
Chakraborty
  • 123
  • 1
  • 2
  • 8
0
votes
0 answers

Print bold text to console output

I am using eclipse IDE latest version with this plugin: https://github.com/mihnita/ansi-econsole or https://mihai-nita.net/java/ and https://mihai-nita.net/wp-content/uploads/2013/06/AECSample.jpg And like you can see in the picture the plugin…
David
  • 145
  • 1
  • 3
  • 13
0
votes
1 answer

Code shows all the frames at once when supposed to show separately

There is a code. I want to create a text animation. It prints a line of text then after some delay erases it and prints another. Here is the function that creates a text frame: def frame(data): clear = '\u001b[0m' for letter in data: …
0
votes
1 answer

How to print without loosing current input in linux terminal?

So lets say we have a c program that runs in a linux terminal that continuously needs to print information. Buy also at the same time you have to be able to input text. The program has a prompt that says program> so every time that the program…
Dreamable
  • 1
  • 1
0
votes
1 answer

Python `doctest` with ANSI escapes

I have some code for which I have some doctest, e.g. def foo(x): """ Examples: >>> s = foo() >>> print(repr(s)) '\x1b[0;35mfoo\x1b[0m \x1b[0;36mbar\x1b[0m' >>> print(s) foo bar """ return…
norok2
  • 25,683
  • 4
  • 73
  • 99
0
votes
2 answers

How to make a text bold in shell script and send the output using SMTP

I want to make text bold and send that output using SMTP as mail. Mail configuration is done properly and i am getting mail. But i am getting a .bin file instead of the printed line. Please help me with this. This is my code to make the text…
Kaverappa KU
  • 87
  • 1
  • 7
0
votes
0 answers

ansi code works once, but not other times - python

I am trying to make code that displays text, goes back to the beginning of the chunk of text and displays something different. def melee_attack(): melee1 = (''' /| ________________ O|===|* >________________> \|''') melee2 = ('''_ …
Dulnefni
  • 9
  • 2
0
votes
1 answer

How to colour a specific character cell in python using ansi escape codes where the character cell location is determined by variables

I would like to be able to colour a character cell in python where the character cell to be coloured is determined by two variables (one for the line one for the column). I've tried string parsing and string concatenation but I can't work out why…
Looby
  • 9
0
votes
0 answers

How to set a specific pixel (i.e 20,30) in the linux terminal to white using python

This is my first question on here. I'm trying to learn more about how to produce ANSI art in the linux terminal using Python. I want to be able to locate a specific pixel in the terminal and change it's colour. For example if my terminal screen…
Looby
  • 9
0
votes
1 answer

Extra escape characters from ls command making life hard

I want to issue a simple ls command and store the results in a file: ls -ltr equ* > ffile The file names show up with extra escape characters attached. These show up plainly under some utilities (like vi), and not at all under others (like more). …
bob.sacamento
  • 6,283
  • 10
  • 56
  • 115
0
votes
0 answers

How to color run ouput Android Studio

I have built an application that prints a lot of results and i need to keep track of them and be able to read them in a easy way so i decided to use ANSI colors to print the output colored but this is the output i obtain: [30m[37m[36m[35m[34m[*]…
DRE
  • 263
  • 8
  • 35
0
votes
1 answer

Is there a way to output ANSI escape sequences using low level output?

I'm trying to make a graphical engine in console. I don't use any of the GLs, but soon hoping to start. It is written in C and as for now, it is capable of building semi-3D environment in color, but I found, that win cmd supports True color scheme,…
0
votes
1 answer

ANSI sequence to change foreground and background color of cygwin mintty/Mac iTerm/Unix xterm

I typically have a lot of windows open on a lot of different computers. I want to have the .bash_profile on each machine set the foreground and background color to a color that is specific for that machine. I use mintty on Cygwin, and iTerm on the…
vy32
  • 28,461
  • 37
  • 122
  • 246
0
votes
1 answer

How do I prevent ANSI escape key sequences from spamming display during read in bash/ash script?

I'm attempting to make a script that handles arrow keys on a very limited system with busybox ash and very little else. No stty for example. I have something that mostly works but occasionally some ANSI escape sequences show up on the screen. …
deeice
  • 3
  • 2