code ตัวอย่าง
[cc lang=”python”]
from pickle import dumps, loads
x = dict(a=1, b=2)
res = dumps(x)
open(‘/var/tmp/var_dump.txt’, ‘w’).write(res)
[/cc]
[cc lang=”python”]
from pickle import dumps, loads
load = loads(open(‘/var/tmp/var_dump.txt’).read())
print load[/cc]