Re: [spe-users] Three Newbie Issues

"SPE Stani's Python Editor" <[email protected]> Mon, 1 May 2006 00:25:51 +0200
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
--


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

--
http://pythonide.stani.be
http://pythonide.stani.be/screenshots
http://pythonide.stani.be/manual/html/manual.html