Re: [spe-users] Three Newbie Issues
"Todd O'Bryan" <[email protected]> Mon, 1 May 2006 05:50:14 -0400
| Newsgroups | gmane.comp.python.spe.user |
|---|---|
| Message-ID | <[email protected]> |
http://pythonide.stani.be http://pythonide.stani.be/manual/html/manual.html http://pythonide.stani.be/blog/sm_donate -- Thanks! I'm a little unsure about your last point, though. First, I'm assuming you advise NOT to let students do this. Does running the file in the shell work differently than running it with the Run command? In other words, does an infinite loop only run infinitely in the shell? Todd On Apr 30, 2006, at 6:25 PM, SPE Stani's Python Editor wrote: > On 4/28/06, Todd O'Bryan <[email protected]> wrote: > >> I've started using SPE to teach intro Python to high school classes. >> I've come across three issues that I've been wondering about: >> >> 1. up-arrow doesn't work to re-enter the last line in the Python >> interpreter. Is there a way to do that or do you just have to cut and >> paste? > Ctrl+Up does the job. >> >> 2. The font in the run window is not monospaced, so if I have >> students write a script, when they run it it looks like a mess. Is >> there a way to change the font? (They can't run in the terminal >> because, for security reasons, the command prompt is blocked.) > It should be possible. Using a monospaced font indeed is better. > Change in _spe/tabs/Output.py: > > self.SetFonts > (normal_face='helvetica',fixed_face='courier',sizes= > [8,9,10,12,16,20,22]) > > into > > self.SetFonts(normal_face='courier',fixed_face='courier',sizes= > [8,9,10,12,16,20,22]) > > That should do it. > >> 3. Is there an easy way to import the current file and all its >> components into the interpreter. What I'd like is for students to be >> able to write a function (call it spam()) in a file called eggs.py, >> hit a key or choose a menu, like F10 currently, and just type spam() >> in the interpreter. Currently they either have to type eggs.spam() or >> import the function correctly. I guess I'd like something to >> automatically run "from eggs import *" so the kids don't have to do >> it themselves each time they change the file. > Doing Ctrl+Shift+E runs the file. But I strongly advice letting > students use this, as if they define an infinite loop, SPE will block. > > Stani