ANN: Python training "text movies"

S

Steven D'Aprano

I don't know what to call these, so for now I'll call them "training
text movies" until I come up with a better name..

I hope these will be helpful, especially to new students of Python.

http://lightbird.net/larks/tmovies.html


For the benefit of those who don't have web access at the moment, or who
don't like to click on random links they don't know anything about, would
you like to say a few words describing what "text movies" are, and how
you think these may be helpful?
 
M

Mitya Sirenef

For the benefit of those who don't have web access at the moment, or who
don't like to click on random links they don't know anything about, would
you like to say a few words describing what "text movies" are, and how
you think these may be helpful?


Sure: they play back a list of instructions on use of string methods and
list comprehensions along with demonstration in a mock-up of the
interpreter with a different display effect for commands typed into (and
printed out by) the interpeter. The speed can be changed and the
playback can be paused.

- mitya
 
T

Terry Reedy

Sure: they play back a list of instructions on use of string methods and
list comprehensions along with demonstration in a mock-up of the
interpreter with a different display effect for commands typed into (and
printed out by) the interpeter. The speed can be changed and the
playback can be paused.

They are simulated videos of an interactive interpreter session, with
entered commands appearing all at once instead of char by char, and with
the extra features mentioned above. I presume the purported advantage
over an after-the-fact transcript is focusing watcher attention on each
entry and response.
 
M

Mitya Sirenef

They are simulated videos of an interactive interpreter session, with
entered commands appearing all at once instead of char by char, and
with the extra features mentioned above. I presume the purported
advantage over an after-the-fact transcript is focusing watcher
attention on each entry and response.

That is right; I would also add that it may be overwhelming for a newbie
to be reading through a large "wall of text" -- here you have blank
space after the current paragraph so the attention is focused even more
on the last few lines.

Additionally, since instructions scroll automatically, I can space them
out more than you would conventionally do in a manual.

- mitya
 
F

Franck Ditter

That is right; I would also add that it may be overwhelming for a newbie
to be reading through a large "wall of text" -- here you have blank
space after the current paragraph so the attention is focused even more
on the last few lines.

Additionally, since instructions scroll automatically, I can space them
out more than you would conventionally do in a manual.

Pretty cool.[/QUOTE]

When reading the source of the Web page which shows the scroll,
I can't find the reference to the text displayed. Only "text"...
How may we use the software which generates the Javascript ?
Thanks, it's cool.

franck
 
M

Mitya Sirenef

Mitya Sirenef said:
Thanks!

the text is in var commands = ...

You can download the generator script here:

https://github.com/pythonbyexample/PBE/blob/master/code/jstmovie.py

(you also need to grab tmovies dir)
When looking at the source of the page :
http://lightbird.net/larks/tmovies/strings.html
I find commands = []
I can't guess where the strings displayed come from...

franck

Look 10 lines below that line.


I have also added a related page that allows you to paste your own
text to make a movie; it's linked from the same page with the
list of generated t-movies.

(that page does not let you use typewriter effect or custom pauses
though).

- mitya
 
F

Franck Ditter

Mitya Sirenef said:
Mitya Sirenef said:
On 01/14/2013 01:34 AM, Franck Ditter wrote:
That is right; I would also add that it may be overwhelming for a newbie
to be reading through a large "wall of text" -- here you have blank
space after the current paragraph so the attention is focused even more
on the last few lines.

Additionally, since instructions scroll automatically, I can space them
out more than you would conventionally do in a manual.

Pretty cool.
When reading the source of the Web page which shows the scroll,
I can't find the reference to the text displayed. Only "text"...
How may we use the software which generates the Javascript ?
Thanks, it's cool.

franck
Thanks!

the text is in var commands = ...

You can download the generator script here:

https://github.com/pythonbyexample/PBE/blob/master/code/jstmovie.py

(you also need to grab tmovies dir)
When looking at the source of the page :
http://lightbird.net/larks/tmovies/strings.html
I find commands = []
I can't guess where the strings displayed come from...

franck

Look 10 lines below that line.


I have also added a related page that allows you to paste your own
text to make a movie; it's linked from the same page with the
list of generated t-movies.

(that page does not let you use typewriter effect or custom pauses
though).

- mitya

I'm probably blind but 10 line after the line "commands = []", I find :

var commands = [
[
"text",
" "
],
[
"text",
" "
],
....]

but nothing concrete ! How come ?

franck
 
F

Franck Ditter

Franck Ditter said:
Mitya Sirenef said:
On 01/14/2013 01:34 AM, Franck Ditter wrote:
That is right; I would also add that it may be overwhelming for a newbie
to be reading through a large "wall of text" -- here you have blank
space after the current paragraph so the attention is focused even more
on the last few lines.

Additionally, since instructions scroll automatically, I can space them
out more than you would conventionally do in a manual.

Pretty cool.
When reading the source of the Web page which shows the scroll,
I can't find the reference to the text displayed. Only "text"...
How may we use the software which generates the Javascript ?
Thanks, it's cool.

franck
Thanks!

the text is in var commands = ...

You can download the generator script here:

https://github.com/pythonbyexample/PBE/blob/master/code/jstmovie.py

(you also need to grab tmovies dir)
When looking at the source of the page :
http://lightbird.net/larks/tmovies/strings.html
I find commands = []
I can't guess where the strings displayed come from...

franck

Look 10 lines below that line.


I have also added a related page that allows you to paste your own
text to make a movie; it's linked from the same page with the
list of generated t-movies.

(that page does not let you use typewriter effect or custom pauses
though).

- mitya

I'm probably blind but 10 line after the line "commands = []", I find :

var commands = [
[
"text",
" "
],
[
"text",
" "
],
....]

but nothing concrete ! How come ?

franck

OK OK found ! Thanks.

franck
 
F

Franck Ditter

Franck Ditter said:
Franck Ditter said:
Mitya Sirenef said:
On 01/19/2013 04:32 AM, Franck Ditter wrote:
On 01/14/2013 01:34 AM, Franck Ditter wrote:
That is right; I would also add that it may be overwhelming for a newbie
to be reading through a large "wall of text" -- here you have blank
space after the current paragraph so the attention is focused even more
on the last few lines.

Additionally, since instructions scroll automatically, I can space them
out more than you would conventionally do in a manual.

Pretty cool.
When reading the source of the Web page which shows the scroll,
I can't find the reference to the text displayed. Only "text"...
How may we use the software which generates the Javascript ?
Thanks, it's cool.

franck
Thanks!

the text is in var commands = ...

You can download the generator script here:

https://github.com/pythonbyexample/PBE/blob/master/code/jstmovie.py

(you also need to grab tmovies dir)
When looking at the source of the page :
http://lightbird.net/larks/tmovies/strings.html
I find commands = []
I can't guess where the strings displayed come from...

franck

Look 10 lines below that line.


I have also added a related page that allows you to paste your own
text to make a movie; it's linked from the same page with the
list of generated t-movies.

(that page does not let you use typewriter effect or custom pauses
though).

- mitya

I'm probably blind but 10 line after the line "commands = []", I find :

var commands = [
[
"text",
" "
],
[
"text",
" "
],
....]

but nothing concrete ! How come ?

franck

OK OK found ! Thanks.

franck

When executing jstmovie.py, it complains :
'template.html' not found in tmovies...

franck

tmovies/template.html
 
M

Mitya Sirenef

Franck Ditter said:
Franck Ditter said:
On 01/19/2013 04:32 AM, Franck Ditter wrote:
On 01/14/2013 01:34 AM, Franck Ditter wrote:
That is right; I would also add that it may be overwhelming for a newbie
to be reading through a large "wall of text" -- here you have blank
space after the current paragraph so the attention is focused even more
on the last few lines.

Additionally, since instructions scroll automatically, I can space them
out more than you would conventionally do in a manual.

Pretty cool.
When reading the source of the Web page which shows the scroll,
I can't find the reference to the text displayed. Only "text"...
How may we use the software which generates the Javascript ?
Thanks, it's cool.

franck
Thanks!

the text is in var commands = ...

You can download the generator script here:

https://github.com/pythonbyexample/PBE/blob/master/code/jstmovie.py

(you also need to grab tmovies dir)
When looking at the source of the page :
http://lightbird.net/larks/tmovies/strings.html
I find commands = []
I can't guess where the strings displayed come from...

franck

Look 10 lines below that line.


I have also added a related page that allows you to paste your own
text to make a movie; it's linked from the same page with the
list of generated t-movies.

(that page does not let you use typewriter effect or custom pauses
though).

- mitya

I'm probably blind but 10 line after the line "commands = []", I find :

var commands = [
[
"text",
" "
],
[
"text",
" "
],
....]

but nothing concrete ! How come ?

franck

OK OK found ! Thanks.

franck

When executing jstmovie.py, it complains :
'template.html' not found in tmovies...

franck

tmovies/template.html

As I've said upthread, you need to download tmovies dir from
the same repository where jstmovie.py is located:

https://github.com/pythonbyexample/PBE/tree/master/code/


- mitya
 
S

Steven D'Aprano

On Sun, 20 Jan 2013 18:54:03 +0100, Franck Ditter wrote:

[snip quoting NINE levels deep]
When executing jstmovie.py, it complains : 'template.html' not found in
tmovies...

Please trim unnecessary quoted text out of your replies. We don't need to
read page after page of irrelevant comments that we've already read
before.

Thank you.

If there is more quoted text than new text you have written, or quoting
exceeds 3, maybe 4 levels deep, then there probably is too much
unnecessary quoting.
 
R

rusi

Sure: they play back a list of instructions on use of string methods and
list comprehensions along with demonstration in a mock-up of the
interpreter with a different display effect for commands typed into (and
printed out by) the interpeter. The speed can be changed and the
playback can be paused.

Hi Mitya.
What do you use for making these 'text-movies'?
[Asking after some googling]
 
F

Franck Ditter

Ok I can make my way with jstmovie. Some remarks and questions :

- Use encoding='utf-8' inside open of method __init__ of class Tutorial
in jstmovie.py. Otherwise foreign languages are stuck.

- To use the software outside Python, we need to have proper indentation
as real spaces. We should be able to distinguish Arial type for usual
text and fixed font for code.

- Should have some colors.

Wadda wadda <b>yadda</b> # blue annotation

Cool and useful software,

franck
 
M

Mitya Sirenef

Sure: they play back a list of instructions on use of string methods and
list comprehensions along with demonstration in a mock-up of the
interpreter with a different display effect for commands typed into (and
printed out by) the interpeter. The speed can be changed and the
playback can be paused.

Hi Mitya.
What do you use for making these 'text-movies'?
[Asking after some googling]

I'm using this script:

https://github.com/pythonbyexample/PBE/tree/master/jstmovie/

sample source file is in tmovies/src/

-m
 
M

Mitya Sirenef

Ok I can make my way with jstmovie. Some remarks and questions :

- Use encoding='utf-8' inside open of method __init__ of class Tutorial
in jstmovie.py. Otherwise foreign languages are stuck.

- To use the software outside Python, we need to have proper indentation
as real spaces. We should be able to distinguish Arial type for usual
text and fixed font for code.


Not sure I understand about indentation.. You mean like wrapping
everything in a textarea tag? Right now everything is in div,
which leads to all spaces being compressed in html when viewed.
- Should have some colors.

Wadda wadda <b>yadda</b> # blue annotation


I'm thinking of possibly using something like ReStructured text
and having css styles. Not sure yet.
Cool and useful software,

franck



Thanks!

-m
 
M

Mitya Sirenef

Ok I can make my way with jstmovie. Some remarks and questions :

- Use encoding='utf-8' inside open of method __init__ of class Tutorial
in jstmovie.py. Otherwise foreign languages are stuck.

Thanks, will fix this.. -m
 
F

Franck Ditter

- To use the software outside Python, we need to have proper indentation
as real spaces. We should be able to distinguish Arial type for usual
text and fixed font for code.


Not sure I understand about indentation.. You mean like wrapping
everything in a textarea tag? Right now everything is in div,
which leads to all spaces being compressed in html when viewed.[/QUOTE]

SOme spaces are translated in &nbsp;, others in actual spaces.
Say for Scheme, if I write this in foo.txt :
(define z (* 3+2i 1+i)) ; notation a+bi
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz

I get this in foo.html (spaces missing) :
(define z (* 3+2i 1+i))                 ; notation a+bi 
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz 

franck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top