Mercurial > hg > orthanc
comparison Resources/Samples/Python/ChangesLoop.py @ 1184:4e9d517503ae
port to Python3
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 10 Oct 2014 09:13:48 +0200 |
parents | 44382c8bcd15 |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
1183:6ef2c81581cd | 1184:4e9d517503ae |
---|---|
52 patientName = RestToolbox.DoGet(URL + path + '/content/PatientName') | 52 patientName = RestToolbox.DoGet(URL + path + '/content/PatientName') |
53 | 53 |
54 # Remove the possible trailing characters due to DICOM padding | 54 # Remove the possible trailing characters due to DICOM padding |
55 patientName = patientName.strip() | 55 patientName = patientName.strip() |
56 | 56 |
57 print 'New instance received for patient "%s": "%s"' % (patientName, path) | 57 print('New instance received for patient "%s": "%s"' % (patientName, path)) |
58 | 58 |
59 | 59 |
60 | 60 |
61 ## | 61 ## |
62 ## Main loop that listens to the changes API. | 62 ## Main loop that listens to the changes API. |
80 RestToolbox.DoDelete(URL + path) | 80 RestToolbox.DoDelete(URL + path) |
81 | 81 |
82 current = r['Last'] | 82 current = r['Last'] |
83 | 83 |
84 if r['Done']: | 84 if r['Done']: |
85 print "Everything has been processed: Waiting..." | 85 print('Everything has been processed: Waiting...') |
86 time.sleep(1) | 86 time.sleep(1) |