How to read user defined list from O.save('sample.yade.gz')
Hi,
I define a list in script1.py, and save as sample.yade.gz.
And then I use script2.py to read the sample.yade.gz. In script2.py, I can not read the list defined in script1.py.
Is there any idea to make it?
Here is a MWE:
#######
O.bodies.append([
sphere(
sphere((0,0,2),.5)
])
sandIds=[] ###this is an example list which I can not read from script2.py
for i in O.bodies:
sandIds.
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegrat
]
O.dt=.5e-
O.save(
################
#######
O.load(
print len(sandIds) ##yade version 2018.02b
##################
In script2, I can see all the particles, but I cannot get the sandIds list.
Is there any idea about how to pass these user defined lists (and other user defined variables) to another script?
Thanks,
Leonard
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: