本文整理汇总了Python中Configuration.Configuration.password方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.password方法的具体用法?Python Configuration.password怎么用?Python Configuration.password使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.password方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import password [as 别名]
#.........这里部分代码省略.........
def increment_requests(self):
self.waiting_requests+=1
if self.waiting_requests==1:
try:
self.mainwindow.set_icon_from_file(self.networking_icon_path)
except:
pass
try:
self.mainwindow.set_throbber(self.throbber_icon_path)
except:
pass
if self.has_status_icon:
self.statusicon.set_icon( self.networking_icon_path)
def decrement_requests(self):
self.waiting_requests-=1
if self.waiting_requests==0:
try:
self.mainwindow.set_icon_from_file(self.default_icon_path)
except:
pass
try:
self.mainwindow.set_throbber(self.default_icon_path)
except:
pass
if self.has_status_icon:
self.statusicon.set_icon( self.default_icon_path )
if self.waiting_requests<0:
self.waiting_requests=0
def valid_account_info(self, n, p, s):
self.conf.name( n )
self.conf.password( p )
self.conf.service( s )
self.conf.save()
#update the comm
self.comm.set_name_and_password( n,p )
self.comm.set_service( s )
def get_statuses(self,count="20"):
if self.credentials_verified:
#do some time handling for the good doctor
now = time.time()
if now - self.last_get_statuses > 2*self.pull_time:
count = self.initial_dents
self.last_get_statuses = now
self.increment_requests()
self.comm.get_statuses(count=count, since=highest_id['dent_previous'])
#clean up the garbage
gc.collect()
def get_mentions(self,count="20"):
if self.credentials_verified:
self.increment_requests()
self.comm.get_mentions(count=count,since=highest_id['mention_previous'])
def get_favorites(self):
if self.credentials_verified:
self.increment_requests()
self.comm.get_favorites()
def get_direct_messages(self):
if self.credentials_verified:
now = time.time()
#NOTE this could be changed to 3 minutes just setting it