python IDE && 日志记录

python学习IDE先安装python在安装Pyscripter

python

http://www.python.org/download/releases/3.3.0/

Pyscripter

http://code.google.com/p/pyscripter/downloads/detail?name=PyScripter-v2.5.3-Setup.exe&can=2&q=

class AddrBookEntry(object):
    'address book entry class'
    def __init__(self, nm, ph):
        self.name = nm
        self.phone = ph
        print ('Creates instance for:', self.name)
    def updatePhone(self, newph):
        self.phone = newph
        print ('Updated phone# for:', self.name, self.phone)

mazhen = AddrBookEntry('mazhen', '18210225789')
mazhen.updatePhone('18210225789')
print (mazhen.phone)



你可能感兴趣的:(python IDE && 日志记录)