From e16948dbeb702fd46ccca1f20c0a869ca05fb814 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Wed, 1 Nov 2017 16:57:45 -0700 Subject: [PATCH] Add datetime support to configfile --- pyqtgraph/configfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/configfile.py b/pyqtgraph/configfile.py index 7b20db1d..e7056599 100644 --- a/pyqtgraph/configfile.py +++ b/pyqtgraph/configfile.py @@ -9,7 +9,7 @@ file format. Data structures may be nested and contain any data type as long as it can be converted to/from a string using repr and eval. """ -import re, os, sys +import re, os, sys, datetime import numpy from .pgcollections import OrderedDict from . import units @@ -143,6 +143,7 @@ def parseString(lines, start=0): local['Point'] = Point local['QtCore'] = QtCore local['ColorMap'] = ColorMap + local['datetime'] = datetime # Needed for reconstructing numpy arrays local['array'] = numpy.array for dtype in ['int8', 'uint8',