Gentoo Archives: gentoo-user

From: Keith Dart <keith@×××××××××.biz>
To: gentoo-user@l.g.o
Cc: billk@×××××××××.au
Subject: Re: [gentoo-user] ceph and a possible python problem
Date: Fri, 16 Aug 2013 07:34:38
Message-Id: 20130816003424.5d04b904@dartworks.biz
In Reply to: [gentoo-user] ceph and a possible python problem by William Kenworthy
1 Re , William Kenworthy said:
2 > olympus ~ # ceph
3 > File "/usr/bin/ceph", line 192
4 > print '\n', s, '\n', '=' * len(s)
5 > ^
6 > SyntaxError: invalid syntax
7 > olympus ~ #
8
9
10 In Python 3 "print" is a function, and should be called like this:
11
12 print('\n', s, '\n', '=' * len(s))
13
14 This works as-is in Python 2, unless you have this at the top of the
15 file:
16
17 from __future__ import print_function
18
19
20 -- Keith
21
22
23 --
24
25 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 Keith Dart <keith@×××××××××.biz>
27 public key: ID: 19017044
28 <http://www.dartworks.biz/>
29 =====================================================================

Replies

Subject Author
Re: [gentoo-user] ceph and a possible python problem William Kenworthy <billk@×××××××××.au>