Python Tips & Tricks

博客提供了Python学习的有用资源,如《Python Cookbook》等书籍、教程、会议论文等,还介绍了Python调试命令。此外,给出获取本地主机IP地址的代码,以及使用'cmd'模块构建交互式应用的示例,可查阅Python标准库获取更多细节。

Useful resources:

  1. python cook book
  2. dive into python
  3. python liabrary manual
  4. python turtorial
  5. python<编程金典读书笔记>
  6. python conferrence paper
  7. IBM-可爱的python系列
  8. python Editors
  9. download python books
  10. 啄木鸟社区
  11. Debugging in python   Debugger commands
Tips & Tricks:

  1. get the ip address of localhost:
    socket.gethostbyname(socket.gethostname())
  2. using module 'cmd' to build intercative application:
    import cmd
    class Interactive(cmd.Cmd):
        def __init__(self):
            cmd.Cmd.__init__(self)
            self.prompt = '%'
        def help_test(self):
            print 'you have typed /'test/' command'
        def do_test(self,arg):
            print 'Now is procceeding your /'test/' command.'
            print 'your arguments are:',arg
        def do_EOF(self,arg):
            return True
    if __name__ == '__main__':
        term = Interactive()
        term.cmdloop()you can lookup python standard library for details
  3. others to be addedothers to be added
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值