migrating print() to python 3
This commit is contained in:
parent
6fda3733e4
commit
53c98ec96d
|
@ -123,7 +123,7 @@ class ScannerAndroid(NFCBase):
|
||||||
|
|
||||||
details['recTypes'] = recTypes
|
details['recTypes'] = recTypes
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
print str(err)
|
print(str(err))
|
||||||
|
|
||||||
return details
|
return details
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ class ScannerAndroid(NFCBase):
|
||||||
#details = self.get_ndef_details(tag)
|
#details = self.get_ndef_details(tag)
|
||||||
|
|
||||||
if intent.getAction() not in action_list:
|
if intent.getAction() not in action_list:
|
||||||
print 'unknow action, avoid.'
|
print('unknow action, avoid.')
|
||||||
return
|
return
|
||||||
|
|
||||||
rawmsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES)
|
rawmsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES)
|
||||||
|
@ -150,7 +150,7 @@ class ScannerAndroid(NFCBase):
|
||||||
for message in rawmsgs:
|
for message in rawmsgs:
|
||||||
message = cast(NdefMessage, message)
|
message = cast(NdefMessage, message)
|
||||||
payload = message.getRecords()[0].getPayload()
|
payload = message.getRecords()[0].getPayload()
|
||||||
print 'payload: {}'.format(''.join(map(chr, payload)))
|
print('payload: {}'.format(''.join(map(chr, payload))))
|
||||||
|
|
||||||
def nfc_disable(self):
|
def nfc_disable(self):
|
||||||
'''Disable app from handling tags.
|
'''Disable app from handling tags.
|
||||||
|
|
|
@ -17,7 +17,7 @@ class QrScannerDialog(Factory.AnimatedPopup):
|
||||||
def on_complete(self, x):
|
def on_complete(self, x):
|
||||||
''' Default Handler for on_complete event.
|
''' Default Handler for on_complete event.
|
||||||
'''
|
'''
|
||||||
print x
|
print(x)
|
||||||
|
|
||||||
|
|
||||||
Builder.load_string('''
|
Builder.load_string('''
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
import util, json
|
import util, json
|
||||||
peers = util.get_peers()
|
peers = util.get_peers()
|
||||||
results = util.send_request(peers, 'blockchain.estimatefee', [2])
|
results = util.send_request(peers, 'blockchain.estimatefee', [2])
|
||||||
print json.dumps(results, indent=4)
|
print(json.dumps(results, indent=4))
|
||||||
|
|
Loading…
Reference in New Issue