Re: [Tutor] "hello, python world!"

Magnus Lycka magnus at thinkware.se
Mon Mar 22 09:04:49 EST 2004


> On Saturday 20 March 2004 04:31, python_simpleton wrote:
> > Q. On my first night trying to learn Python 2.3, I noticed when I click on
> > the program it opens a window that lookes like DOS, is this because Python
> > for Windows is based on python for DOS?(Read that in the instalation)

No, it looks more or less like that also on computers that are completely 
void of Microsoft code. I guess the similarities with the DOS port has more
to do with Windows inheriting some peculiarities from DOS in the way it 
handles C programming, which are invisible to the normal Python user.

Microsoft has really managed to confuse people regarding the distinction
between operating system and graphical user interface by using the "Windows"
label in such a strange way, implying that the GUI is the operating system.
This is just a smoke screen. Windows 3.x, 95, 98 and ME, are all graphcal
shells for MS DOS bundled with some features that are typically placed in 
the actual operating system, such as limited ability for multi-tasking and 
extended memory management. Later versions of these Windows products where 
always bundled with DOS, but only used the Windows name, and Microsoft 
certainly didn't want people to associate them with DOS.

Microsoft NT (New Techology) was a completely new, and much more capable
operating system for PCs, with a graphical user interface which was very 
similar to the DOS Windows shells. It's architectual roots came from a
planned successor to the venerable VMS at Digital Equipment Corporation. 
See http://en.wikipedia.org/wiki/History_of_Microsoft_Windows for info 
if you are interested in this technology theft etc.

The command line interface (CMD.EXE) in all versions of NT (whether it's 
NT 3.x, NT 4, NT 5.0 a.k.a. Windows 2000 or NT 5.1 a.k.a. Windows XP) is 
*not* DOS. It can emulate DOS to some extent, but there are certainly a 
number of command line based programs in NT that never existed in DOS and
won't run there, and many DOS programs can't run in the NT command line 
interface.

Don't confuse the lack of a GUI with the primitive properties of DOS.

Python is designed to work on a large number of platforms. You can run it
in many diverse environments such as mobile phones (Nokia 60 series), PDAs,
personal computers of various kinds, as well as large servers such as IBM
mainframes.

Most Python programs can run without a graphical user interface, and the
text based command line interface is a very robust and simple interface
that I certainly prefer to use in many situations, but I do notice that end 
users often seem to dislike programs using a text based interface, even in 
cases where a GUI doesn't offer any real advantages.

While many programmers prefer Python over other programming languages for
developing GUI applications, I suggest that you leave that for later. GUI
programming in Python is not really for beginners with todays tools.

> > Q. I had a hard time figuring out how to do the password.py in the tutorial
> > Josh Cogliati made. it took me hours trying to use the command line and
> > IDLE and reading error after error to notice the text files that came with
> > 2.3 then i typed the program in Notepad and opened it with IDLE (now i find
> > you can just open new window!)  Is Notepad suitable for programming on
> > Windows XP? I use the internest on a Windows ME.

Anna Ravenscroft replied:
> I've used notepad, but I recommend for now that you stick with IDLE's window 
> and just use that. It'll give you a lot more help.

Note that the IDLE window titled "Python Shell" is not the window where you
write programs. This is just for direct execution of individual Python 
statements etc. This is very useful for some experimentation etc, but when
you want to write a program, you open a separate editor window with "File->New"
or "File->Open" just like you work with documents as in most other Windows 
programs.


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus at thinkware.se



More information about the Tutor mailing list