(filepath, seconds: int = 10, wait: bool = False)
| 76 | |
| 77 | |
| 78 | def older_than(filepath, seconds: int = 10, wait: bool = False): |
| 79 | if not os.path.exists(filepath): |
| 80 | while wait: |
| 81 | print("waiting for:", filepath) |
| 82 | sleep(1) |
| 83 | if os.path.exists(filepath): |
| 84 | sleep(seconds) |
| 85 | return True |
| 86 | return False |
| 87 | file_creation_time = os.path.getctime(filepath) |
| 88 | current_time = time() |
| 89 | return seconds < (current_time - file_creation_time) |
| 90 | |
| 91 | |
| 92 | def edit_distance(text1: str, text2: str): |
no outgoing calls
no test coverage detected