For debugging purposes, I have found that it could be beneficial if I could print the variables that are in local scope and only those in local scope.
Sample:
def showAuthUser(self):
"""Make a request to the campfire server.
Returns a getPage object which is deferred.
"""
u = self.uri + self._resource['showAuthUser']
m = 'GET'
n = self.username
p = self.password
b = base64.encodestring('{0}:{1}'.format(n, p))
h = {'Authorization': 'Basic ' + b.strip()}
return self._getPage(u, m, h)
Is there a way to find the values of all the variables that are in local scope after h?
you can use the
locals()function