Checks if provided (string) value consists of digits (Note: Python's isdigit() is problematic) >>> u'\xb2'.isdigit() True >>> isDigit(u'\xb2') False >>> isDigit('123456') True >>> isDigit('3b3') False
(value)
| 1343 | return header == ZIP_HEADER |
| 1344 | |
| 1345 | def isDigit(value): |
| 1346 | """ |
| 1347 | Checks if provided (string) value consists of digits (Note: Python's isdigit() is problematic) |
| 1348 | |
| 1349 | >>> u'\xb2'.isdigit() |
| 1350 | True |
| 1351 | >>> isDigit(u'\xb2') |
| 1352 | False |
| 1353 | >>> isDigit('123456') |
| 1354 | True |
| 1355 | >>> isDigit('3b3') |
| 1356 | False |
| 1357 | """ |
| 1358 | |
| 1359 | return re.search(r"\A[0-9]+\Z", value or "") is not None |
| 1360 | |
| 1361 | def checkFile(filename, raiseOnError=True): |
| 1362 | """ |
no test coverage detected
searching dependent graphs…