Gentoo Archives: gentoo-user

From: Philip Webb <purslow@××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] new machine : Python calculator
Date: Thu, 20 Sep 2012 09:08:15
Message-Id: 20120920090511.GA947@ca.inter.net
In Reply to: Re: [gentoo-user] new machine : suddenly Python 3 appears by Marc Joliet
1 120919 Marc Joliet wrote:
2 > 120918 Philip Webb <purslow@××××××××.net> wrote:
3 >> With Python running as interpreter, I would get much more capability,
4 >> but I would need to enter the special line to load the math functions :
5 >> is it possible to do it with some capitalised variable in .bashrc ,
6 >> which might list parameters telling Python3 what to load when it starts ?
7 >> one of the 'man' files seems to refer to something like that, but briefly.
8 > 3.) Put the "import" line in its own file and put it in the variable
9 > PYTHONSTARTUP, e.g. "export PYTHONSTARTUP=/path/to/my/script.py".
10 > Python executes it's contents before presenting the prompt,
11 > so you can put whatever imports you want in that script.
12
13 Thanks, that's what I saw in my brief glance at the 'man'.
14 It works out of the box: the only problem is precision,
15 which at 16 decimal places is a bit more than I usually need (smile).
16 I can search out how to limit it to something more useful to me,
17 but might you have a quick answer ? Thanks for the above.
18
19 --
20 ========================,,============================================
21 SUPPORT ___________//___, Philip Webb
22 ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
23 TRANSIT `-O----------O---' purslowatchassdotutorontodotca

Replies

Subject Author
Re: [gentoo-user] new machine : Python calculator Marc Joliet <marcec@×××.de>