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 |
===================================================================== |