随笔分类 -  python

python programming
摘要:将png,jpg,gif等图片格式转换成bmp格式代码如下:import Image##im = Image.open('BtnWrite.Image.gif')##im.save('BtnWrite.Image.bmp')##import osextension = ['.bmp']listfil... 阅读全文
posted @ 2015-03-30 10:29 &苍云 阅读(877) 评论(0) 推荐(0)
摘要:def strCmp(s1,s2): aLi = list(s1) bLi = list(s2) alen = len(s1) blen = len(s2) if alen > blen: lenth = blen else: lent... 阅读全文
posted @ 2015-03-25 09:51 &苍云 阅读(528) 评论(0) 推荐(0)
摘要:>>> s = ['ta','ad','at','At','eg']>>> sorted(s)['At', 'ad', 'at', 'eg', 'ta']>>> #python中的字符串排序,按字典序 阅读全文
posted @ 2015-03-20 16:26 &苍云 阅读(2988) 评论(0) 推荐(0)
摘要:23-1. Web Services. Take the Yahoo! stock quote example (stock.py) and change the application to save the quote data to a file instead of displaying it to the screen.Optional: You may change the script so that users can choose to display the quote data or save it to a file. 1 #!/usr/bin/env python 2 阅读全文
posted @ 2013-05-05 20:07 &苍云 阅读(282) 评论(0) 推荐(0)