[Tutor] Saving files in Python, etc.

alan.gauld@bt.com alan.gauld@bt.com
Fri, 30 Nov 2001 15:07:13 -0000


> I have been programming Visual Basic for about 2 years (on 
> to one) in Python, but i do not know how to save a file in 
> Python.  lets say i have:

Try my tutor. It illustrates concepts using QBASIC and Python 
so you can compare what you know with Python(QBASIC being 
similar to VB in syntax)

It has a topivc on file handling

http://www.freenetpages.co.uk/hp/alan.gauld/

> Also, how can you change the color of the console window (in 
> which your program runs in) using code in Python?

Assuming you are in a DOS window you can write ANSI.SYS 
control strings - read the ANSI.SYS info in the help pages 
- might be part of the Res Kit help in recent Win9x....

If you mean IDLE I think you have to do it the hard way 
and edit the .py file code - probably safer to leave it 
alone for now!

HTH

Alan g