Gentoo Archives: gentoo-user

From: Philip Webb <purslow@××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] new machine : suddenly Python 3 appears
Date: Mon, 17 Sep 2012 18:51:24
Message-Id: 20120917184541.GC2892@ca.inter.net
In Reply to: Re: [gentoo-user] new machine : suddenly Python 3 appears by David W Noon
1 120917 David W Noon wrote:
2 > On Mon, 17 Sep 2012 13:14:27 -0400, Philip Webb wrote re Python 2/3 :
3 >> print ' ',eval(expression)
4 > The above line uses obsolete syntax. Try using
5 > #!/usr/bin/python2 -3
6 > for your hash-bang line on all your old Python scripts.
7
8 Well, thanks for the info -- which is what I suspected -- ,
9 but just what is the correct Python3 syntax for that simple print line ?
10 This is my only Python script, which I got from somewhere long forgotten,
11 & I generally don't have a need to do Python programming.
12
13 While this subject is open, can anyone tell me
14 how to get Python3 started from CLI automatically to load the math item ?
15 -- ie to do 'from math import *' without my having to type it ?
16 That would make it possible to use 'python' instead of my script,
17 which would then allow me to use variables, sometimes an advantage.
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 : suddenly Python 3 appears Marc Joliet <marcec@×××.de>
Re: [gentoo-user] new machine : suddenly Python 3 appears David W Noon <dwnoon@××××××××.com>