Read ETexts Activity

James Simmons jim.simmons at walgreens.com
Thu Feb 14 17:40:18 EST 2008


Edward Cherlin wrote:

>Have you added your hard-won knowledge to the Wiki pages on Sugar and
>Sugarizing?
>
>  
>
To be truthful, I'm a little leery of editing Wiki pages.  I'm afraid 
I'm going to mess up somebody else's hard work.  We use a Wiki at the 
office but there is an implied ownership for each article and nobody 
edits anything without discussing it with the original author.  I found 
that the best information available was in the Pydoc for the Activity 
class, which I only stumbled upon.  I've done Java for years so I'm 
familiar with JavaDoc but I'm new to python.  I was toying with the idea 
of writing a sort of manual for rank beginners that would cover things 
like how to set up a development environment, how to use Eric, how to 
learn python, how to write a python program that runs from the terminal, 
basic debugging techniques, how to make a python program into an 
activity, etc.  I could use my Activities as samples.  It would be my 
own document, but I wouldn't mind being edited.

The thing is, a lot of my hard-won knowledge would seem laughable if it 
was inserted into the Wiki.

>Well, we are talking about putting TTS and karaoke-style text marking
>in Read. Presumably nearly the same code would work in your activity.
>Or we could fold your code for handling Zip files and Gutenberg's lack
>of formatting into Read. And we have plenty of pedagogues here to
>consult.
>
>  
>
When I said my Activity was trivial I wasn't kidding.  I basically stick 
a GTK label in a scrollable window.  I set the background color to 
white.  I read the file from the Journal.  If it ends with .zip I unzip 
the contents to a temporaray file, otherwise I work with the file 
directly.  I read the entire file and make a list of pointers, adding 
one every 45 lines.  I then load the first 45 lines into the label and 
listen for keydown events.  Arrow keys and gamepad keys are used to page 
forward and backward.  I save the current page number as meta info so 
you can resume the book where you left off.  I will support skipping to 
a page with the toolbox.  I might support text search.  I will probably 
support copying text to the clipboard, and I might support adjusting the 
font size.  I will attempt to make it shareable.

None of this code is anything to write home about, but it does make a 
handy etext reader.  Adding TTS and Karaoke highlighting to what I have 
created  would be more trouble than its worth.

>>I might be of use teaching
>> children to write simple computer programs.
>>    
>>
>
>I started a document on the Wiki, Programming for Children
>(activities), and another, Programming with Children (tutorials). Your
>input would be most welcome. See the OLPC Publications page for more
>suggestions and invitations.
>
I'll definitely check them out.

James Simmons

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20080214/5bc0163f/attachment.html>


More information about the Devel mailing list