From: Kirby Urner <urnerk@qwest.net> Subject: [Edu-sig] PyCrust
One thing that's cool about IDLE is if I have a multi-line function or class defined at the shell prompt, I can scroll back and click on any of these lines to get a full copy of the whole function or class -- which I may now edit/revise. Having only a single line copy down doesn't allow easy re-editing. If I use copy/paste, I can get multiple lines, but the interpreter seems to only recogize the last one.
I want to second this. When using python in the classroom, I've always used IDLE mostly because of this feature. I realized the importance of the "multi-line recall by cursor movement" when I installed a Python-shell on an old win3.1-laptop lately (no TK, no IDLE): editing is really no fun in shell mode, so I couldn't work with it as before which is about like this: Together with a beamer, we often start by using one IDLE-shell as an experimental interface, where one pupil can code an algorithm and test it directly, while the class can follow the interaction on the projected screen. Any occuring errors can be corrected by others, functions can be modified step by step in hardly any time. This is a very efficient way in working with a whole class. We seldom edit a file. In the case that we do, the process is slowed down by the distraction of having to save the file etc. In IDLE we stay focussed on building the function-algorithm. And we can play around a lot even in a classroom situation, because we don't have to type that much when we do a change. Afterwards pupils had little difficulty in using idle when doing problems on their own with a partner. I must confess I haven't tried out pycrust yet though it sounds promising. Christian
At 10:26 PM 10/14/2001 +0200, Christian Mascher wrote:
Together with a beamer, we often start by using one IDLE-shell as an experimental interface, where one pupil can code an algorithm and test it directly, while the class can follow the interaction on the projected screen. Any occuring errors can be corrected by others, functions can be modified step by step in hardly any time. This is a very efficient way in working with a whole class. We seldom edit a file. In the case that we do, the process is slowed down by the distraction of having to save the file etc. In IDLE we stay focussed on building the function-algorithm. And we can play around a lot even in a classroom situation, because we don't have to type that much when we do a change.
This is all music to my ears. Very cool that you're teaching in this way, with a beamer and everything. Sounds like 7th heaven to me. For more complicated functions and/or objects, I imagine saving the work by cutting/pasting the working/debugged code to an open window, saving as a module. That does take time, as indentation can be an issue (but there's block dedent/indent). Then, next day, or a week later, you can pull up the saved code and further enchance, modify etc. This is how I'd gradually evolve a Fraction or Matrix object say. One day, we'd work on Fraction * Fraction, by overriding __mul__. On another day, we'd implement addition. And so on. Also, once a module is saved, if students work on their own computers, they can pull it off the server and start from where the projected demo left off. Kirby
Okay, you guys can stop twisting my arm now. I'm 80% of the way to having all the multi-line functionality that you are asking for. I'll let you know when I'm at 100%, but if you want a sneak peak, the current CVS version of PyCrust now has the following features: * Commands can be retrieved with Ctrl-Up or Alt-P for the previous command, Ctrl-Down or Alt-N for the next. * Command history retrieval now brings back the entire multi-line command, which you can then modify, including adding and deleting lines. * Commands retrieved from history are inserted into the existing text and highlighted, rather than replacing the current command. This makes it much easier to build new commands that use parts of old commands. * Commands can be searched for by typing a few letters and hitting F8, which then cycles through matching commands. Commands retrieved this way are also inserted and highlighted. The one feature that I don't yet have finished is being able to put the cursor on a previous command, hit enter, and get back all the lines in the command, rather than just the single line. That is next on my list. I'll keep you posted. The PyCrust CVS repository is available at: http://sourceforge.net/cvs/?group_id=31263 --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of Christian Mascher Sent: Sunday, October 14, 2001 3:27 PM To: edu-sig@python.org Subject: [Edu-sig] Re: PyCrust, IDLE
From: Kirby Urner <urnerk@qwest.net> Subject: [Edu-sig] PyCrust
One thing that's cool about IDLE is if I have a multi-line function or class defined at the shell prompt, I can scroll back and click on any of these lines to get a full copy of the whole function or class -- which I may now edit/revise. Having only a single line copy down doesn't allow easy re-editing. If I use copy/paste, I can get multiple lines, but the interpreter seems to only recogize the last one.
I want to second this. When using python in the classroom, I've always used IDLE mostly because of this feature. I realized the importance of the "multi-line recall by cursor movement" when I installed a Python-shell on an old win3.1-laptop lately (no TK, no IDLE): editing is really no fun in shell mode, so I couldn't work with it as before which is about like this: Together with a beamer, we often start by using one IDLE-shell as an experimental interface, where one pupil can code an algorithm and test it directly, while the class can follow the interaction on the projected screen. Any occuring errors can be corrected by others, functions can be modified step by step in hardly any time. This is a very efficient way in working with a whole class. We seldom edit a file. In the case that we do, the process is slowed down by the distraction of having to save the file etc. In IDLE we stay focussed on building the function-algorithm. And we can play around a lot even in a classroom situation, because we don't have to type that much when we do a change. Afterwards pupils had little difficulty in using idle when doing problems on their own with a partner. I must confess I haven't tried out pycrust yet though it sounds promising. Christian _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Now I'm 99.9% done with advanced multi-line support. In addition to the features listed below, putting the cursor on any part of a previous multi-line command copies down the entire multi-line command, just like IDLE. Even better, PyCrust displays the secondary prompt on all continuation lines. I'm sure there might be some minor glitches to be worked out. So if anyone wants to give it a spin and provide feedback, it would be much appreciated. I'm beat. This was one tough nut to crack. --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of Patrick K. O'Brien Sent: Wednesday, October 17, 2001 3:10 PM To: mascher@crg.ha.nw.schule.de; edu-sig@python.org Subject: RE: [Edu-sig] Re: PyCrust, IDLE Okay, you guys can stop twisting my arm now. I'm 80% of the way to having all the multi-line functionality that you are asking for. I'll let you know when I'm at 100%, but if you want a sneak peak, the current CVS version of PyCrust now has the following features: * Commands can be retrieved with Ctrl-Up or Alt-P for the previous command, Ctrl-Down or Alt-N for the next. * Command history retrieval now brings back the entire multi-line command, which you can then modify, including adding and deleting lines. * Commands retrieved from history are inserted into the existing text and highlighted, rather than replacing the current command. This makes it much easier to build new commands that use parts of old commands. * Commands can be searched for by typing a few letters and hitting F8, which then cycles through matching commands. Commands retrieved this way are also inserted and highlighted. The one feature that I don't yet have finished is being able to put the cursor on a previous command, hit enter, and get back all the lines in the command, rather than just the single line. That is next on my list. I'll keep you posted. The PyCrust CVS repository is available at: http://sourceforge.net/cvs/?group_id=31263 --- Patrick K. O'Brien Orbtech "I am, therefore I think."
At 05:43 PM 10/17/2001 -0500, Patrick K. O'Brien wrote:
Now I'm 99.9% done with advanced multi-line support. In addition to the features listed below, putting the cursor on any part of a previous multi-line command copies down the entire multi-line command, just like IDLE. Even better, PyCrust displays the secondary prompt on all continuation lines. I'm sure there might be some minor glitches to be worked out. So if anyone wants to give it a spin and provide feedback, it would be much appreciated. I'm beat. This was one tough nut to crack.
--- Patrick K. O'Brien Orbtech "I am, therefore I think."
Your efforts are appreciated and I'll be giving it a whirl soon -- looming project deadline at the moment, but I'm looking forward to getting back to matters Pythonic in the near future... Kirby
participants (3)
-
Christian Mascher -
Kirby Urner -
Patrick K. O'Brien