当前位置: 首页>>代码示例>>Python>>正文


Python User.User方法代码示例

本文整理汇总了Python中User.User方法的典型用法代码示例。如果您正苦于以下问题:Python User.User方法的具体用法?Python User.User怎么用?Python User.User使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在User的用法示例。


在下文中一共展示了User.User方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: closeEven

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def closeEven(self):
		adi = self.txt_kayitAdi.text()
		email = self.txt_kayitEmail.text()
		sifre = self.txt_kayitSifre.text()
		sifreTekrar = self.txt_kayitSifreTekrar.text()
		u = User(adi, sifre, email,"")
		if sifreTekrar == sifre:
			try:
				Mysql.üyeOl(u)
				self.dialogTextBrowser.show()
				self.close()
			except Exception:
				print(_uno_extract_printable_stacktrace())

		else:
			self.lbl_kayitSifreHata.setVisible(True) 
开发者ID:sistem-progamlama,项目名称:browser-history-phyton,代码行数:18,代码来源:kayitOl.py

示例2: show_user

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def show_user(user):
    mb = MessageBox()
    mb.set_title('User info for ' + user.name + ' (ID ' + str(user.id) + ')')
    mb.add_property('Email', user.email)
    mb.add_property('Last Login', user.last_login)
    mb.add_property('Created On', user.creation_date)
    mb.add_property('Handle', user.handle)
    mb.add_property('Computer ID', str(user.computer.id))
    mb.display()

# Shows information and contents about a specific computer disk 
开发者ID:nklose,项目名称:HTP,代码行数:13,代码来源:admin.py

示例3: main

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def main():
    gc.clear()

    gc.typewriter(colored('\n\tWelcome to Hack the Planet!', 'green', attrs = ['bold']))

    valid_choice = False
    while not valid_choice:
        gc.msg('\n  1. Log In')
        gc.msg('2. Register')
        gc.msg('3. Reset Password')
        gc.msg('4. About Hack the Planet')

        choice = cc.prompt_num()

        # log in
        if choice == '1':
            login()
        # register
        elif choice == '2':
            register()
        # reset password
        elif choice == '3':
            u = User()
            u.reset_password()
        # about
        elif choice == '4':
            about()
        # invalid
        else:
            gc.error('Invalid choice; please try again.')

## Navigation
# Shows a user's profile summary 
开发者ID:nklose,项目名称:HTP,代码行数:35,代码来源:game.py

示例4: login

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def login():
    # check user credentials
    user = User()
    user.login()
    profile(user, new_login = True)

# Register a new user account 
开发者ID:nklose,项目名称:HTP,代码行数:9,代码来源:game.py

示例5: register

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def register():
    user = User()
    user.register()
    profile(user, new_login = True) 
开发者ID:nklose,项目名称:HTP,代码行数:6,代码来源:game.py

示例6: click

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def click(self):
        ad = self.lineEdit.text()
        sifre = self.lineEdit_2.text()
        u=User.User(ad,sifre,"")
        print("user olu?turuldu")

        if Mysql.getir(u):
            if self.checkBox.isChecked():
                from anasayfa import AnaSayfa
                self.anasayfa=AnaSayfa()
                self.anasayfa.show()
            basla=TarayiciTaramaBaslat(self)

        else:
            print ("basarisiz") 
开发者ID:sistem-progamlama,项目名称:browser-history-phyton,代码行数:17,代码来源:giris.py

示例7: operate

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def operate(self):
        if not self.parse():
            return True
        print self.get_title()
        while True:
            op = raw_input("zhuanlan$ ")
            if op == "content":
                self.get_content()
            elif op == "author":
                url = self.get_author_info()
                if not url:
                    print termcolor.colored("?????????", "red")
                else:
                    from User import User
                    user = User(url)
                    if user.operate():
                        return True
            elif op == "voteup":
                self.vote(type=1)
            elif op == "votecancle":
                self.vote(type=2)
            elif op == "pwd":
                print self.get_title()
            elif op == "browser":
                self.open_in_browser()
            elif op == "clear":
                clear()
            elif op == "break":
                break
            elif op == "help":
                self.help()
            elif op == "quit":
                return True
            else:
                error() 
开发者ID:duduainankai,项目名称:zhihu-terminal,代码行数:37,代码来源:Zhuanlan.py

示例8: operate

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def operate(self):
        self.show_item_info()
        while True:
            op = raw_input("Question Answer Item$ ")
            if op == "voteup":
                self.vote_up_answer()
            elif op == "votedown":
                self.vote_down_answer()
            elif op == "votecancle":
                self.vote_cancle_answer()
            elif op == "answer":
                from Answer import Answer
                answer = Answer(zhihu + self.get_answer_link())
                if answer.operate():
                    return True
            elif op == "author":
                author_link = self.get_author_link()
                if author_link:
                    user = User(zhihu + self.get_author_link())
                    if user.operate():
                        return True
                else:
                    print termcolor.colored("????????", "red")
            elif op == "pwd":
                self.show_item_info()
            elif op == "help":
                self.help()
            elif op == "break":
                break
            elif op == "clear":
                clear()
            elif op == "quit":
                return True
            else:
                error() 
开发者ID:duduainankai,项目名称:zhihu-terminal,代码行数:37,代码来源:Question.py

示例9: addUser

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def addUser(self, user):
        if not isinstance(user, User):
            raise TypeError('%s is not a User object' % (user,))
        user.setSerialNum(self.nextSerialNum())
        user.externalId()  # set unique id
        UserManager.addUser(self, user)
        user.save() 
开发者ID:Cito,项目名称:w4py,代码行数:9,代码来源:UserManagerToFile.py

示例10: userClass

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def userClass(self):
        """Return the userClass, which is used by createUser.

        The default value is UserKit.User.User.
        """
        if self._userClass is None:
            self.setUserClass(User)
        return self._userClass 
开发者ID:Cito,项目名称:w4py,代码行数:10,代码来源:UserManager.py

示例11: setUserClass

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def setUserClass(self, userClass):
        """Set the userClass, which cannot be None and must inherit from User.

        See also: userClass().
        """
        if not issubclass(userClass, User):
            raise TypeError('%s is not a User class' % (userClass,))
        self._userClass = userClass 
开发者ID:Cito,项目名称:w4py,代码行数:10,代码来源:UserManager.py

示例12: addUser

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def addUser(self, user):
        if not isinstance(user, User):
            raise TypeError('%s is not a User object' % (user,))
        self._cachedUsers.append(user)
        if user.serialNum() in self._cachedUsersBySerialNum:
            raise KeyError('a user with this number already exists')
        self._cachedUsersBySerialNum[user.serialNum()] = user 
开发者ID:Cito,项目名称:w4py,代码行数:9,代码来源:UserManager.py

示例13: login

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def login(self, user, password):
        """Return the user if the login is successful, otherwise return None."""
        if not isinstance(user, User):
            raise TypeError('%s is not a User object' % (user,))
        result = user.login(password, fromMgr=True)
        if result:
            self._numActive += 1
        return result 
开发者ID:Cito,项目名称:w4py,代码行数:10,代码来源:UserManager.py

示例14: __init__

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def __init__(self, userid=None):
        u"""??????userid?????????????session??header??????json?????????best_id?"""
        if userid is None:
            from User import User
            s = User()
            self.userid = s.signup()
        else:
            self.userid = userid
        self._changebestid()
        self.mobile = self._getusermobile() 
开发者ID:huilansame,项目名称:AutoTestFramework,代码行数:12,代码来源:MerchantAdd.py

示例15: loadUsers

# 需要导入模块: import User [as 别名]
# 或者: from User import User [as 别名]
def loadUsers():
    # creates database.id if it doesnt exists yet
    if not(os.path.isfile("database.id")):
        open("database.id", "w").close()

    with open("database.id", "r") as database:
        for user in database:
            u = json.loads(user)
            newUser = User(u['id'], u['name'], u['hour'], u['minute'])
            users[u['id']] = newUser
            thread = Thread(target = checkTime, args = (u['id'],))
            thread.start()


### Handle messages reiceved from users ### 
开发者ID:leandrohrb,项目名称:Anti-Baby-Bot,代码行数:17,代码来源:TelegramBot.py


注:本文中的User.User方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。