newbie questions

James Stroud jstroud at mbi.ucla.edu
Sun Nov 6 01:50:44 EST 2005


On Saturday 05 November 2005 22:02, john boy wrote:
> have a few questions...i'm a newbie....so i'd appreciate any help
>
> 1- what is the difference between Python GUI and Python command line?

GUI means "graphical user interface", a command line is something you type 
commands into.

>
> 2-in Python command line when I hit enter after typing a command I cannot
> go back and "delete" "backspace" or otherwise edit a previous
> command...why?

Look into "idle". It comes with python and might work more like you think it 
should.

> 3-I have tried the following example from "how to think like a computer
> scientist"
>
> def makeline():
>     print
>
> print "firstline"
> makeline()
> print "secondline"
>
> problem is....whenever I type -print "firstline"- and then hit enter...well
> it follows the command and gives "firstline" EX.
> print "firstline"
> firstline
>
> instead of giving me a chance to type in -makeline()-
> and thus completing the example

This how the python command line interpreter should work. It outputs the 
results and return values of commands as it goes. Try this:

def printlines():
  print "firstline"
  makeline()
  print "secondline"

printlines()

Again, idle may work more like you want. Play with it for a few hours.

> Anybody help here?? thanks -xray-
>
>
>
>
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/



More information about the Python-list mailing list