-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to use Python 3 print function
This includes all the examples and the commented prints in the source.
- Loading branch information
1 parent
adabe92
commit 4286db3
Showing
13 changed files
with
105 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
from __future__ import print_function | ||
|
||
from credentials import * | ||
|
||
# TODO put ID of a particular label | ||
label = None | ||
|
||
if label is None: | ||
print 'label is not set, modify cancel_labels_retrieve.py' | ||
print('label is not set, modify cancel_labels_retrieve.py') | ||
|
||
try: | ||
api = Postmen(key, region) | ||
# get all the cancelled labels | ||
result_all = api.get('cancel-labels') | ||
# get a particular cancelled label | ||
result_particular = api.get('cancel-labels', label) | ||
print "RESULT" | ||
print("RESULT") | ||
pp.pprint(result_all) | ||
pp.pprint(result_particular) | ||
except PostmenException as e: | ||
print "ERROR" | ||
print e.code() | ||
print e.message() | ||
print e.details() | ||
print("ERROR") | ||
print(e.code()) | ||
print(e.message()) | ||
print(e.details()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
from __future__ import print_function | ||
|
||
from credentials import * | ||
|
||
# TODO put ID of a particular label | ||
label = None | ||
|
||
if label is None: | ||
print 'label is not set, modify labels_retrieve.py' | ||
print('label is not set, modify labels_retrieve.py') | ||
|
||
try: | ||
api = Postmen(key, region) | ||
# get all the cancelled labels | ||
result_all = api.get('labels') | ||
# get a particular cancelled label | ||
result_particular = api.get('labels', label) | ||
print "RESULT" | ||
print("RESULT") | ||
pp.pprint(result_all) | ||
pp.pprint(result_particular) | ||
except PostmenException as e: | ||
print "ERROR" | ||
print e.code() | ||
print e.message() | ||
print e.details() | ||
print("ERROR") | ||
print(e.code()) | ||
print(e.message()) | ||
print(e.details()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
from __future__ import print_function | ||
|
||
from credentials import * | ||
|
||
# TODO put ID of a particular manifest | ||
manifest = None | ||
|
||
if manifest is None: | ||
print 'manifest is not set, modify manifests_retrieve.py' | ||
print('manifest is not set, modify manifests_retrieve.py') | ||
|
||
try: | ||
api = Postmen(key, region) | ||
# get all manifests | ||
result_all = api.get('manifests') | ||
# get a particular manifest | ||
result_particular = api.get('manifests', manifest) | ||
print "RESULT" | ||
print("RESULT") | ||
pp.pprint(result_all) | ||
pp.pprint(result_particular) | ||
except PostmenException as e: | ||
print "ERROR" | ||
print e.code() | ||
print e.message() | ||
print e.details() | ||
print("ERROR") | ||
print(e.code()) | ||
print(e.message()) | ||
print(e.details()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
from __future__ import print_function | ||
|
||
from credentials import * | ||
|
||
# TODO put ID of a particular rate | ||
rate = None | ||
|
||
if rate is None: | ||
print 'rate is not set, modify rates_retrieve.py' | ||
print('rate is not set, modify rates_retrieve.py') | ||
|
||
try: | ||
api = Postmen(key, region) | ||
# get all rates | ||
result_all = api.get('rates') | ||
# get a particular rate | ||
result_particular = api.get('rates', rate) | ||
print "RESULT" | ||
print("RESULT") | ||
pp.pprint(result_all) | ||
pp.pprint(result_particular) | ||
except PostmenException as e: | ||
print "ERROR" | ||
print e.code() | ||
print e.message() | ||
print e.details() | ||
print("ERROR") | ||
print(e.code()) | ||
print(e.message()) | ||
print(e.details()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.