Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yori Fournier
myplotlib
Commits
5dabc184
Commit
5dabc184
authored
Sep 02, 2017
by
Yori Fournier
Browse files
Server-side commit now should work
parent
c5029a34
Changes
2
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
5dabc184
...
...
@@ -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'
):
...
...
server.py
View file @
5dabc184
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment