← Back to team overview

yade-users team mailing list archive

Re: [Question #688060]: Extracting micro variables from Triaxial test

 

Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060

    Status: Open => Answered

Jan Stránský proposed the following answer:
> but it's just a line

yes, it is a data saved in JSON format. Completely satisfying the
requirement "save them in a text file"

> this line is so crowded and messy with overlap letters

You can use
json.dump(data,f,indent=3)
for pretty print (the same JSON string, but with newlines).

> nothing can be read from this file

Anything can be read from this file, e.g. by
###
import json
with open("interactions.json") as f:
   data = json.load(f) # now data is the same as what was saved
###

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.