[Tutor] newbie programmer

Kirk Bailey idiot1@netzero.net
Fri Jun 13 22:54:01 2003


Wow, dos. OK, you are talking about batch files, and the .bat name extension.

ok, let's go over this in context.

Dustin Phillips wrote:
> I checked out the useless python website and it is great, it has some really
> interesting challenges that I can practice with.  I am attempting to take on
> one of these challenges and a question immediately came up.  I am trying to
> create a dos based menu driven application, but I was wondering what is the
> most efficient way to implement a menu system?
Hard to say, can be effected by the context of what you are doing. But consider that you 
can give a batch file a name which is a key. that is, '1.bat','2.bat',3.bat'.
The initial one can set up screen conditions and even declare the options to the user. 
The prompt can be redefined to be something else, such as 'YOUR CHOICE?'
So you spew out the introductory lines, the several choices, and a brand new prompt.


OR

You can do all that, but ask for input, and go to a label in the batch depending on the 
answer.

There is a book, called 'MS-DOS Batch file programming' if memory serves me right. This 
is going back for me to 1991, and it's buried in the storage room/debris pile. This 
would be a good reference to you. If you can find it.

> I started out using several
> print statements, but I plan on linking the main menu to submenus and so on
> which will get very cumbersome.

with the receiving of input in the script, menus and handling the results can be in the 
batch file, and bat files can CALL other bat files.
>  How can I make the menus more modular?

Each bat file is a module.

> Should I save the menu entries into a dictionary?

Whoah, hold it, you said you wanted to do this in dos.

Did I misunderstand? Are you actually seeking a python solution on a windows/dos machine?


> ----- Original Message -----
> From: "Dustin Phillips" <python-tutor@ev1.net>
> To: "Alan Gauld" <alan.gauld@blueyonder.co.uk>; <python-tutor@mail.ev1.net>;
> <tutor@python.org>
> Sent: Tuesday, June 03, 2003 11:21 PM
> Subject: Re: [Tutor] newbie programmer
> 
> 
> 
>>Thanks for the insight and suggestions, I will check out the useless
> 
> python
> 
>>sight right away.
>>----- Original Message -----
>>From: "Alan Gauld" <alan.gauld@blueyonder.co.uk>
>>To: <python-tutor@mail.ev1.net>; <tutor@python.org>
>>Sent: Tuesday, June 03, 2003 5:43 PM
>>Subject: Re: [Tutor] newbie programmer
>>
>>
>>
>>>>just wondering what sort of real world things I can do with
>>>>python?
>>>
>>>Games, Graphics, Scientific numerical simulations, etc.
>>>THere used to even be a web browser written in Python,
>>>there is also a graphics program(like Visio).
>>>
>>>Try searching sourceforge to see what open source projects
>>>are underway using Python.
>>>
>>>With ,more experience you can even join one of the project
>>>teams...
>>>
>>>Oh yes, And the IDLE development tool that comes with
>>>Python is written in Python...
>>>
>>>
>>>>anyone have any advice or suggestions?
>>>
>>>For some fun small projects check out the "Useless Python"
>>>website, which is far from useless...
>>>
>>>Alan G
>>>Author of the Learn to Program web tutor
>>>http://www.freenetpages.co.uk/hp/alan.gauld
>>>
>>>
>>
>>
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
> 


-- 

end

Cheers!
         Kirk D Bailey
                               think
http://www.howlermonkey.net/ +-----+ http://www.tinylist.org/
http://www.listville.net/    | BOX | http://www.sacredelectron.org/
                              +-----+
"Thou art free"-ERIS          think    'Got a light?'-Promethieus

.