473,700 Members | 2,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python and VT100

Using Python (Command line version, not IDLE, nor pythonwin)

With Linux, print "\033[33mHello" prints a brown hello. Fine!
With Windows, the VT100 sequence seems to be unknown?
Why? and how can I correct that?

Thanks
Jul 18 '05 #1
2 5278
On Sat, 5 Mar 2005 22:10:38 +0100, rumours say that "Dominique Bouré"
<d.*****@free.f r> might have written:
Using Python (Command line version, not IDLE, nor pythonwin)

With Linux, print "\033[33mHello" prints a brown hello. Fine!
With Windows, the VT100 sequence seems to be unknown?
Why? and how can I correct that?


(Sigh)

"Why?"

I don't think there ever was a colour VT100, BICBW. I don't know about colour
VT220 either. I once worked with a colour VT320.

Linux consoles simulate some "ANSI" terminal similar to the VT's mentioned above
for historical reasons. It's a quirk maybe; it's not a mandatory feature for
every computer system out there (hint: what was the escape sequence to print a
brown hello on a Macintosh with MacOS 9 and earlier?)
"and how can I correct that?"

Your car does run on charcoal either, but you don't *correct* that (ie it's not
part of the design of the car).

There was once an ANSI.SYS (on MS DOorS days, that is :) that you could load in
your CONFIG.SYS file and then MS-DOS command line recognized ANSI escape
sequences. I don't know if it still exists.

And I just checked on this laptop with Windows XP and it exists! (exclamation
most sincere). Try googling for its use.
http://en.wikipedia.org/wiki/Vt100

http://en.wikipedia.org/wiki/Ansi.sys
--
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...
Jul 18 '05 #2
On Sat, 5 Mar 2005 22:10:38 +0100, rumours say that "Dominique Bouré"
<d.*****@free.f r> might have written:
Using Python (Command line version, not IDLE, nor pythonwin)

With Linux, print "\033[33mHello" prints a brown hello. Fine!
With Windows, the VT100 sequence seems to be unknown?
Why? and how can I correct that?

Thanks

On Sat, 5 Mar 2005 22:10:38 +0100, rumours say that "Dominique Bouré"
<d.*****@free.f r> might have written:
Using Python (Command line version, not IDLE, nor pythonwin)

With Linux, print "\033[33mHello" prints a brown hello. Fine!
With Windows, the VT100 sequence seems to be unknown?
Why? and how can I correct that?


(Sigh)

"Why?"

I don't think there ever was a colour VT100, BICBW. I don't know about colour
VT220 either. I once worked with a colour VT320.

Linux consoles simulate some "ANSI" terminal similar to the VT's mentioned above
for historical reasons. It's a quirk maybe; it's not a mandatory feature for
every computer system out there (hint: what was the escape sequence to print a
brown hello on a Macintosh with MacOS 9 and earlier?)
"and how can I correct that?"

Your car does not run on charcoal either, but you don't *correct* that (ie it's
not part of the design of the car).

There was once an ANSI.SYS (on MS DOorS days, that is :) that you could load in
your CONFIG.SYS file and then MS-DOS command line recognized ANSI escape
sequences. I don't know if it still exists.

And I just checked on this laptop with Windows XP and it exists! (exclamation
most sincere). Try googling for directions how to load it.

Otherwise, if willing to drop compatibility with escape sequences, you can use
WConio:

http://newcenturycomputers.net/projects/wconio.html
Other related stuff:

http://en.wikipedia.org/wiki/Vt100

http://en.wikipedia.org/wiki/Ansi.sys
--
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
5493
by: Edward K. Ream | last post by:
I would like to say a few (actually more than a few) words here about some recent discoveries I have made concerning the interaction of Leo and Python. If you don't want to hear an inventor enthuse about his work, please feel free not to read further :-) There are at least three, no four, no five, no six, no seven reasons why Leo and Python work so well together. Most are new (in my mind) with the 4.1 release of Leo. The first several...
1
4331
by: Gabriel Cooper | last post by:
I'm running redhat 9 with python 2.3.3 and when I'm in gnome-terminal and inside the python interpreter I can't use the arrow keys anymore. They simply show ^[[A, ^[[B, etc. It doesn't appear to be gnome-terminal's settings as XTerm has the same problem. If just at the command prompt they work fine, I'm able to hit up/down/left/right and see previous/next shell commands or move around to fix typos on the current line... however once I...
4
8225
by: Bill Davy | last post by:
To make life easier for my users, I'd like to colour my prompt string (as handed to raw_input()) a different colour to that produced by print. I'm using Python 2.4.1 and IDLE 1.1.1 on Windows XP. Is it possible, and if so, how? tia, Bill
4
4895
by: fatp | last post by:
I know how to use telnet in vb.net but now I need to connect a dial-up modem first using vt100. Is there an built-in api for this?
1
2410
by: Free Doc | last post by:
Hi, I need to read the keyboard input without waiting for the ENTER key to be pressed in a VT100 emulation. I use an ANSI C compiler, so the getch()(and similar) needs the ENTER too. Please, don't suggest me to use the courses (that I already know) because I can't. I found the escape character sequences (ESC ] etc) to set the cursor position, clear the screen and so on, and I guess there should be a kind of similar to intercept a key...
48
4548
by: Daniele C. | last post by:
As soon as my sourceforge.net project gets approved, I am going to build a ncurses port to win32 bindable to sockets, e.g. allowing VT100/ANSI terminals and the creation of simple terminal servers using the ncurses API for the UI. I plan to initially support only a subset of the ncurses lib, leaving the lib open to expansion/completion. Please stop me if I am going to reinvent the wheel, and tell me if there are any libraries of this...
0
1108
by: malahal | last post by:
I am planning to write a very simple python script that displays files based on user input. E.g. I need to display f1.msg file if the user presses <F1key, f2.msg file if the user presses <F2key. What is the easiest way to do this on Linux (xterm/vt100/asni etc). I tried using curses and it works, but I want something that does NOT modify or redraw the user screen. Something like this: def display(): key = raw_input()
0
9206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8916
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7802
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5899
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4400
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2383
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2022
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.