Skip to content

Commit bf2a033

Browse files
authored
update readme print statements to Python 3 (#119)
Co-authored-by: Ezra Citron <ezra.citron@datarobot.com>
1 parent 276f5b0 commit bf2a033

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ If the algorithm output is text, then the `result` field of the response will be
7272
```python
7373
algo = client.algo('demo/Hello/0.1.1')
7474
response = algo.pipe("HAL 9000")
75-
print response.result # Hello, world!
76-
print response.metadata # Metadata(content_type='text',duration=0.0002127)
77-
print response.metadata.duration # 0.0002127
75+
print(response.result) # Hello, world!
76+
print(response.metadata) # Metadata(content_type='text',duration=0.0002127)
77+
print(response.metadata.duration) # 0.0002127
7878
```
7979

8080
### JSON input/output
@@ -119,7 +119,7 @@ This includes support for changing the timeout or indicating that the API should
119119
```python
120120
from Algorithmia.algorithm import OutputType
121121
response = client.algo('util/echo').set_options(timeout=60, stdout=False)
122-
print response.metadata.stdout
122+
print(response.metadata.stdout)
123123
```
124124

125125
Note: `stdout=True` is only supported if you have access to the algorithm source.
@@ -186,15 +186,15 @@ foo = client.dir("data://.my/foo")
186186

187187
# List files in "foo"
188188
for file in foo.files():
189-
print file.path + " at URL: " + file.url + " last modified " + file.last_modified
189+
print(file.path + " at URL: " + file.url + " last modified " + file.last_modified)
190190

191191
# List directories in "foo"
192192
for file in foo.dirs():
193-
print dir.path + " at URL: " + file.url
193+
print(dir.path + " at URL: " + file.url)
194194

195195
# List everything in "foo"
196196
for entry in foo.list():
197-
print entry.path + " at URL: " + entry.url
197+
print(entry.path + " at URL: " + entry.url)
198198
```
199199

200200
### Manage directory permissions
@@ -230,7 +230,7 @@ $ algo auth
230230
Configuring authentication for profile: 'default'
231231
Enter API Endpoint [https://api.algorithmia.com]:
232232
Enter API Key:
233-
(optional) enter path to custom CA certificate:
233+
(optional) enter path to custom CA certificate:
234234
Profile is ready to use. Test with 'algo ls'
235235
```
236236

@@ -332,7 +332,7 @@ algo auth --profile second_user
332332
Configuring authentication for profile: 'second_user'
333333
Enter API Endpoint [https://api.algorithmia.com]:
334334
Enter API Key:
335-
(optional) enter path to custom CA certificate:
335+
(optional) enter path to custom CA certificate:
336336
```
337337

338338
Now you may use `algo ls --profile second_user` to list files in your `second_user` account. For more information, see the auth command help with `algo auth --help`.
@@ -342,7 +342,7 @@ Now you may use `algo ls --profile second_user` to list files in your `second_us
342342
When running commands, the Algorithmia CLI will use the default profile unless otherwise specified with the `--profile <profile>` option. See the following example:
343343

344344
```text
345-
$ algo run kenny/factor -d 17 --profile second_user
345+
$ algo run kenny/factor -d 17 --profile second_user
346346
[17]
347347
```
348348

0 commit comments

Comments
 (0)