getting global variables from dictionary

icarus rsarpi at
Sat Sep 27 04:01:44 CEST 2008 has the global variables changes one of the values on the global variables (don't
close it or terminate) retrieves the recently value changed (triggered right after above)

Problem: retrieves the old value, the built-in one but not
the recently changed value in

What am I doing wrong?

class Variables :
	def __init__(self) :
		self.var_dict = {"username": "original username"} ---

import time
import global_vars

global_vars.Variables().var_dict["username"] = "new username"
time.sleep(10)   #give enough time to trigger ---
import global_vars
print global_vars.Variables().var_dict.get("username")

More information about the Python-list mailing list