'''

>>> import pickle

>>> fn = "C:/SDS2_7.0/macro/Defaults/tem1.txt"

>>> f = open(fn, 'w')

>>> [pickle.Pickler(f).dump(item) for item in [s1, r1, i1]]

[None, None, None]

>>> f.close()

>>> f = open(fn)

>>> u = pickle.Unpickler(f)

>>> s2 = u.load()

>>> r2 = u.load()

>>> i2 = u.load()

>>> print s2, r2, i2

This is a string 1.5 1

>>>

'''

 

'''

>>> dd = {'s3': 'This is a string', 'r3': 1.5, 'i3': 1}

>>> f = open(fn, 'w')

>>> pickle.Pickler(f).dump(dd)

>>> f.close()

>>> f = open(fn)

>>> dd1 = pickle.Unpickler(f).load()

>>> f.close()

>>> dd1

{'s3': 'This is a string', 'i3': 1, 'r3': 1.5}

>>> globals().update(dd)

>>> print s3, r3, i3

This is a string 1.5 1

>>> type(i3)

<type 'int'>

>>>

'''