Commit 5dabc184 authored by Yori Fournier's avatar Yori Fournier
Browse files

Server-side commit now should work

parent c5029a34
......@@ -38,6 +38,7 @@ from .config import D_HIERARCHY
import os as os
import numpy as np
np.set_printoptions(threshold='nan')
# matplotlib import for client/local -----------------------------------
if D_HIERARCHY in ('CLIENT', 'client', 'LOCAL', 'local'):
......
......@@ -85,7 +85,7 @@ class Server():
G_RAWDATA[dataName] = fct(*args, **kwargs)
print(G_RAWDATA[dataName].data)
# print(G_RAWDATA[dataName].data)
answer = ('readData', dataName, 'no error')
except:
......@@ -113,7 +113,7 @@ class Server():
datas = ()
for raw in eval(rawdata):
datas = datas + (G_RAWDATA[raw],)
print(datas)
# print(datas)
figClass = self.knownFigures[figClassName]
# print(figClass+'('+str(datas)+', '+kwargs+')')
# G_FIGURES[FigID] = eval(figClass+'('+str(datas)+', '+kwargs+')')
......@@ -153,6 +153,19 @@ class Server():
for ax in fig.get_axes():
datas.append(ax.data)
# if data contains a numpy array
# THIS IS NOT UNIVERSAL !!! NEED TO BE RECODED... fucking numpy arrays
# May be added into MyData (MyData.toStringforServant())
# This supposes that MyData.data is a dictionary
for data in datas:
for key in data.keys():
try:
data[key] = data[key].tolist()
except:
pass
print(datas)
answer = ('syncFigFormatRawData', datas, '')
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment