[Tutor] Designing a program (File-Fetcher)

bob gailer bgailer at gmail.com
Fri Mar 15 13:49:30 CET 2013


On 3/14/2013 5:25 PM, Christopher Emery wrote:
> Hello All,
>
> Okay, I know the best way to learn how to do something is to jump in 
> so I have decided I would like to make a program (command line) to get 
> files from a website that will be then used later on by another program.
>
> I read your post before reading Alan's reply. I had the same thought - 
> tackle one piece then add on.file-fetcher (within zip file)
[snip]
> Okay with the above said, how should I start to do pseduo code?
There is no formal pseudocode - you write the steps as you think of then 
ask is that explicit enough to code or should I break it down more?

Python has been called executable pseudocode. Might as well begin 
writing in Python but not rigidly.
> Would each of the above be a function within the program?
Perhaps. In your case I'd do that to keep the "main" program simple.
> How would someone run a command that is normally done at the command 
> line like espeak within python program?
There seems to be an inconsistency at 
http://espeak.sourceforge.net/download.html
It says Compiled for Windows. SAPI5 and command-line versions. but all I 
get is TTSApp.exe which opens the GUI
I am looking for the command line program (Linux and Windows) to speak 
text from a file or from stdin.
Do you know where it is or how one gets it?

Take a look at thesubprocess module - this is the usual way to run such 
a program and give it input.

> Also how would I hide the visual output of a command like espeak, it 
> throws alot of erros but it works, it happens to others using it too.
Can't address this as I apparently don't have the correct executable.

-- 
Bob Gailer
919-636-4239
Chapel Hill NC



More information about the Tutor mailing list