本文整理汇总了Python中sgLib.core.Gcore.runtime方法的典型用法代码示例。如果您正苦于以下问题:Python Gcore.runtime方法的具体用法?Python Gcore.runtime怎么用?Python Gcore.runtime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sgLib.core.Gcore
的用法示例。
在下文中一共展示了Gcore.runtime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _test
# 需要导入模块: from sgLib.core import Gcore [as 别名]
# 或者: from sgLib.core.Gcore import runtime [as 别名]
def _test():
'''测试'''
uid = 43522
c = Building_altarUI(uid)
#Gcore.resetRuntime()
# print c.GetAltarRank({'Flag':1, 'AltarType':2,'Page':1})
# print c.GetLotteryCnt({'AltarType':1})
# c.Lottery({"BuildingId":13224, "AltarType":1})
# Gcore.runtime()
# for i in range(0,50):
# print c.Lottery({"BuildingId":10557, "AltarType":1})
#Gcore.runtime()
# for i in range(1,100):
print c.Lottery({"BuildingId":12938, "AltarType":2})
# print c.GetLotteryLog({'AltarType':1})
Gcore.runtime()
示例2: test
# 需要导入模块: from sgLib.core import Gcore [as 别名]
# 或者: from sgLib.core.Gcore import runtime [as 别名]
def test():
import time
uid = 1012
#uid = 43400
Gcore.resetRuntime()
c = ChatUI(uid)
#p = {'Channel':1,'Content':'fuckyou'}
import chardet
#s = u"*\uff65\u309c\uff9f\uff65*:.\uff61..\uff61.:*\uff65'(*\uff9f\u25bd\uff9f*)'\uff65*:.\uff61. .\uff61.:*\uff65\u309c\uff9f\uff65*"
#print s.encode('utf8') #Content": "*・゜゚・*:.。..。.:*・'(*゚▽゚*)'・*:.。. .。.:*・゜゚・*
#p = {"Content": "asdasd", "ClientTime": 1371108139, "Channel": 4,"ToName":'孟蓝'}
p = {"Content": "hhh", "ClientTime": 1371780923, "Channel": 1}
for _ in range(2):
print '================='
print c.Say(p)
print '================='
time.sleep(1)
Gcore.runtime()
示例3: _test
# 需要导入模块: from sgLib.core import Gcore [as 别名]
# 或者: from sgLib.core.Gcore import runtime [as 别名]
def _test():
'''模块内测试'''
r = RedisMod(1032)
print r.OnCacheFriends()
db = Gcore.getNewDB()
for UserId in db.out_list('tb_user', 'UserId',"UserId=1001 or 1" ): # OR 1
print db.sql
c = RedisMod(UserId)
#print c.offCacheAll() #下线
#print c.onCacheAll() #上线
#print c.offCacheWallDefense()
#c.offCacheGeneral()
#c = RedisMod(UserId,2)
#c.offCacheWallDefense()
#c.cacheUserInfo()
#c.offCacheGeneral()
Gcore.runtime()
import time
time.sleep(5)
示例4: _test
# 需要导入模块: from sgLib.core import Gcore [as 别名]
# 或者: from sgLib.core.Gcore import runtime [as 别名]
stat = modBag.addGoods(2, goods_id, goods_num, False)
if stat <= 0:
return Gcore.error(optId, -15133003) # 背包空间不足
stat = modBag.useItems(ItemId, ItemNum)
if stat != 1:
return Gcore.error(optId, -15133004) # 武将卡数量不足(并发导致)
body = {}
body["GainItemId"] = goods_id
body["GainItemNum"] = goods_num
return Gcore.out(optId, body)
# end class BuildingUI
def _test():
"""测试"""
uid = 43557
c = Building_pubUI(uid)
print c.ExchangeGeneralCard({})
# print c.ConvertGeneralCard({"ItemId":1101, "ItemNum":1})
if __name__ == "__main__":
_test()
Gcore.runtime()