Mercurial > hg > orthanc
comparison Resources/Samples/Python/ArchiveStudiesInTimeRange.py @ 2032:65b1ce7cb84f
Replaced "localhost" by "127.0.0.1", as it might impact performance on Windows
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 Jun 2016 09:26:56 +0200 |
parents | b1291df2f780 |
children | 7e6afa0beaf6 |
comparison
equal
deleted
inserted
replaced
2031:a6e8e2251304 | 2032:65b1ce7cb84f |
---|---|
27 | 27 |
28 def PrintHelp(): | 28 def PrintHelp(): |
29 print('Download ZIP archives for all the studies generated ' | 29 print('Download ZIP archives for all the studies generated ' |
30 'during a given time range (according to the StudyDate tag)\n') | 30 'during a given time range (according to the StudyDate tag)\n') |
31 print('Usage: %s <URL> <StartDate> <EndDate> <TargetFolder>\n' % sys.argv[0]) | 31 print('Usage: %s <URL> <StartDate> <EndDate> <TargetFolder>\n' % sys.argv[0]) |
32 print('Example: %s http://localhost:8042/ 20150101 20151231 /tmp/\n' % sys.argv[0]) | 32 print('Example: %s http://127.0.0.1:8042/ 20150101 20151231 /tmp/\n' % sys.argv[0]) |
33 exit(-1) | 33 exit(-1) |
34 | 34 |
35 def CheckIsDate(date): | 35 def CheckIsDate(date): |
36 if len(date) != 8 or not date.isdigit(): | 36 if len(date) != 8 or not date.isdigit(): |
37 print '"%s" is not a valid date!\n' % date | 37 print '"%s" is not a valid date!\n' % date |