variables - Python: Store Token in Memory -


i have class , in class have function performs authentication , returns token.

i store token in memory use other functions in same class.

how ?

presuming structure this:

class myclass(object):   def doauth(self):     callauthprocedure() 

if callauthprocedure returns token, adjust this:

class myclass(object):   def doauth(self):     self.token = callauthprocedure() 

later, other methods on instance of class can use self.token necessary.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -