- Timestamp:
- Jan 22, 2019 7:17:52 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- fcd5d57
- Parents:
- 1d6899f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
r8db20a9 r4333edf 12 12 import urllib.parse 13 13 import json 14 import types 14 15 from io import BytesIO 15 16 … … 1222 1223 return add_type(content, type(o)) 1223 1224 1225 if isinstance(o, types.FunctionType): 1226 # we have a pure function 1227 content = o.__dict__.copy() 1228 return add_type(content, type(o)) 1229 1224 1230 # not supported 1225 1231 logging.info("data cannot be serialized to json: %s" % type(o)) … … 1234 1240 ''' 1235 1241 supported = [ 1236 tuple, set, 1242 tuple, set, types.FunctionType, 1237 1243 Sample, Source, Vector, 1238 1244 Plottable, Data1D, Data2D, PlottableTheory1D, PlottableFit1D, Text, Chisq, View, … … 1289 1295 buffer.seek(0) 1290 1296 return np.load(buffer) 1297 1298 # function 1299 if cls == types.FunctionType: 1300 return cls 1291 1301 1292 1302 logging.info('not implemented: %s, %s' % (type, cls))
Note: See TracChangeset
for help on using the changeset viewer.