all you need is the memcache module!
for ubuntu users do the following
Code:
sudo apt-get install python-memcache
else u can download it seach the web!!
next lets say we got script1.py and script2.py
script1.py:
Code:
from memcache import *
#here i want to get a value from script2
hAndle = Client(['127.0.0.1:11211'], debug=0)
print hAndle.get('Value')
script2.py
Code:
from memcache import *
#here i want to get a value from script2
hAndle = Client(['127.0.0.1:11211'], debug=0)
hAndle.set('Value','test string')
you can use the same module to share variables over threads or multyprocess!!