[Tutor] IDLE Usage - was Interpreter Restarts

Alan Gauld alan.gauld at btinternet.com
Sun Jul 22 11:39:51 CEST 2007


"Sara Johnson" <sarliz73 at yahoo.com> wrote

>  I use an SSH editor set up by my school.  If I type python at the 
> prompt in SSH,
> I get the Python shell.  My problem is, I can't open a GUI no matter 
> what
> I subscribe to or purchase.

OK, Personally I'd forget about a GUI, its not that big a win for 
Python IMHO.

What I'd do instead is open two SSH sessions, in one of them I'd open 
a
vim session (or emacs if you prefer) to edit my code.  In the second 
window
open a python interactive session for testing stuff.  You can also use 
Unix
job control to background this session if you need to test the 
scripts, or
you can open a third SSH session with a Unix shell prompt. In practice
that's how I do nearly all my serious Python programming on Windows
- using 3 separate windows: vim, Pyhon and shell.

Try ideas out in the Python session, copy those ideas into the editor 
and
save the file and then run the code in the shell window. Repeat as 
needed.

> I have Python 2.3 and yes, I can access the commandline, but that 
> does
> not work the way it's been described to work.

What is missing? It should work like any standard >>> prompt.
However it will be the vanilla version without some of the nice extras
that IDE shells often provide and depending on how your Python was
built it may not offer GNU readline capability to recall previous 
commands etc.

Finally, If you really want to run an X GUI I'd recommend getting 
cygwin.
Its big but it includes a near complete Unix/ X environment for your 
PC
(including the fonts) as well as an SSH client and provi8ded your SSH
server allows X to run - and many don't for security reasons - then it 
should
work. You will have to issue the xhosts incantations of course to tell 
the
server to accept requests from your PC. Pesonally I think its more 
work
than is worth it unless you will be doing a lot of work on that server 
over
a long time..

My opinion for what its worth! :-)

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list