from keyword import kwlist from collections import namedtuple from itertools import compress from functools import partial from inspect import getargspec from compat import unicode, uni, ifilter, imap, izip, iteritems, str_types, builtins, open import blob from extras import DotDict, job_params from jobid import resolve_jobid_filename from gzwrite import typed_writer kwlist = set(kwlist) # Add some python3 keywords kwlist.update({'False', 'None', 'True', 'nonlocal', 'async', 'await'}) iskeyword = frozenset(kwlist).__contains__ # A dataset is defined by a pickled DotDict containing at least the following (all strings are unicode): # version = (2, 2,), # filename = "filename" or None, # hashlabel = "column name" or None, # caption = "caption", # columns = {"column name": DatasetColumn,}, # previous = "previous_jid/datasetname" or None, # parent = "parent_jid/datasetname" or None, # lines = [line, count, per, slice,], # cache = ((id, data), ...), # key is missing if there is no cache in this dataset # cache_distance = datasets_since_last_cache, # key is missing if previous is None # # A DatasetColumn has these fields:
from inspect import getargspec from compat import unicode, uni, ifilter, imap, izip, iteritems, str_types, builtins, open import blob from extras import DotDict, job_params from jobid import resolve_jobid_filename from gzwrite import typed_writer kwlist = set(kwlist) # Add some keywords that are not in all versions kwlist.update({ 'exec', 'print', # only in py2 'False', 'None', 'True', 'nonlocal', 'async', 'await', # only in py3 }) iskeyword = frozenset(kwlist).__contains__ # A dataset is defined by a pickled DotDict containing at least the following (all strings are unicode): # version = (3, 0,), # filename = "filename" or None, # hashlabel = "column name" or None, # caption = "caption", # columns = {"column name": DatasetColumn,}, # previous = "previous_jid/datasetname" or None, # parent = "parent_jid/datasetname" or None,