python + bash + new user

Aahz Maruch aahz at netcom.com
Mon Jul 19 20:15:41 EDT 1999


In article <3793BE52.43E023BB at netcard.com>,
Joyce Stack  <joyce at netcard.com> wrote:
>
>I am not new to programming but new to python...i want to know how do i
>call functions from the prompt....

>From which prompt, python or bash?  The python prompt should look
something like this:

% python
Python 1.5.2 (#6, Jun 29 1999, 15:08:27)  [GCC 2.7.2] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>

You can then type any valid python command or expression at the ">>>"
python prompt.  For example:

>>> int("3")
3
>>> x=int("3")
>>> x*x
9

Note that commands do not print output, but expressions do.  And, yes,
startling as it is for a C programmer, "=" is *not* an expression but a
statement/command.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list