120920 Willie WY Wong wrote:
> Unless you want to load the math module every time you start Python,
> it is perhaps better to create an alias in Bash
> using the `-i' option of Python:
>   alias python-calc='python -i loadmath.py' 
> or if you only need one single command
>   alias python-calc='python -i -c "from math import *"' 
> which will give you an interactive session with math functions preloaded.

Yes thanks: the 2nd is the simplest way to do what I want.

> 120919 Marc Joliet described how to set a level of precision:

Thanks too, but that's not what I wanted: it's not for printing,
but simply to limit the display to eg  4  decimal places, not  16 ;
the calculations still wb as accurate, but the output easier to read.
Is that possible with Python ? -- ie a setting in  ascript.py 
to tell Python to display only the 1st  4  places in all output
without any further input from the user when doing the calculations;
presumably it wb a command s/he could enter when in interactive mode too.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca


Reply via email to