summaryrefslogtreecommitdiff
path: root/plac/doc/importer3.py
diff options
context:
space:
mode:
Diffstat (limited to 'plac/doc/importer3.py')
-rw-r--r--plac/doc/importer3.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/plac/doc/importer3.py b/plac/doc/importer3.py
deleted file mode 100644
index 2a47e99..0000000
--- a/plac/doc/importer3.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import time
-import plac
-
-class FakeImporter(object):
- "A fake importer with an import_file command"
- mpcommands = ['import_file']
- def __init__(self, dsn):
- self.dsn = dsn
- def import_file(self, fname):
- "Import a file into the database"
- try:
- for n in range(10000):
- time.sleep(.02)
- if n % 100 == 99:
- yield 'Imported %d lines' % (n+1)
- finally:
- print('closing the file')
-
-if __name__ == '__main__':
- plac.Interpreter.call(FakeImporter)