Hi, I wonder how to use global variable
Let me show my code
def emps_greylist():
import urllib2
from lepl.apps.rfc3696 import HttpUrl
from urlparse import urlparse
diff_list=[]
temp_list=[]
top_level_url = "https://xxx/greylist.txt"
greylist = urllib2.urlopen(top_level_url)
if not temp_list:
temp_list=greylist
else :
diff_list = [item for item in greylist if not item in temp_list]
greylist=diff_list
I would like to have temp_list as global variable
I tried to look up some solutions.
Session and cache are solutions.
Can somebody tell me how to use them.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.