Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
60406edd
Commit
60406edd
authored
Feb 12, 2013
by
Yutong Zhao
Browse files
Fixed state pickling in the python API.
parent
1486a99d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
...pers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
+4
-2
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
View file @
60406edd
...
...
@@ -77,8 +77,10 @@ class State(_object):
return
serializationString
def
__setstate__
(
self
,
serializationString
)
:
state
=
XmlSerializer
.
deserializeState
(
serializationString
)
self
.
this
=
state
.
this
print
'
calling
set
state
'
dState
=
XmlSerializer
.
deserializeState
(
serializationString
)
#
Safe
provided
no
__slots__
or
other
weird
things
are
used
self
.
__dict__
.
update
(
dState
.
__dict__
)
def
getTime
(
self
)
:
"""Get the time for which this State was created."""
...
...
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