An open API service indexing awesome lists of open source software.

https://github.com/victornpb/file-open-resume

A substitute for open() that lets you resume from where you left off. Very useful for consuming large files, or running a ETL script.
https://github.com/victornpb/file-open-resume

etl file-processing file-reader python python3 script

Last synced: 7 months ago
JSON representation

A substitute for open() that lets you resume from where you left off. Very useful for consuming large files, or running a ETL script.

Awesome Lists containing this project

README

          

# file-open-resume

A substitute for `open()` that let you resume from where you left off.

Very useful for consuming large files, or running a ETL script.

# Example

```py
import fileOpener
import time

filename = "test.txt"
with fileOpener.open_resume(filename) as f:
for line in f:

print("Processing line {}...\t{}".format(line['index'], line['text']))

# Do something complicated with it
time.sleep(0.5)
```

If your program crashes by a exception or you stop it by Killing or CTRL-C running it again will make sure it will resume from the failed line.