2007年03月16日 星期五 11:00
python <i"') except: vim.command('exit') EOF ÉÏÃæµÄ´úÂëûÓдí°É£¿ -- ×¢ÒâÉíÌ壬ÉíÌåÊǸïÃüµÄ±¾Ç®£¡£¡ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070316/445ed05f/attachment.html
2007年03月16日 星期五 11:22
我用的那个邮箱需要先验证‘ehlo’,重写成下面这样就搞定可以发了`` from email.base64MIME import encode as encode_base64 def send(smtpserver, fromaddr, toaddr, user, pwd, msg): server = smtplib.SMTP(smtpserver) server.set_debuglevel(1) server.ehlo('') server.docmd("AUTH","%s %s" % ("LOGIN", encode_base64(user, eol=""))) server.docmd(encode_base64(pwd, eol="")) server.sendmail(fromaddr, toaddr, msg) server.quit() send(‘SMTP.from.com’.'from在from.com','to在to.com','user','password',msg) ======= 2007-03-15 12:00:50 您在来信中写道:======= >Message: 3 >Date: Thu, 15 Mar 2007 11:42:30 +0800 >From: "Gavin" <gavin在sz.net.cn> >Subject: Re: [python-chinese] > [python发邮件]关于python发邮件的灵异事件 >To: <python-chinese在lists.python.cn> >Message-ID: <04a701c766b3$f5a88670$fd1ea8c0在frank> >Content-Type: text/plain; charset="utf-8" > > >想搞邮件邮件群发软件? > >----- Original Message ----- >发件人: "py" <py.7在163.com> >收件人: <python-chinese在lists.python.cn> >发送时间: 2007年3月15日 9:53 >主题: [python-chinese] [python发邮件]关于python发邮件的灵异事件 > > >各位! > > 关于用python发邮件代码如下: >import smtplib >from email.MIMEBase import MIMEBase >from email.MIMEText import MIMEText >from email.MIMEMultipart import MIMEMultipart >import email >import time >import datetime >femail='from在from.com' >temail ='to在to.com' >ccmail= 'cc在cc.com' >msg=MIMEMultipart() > >msg['From'] = femail >msg['To'] = temail >msg['Cc'] = ccmail >a="ttt" >msg['Subject'] = a >msg['Reply-To'] = femail >msg['Date'] = time.ctime(time.time()) > >msg['X-Priority'] = '''3''' >msg['X-MSMail-Priority'] = '''Normal''' >msg['X-Mailer'] = '''Foxmail 5.0 [cn]''' > >body=email.MIMEText.MIMEText('''test''',_subtype='text/plain',_charset='gb2312') >msg.attach(body) >s = smtplib.SMTP('from.com') >s.login('user','password') >s.sendmail(femail,temail,msg.as_string()) >s.close() > >用163等邮箱发是正常的,但使用一些企业邮箱发的时候会报错如下: > >Traceback (most recent call last): > File "E:\1\test.py", line 31, in ? > s.login('user','password') > File "D:\Python24\lib\smtplib.py", line 587, in login > raise SMTPAuthenticationError(code, resp) >SMTPAuthenticationError: (535, 'CoremailSys:Error: authentication failed') > > >SMTP地址、帐号、密码正确的和在foxmail里设置的都是相同的,用foxmail就能发出去信,用上面的代码就发不出去,请问这是为什么呢,请各位指教如何解决? > > >另外用 >postdata=urllib.urlencode({'user':'user','pass':'password'}) >login_response= urllib2.urlopen('', postdata) > > > 致 >礼! > > > 李李 > py.7在163.com > 2007-03-15 > >_______________________________________________ 致 礼! py py.7在163.com 2007-03-16
2007年03月16日 星期五 11:35
谢谢给予的过程。 > -----Original Message----- > From: python-chinese-bounces在lists.python.cn [mailto:python-chinese-bounces在lists.python.cn] On > Behalf Of py > Sent: Friday, March 16, 2007 11:23 AM > To: python-chinese在lists.python.cn > Subject: Re: [python-chinese][python发邮件]关于python发邮件的灵异事件 > > 我用的那个邮箱需要先验证‘ehlo’,重写成下面这样就搞定可以发了`` > > from email.base64MIME import encode as encode_base64 > > def send(smtpserver, fromaddr, toaddr, user, pwd, msg): > server = smtplib.SMTP(smtpserver) > server.set_debuglevel(1) > server.ehlo('') > server.docmd("AUTH","%s %s" % ("LOGIN", encode_base64(user, eol=""))) > server.docmd(encode_base64(pwd, eol="")) > server.sendmail(fromaddr, toaddr, msg) > server.quit() > > send (‘SMTP.from.com’.'from在from.com','to在to.com','user','password',msg) >
2007年03月16日 星期五 15:24
¸Õ·¢ÁËÒ»¸öÐÂÓʼþ£¬ºÃÏóû·´Ó¦£¬¶øÇÒÓм¸¸öСʱû¸Äµ½ÐÂÓʼþÁË£¬¿´¿´Õâ¸ö»Ø¸´ÄÜÊÕµ½Ã´ SpitFire 2007-03-16 ·¢¼þÈË£º ÁõÐÇ ·¢ËÍʱ¼ä£º 2007-03-16 11:53:25 ÊÕ¼þÈË£º python-chinese在lists.python.cn ³ËÍ£º Ö÷Ì⣺ Re: [python-chinese][python·¢Óʼþ]¹ØÓÚpython·¢ÓʼþµÄÁéÒìʼþ лл¸øÓèµÄ¹ý³Ì¡£ > -----Original Message----- > From: python-chinese-bounces在lists.python.cn [mailto:python-chinese-bounces在lists.python.cn] On > Behalf Of py > Sent: Friday, March 16, 2007 11:23 AM > To: python-chinese在lists.python.cn > Subject: Re: [python-chinese][python·¢Óʼþ]¹ØÓÚpython·¢ÓʼþµÄÁéÒìʼþ > > ÎÒÓõÄÄǸöÓÊÏäÐèÒªÏÈÑéÖ¤¡®ehlo¡¯£¬ÖØд³ÉÏÂÃæÕâÑù¾Í¸ã¶¨¿ÉÒÔ·¢ÁË`` > > from email.base64MIME import encode as encode_base64 > > def send(smtpserver, fromaddr, toaddr, user, pwd, msg): > server = smtplib.SMTP(smtpserver) > server.set_debuglevel(1) > server.ehlo('') > server.docmd("AUTH","%s %s" % ("LOGIN", encode_base64(user, eol=""))) > server.docmd(encode_base64(pwd, eol="")) > server.sendmail(fromaddr, toaddr, msg) > server.quit() > > send £¨¡®SMTP.from.com¡¯.'from在from.com','to在to.com','user','password',msg£© > _______________________________________________ python-chinese Post: send python-chinese在lists.python.cn Subscribe: send subscribe to python-chinese-request在lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070316/79f9a775/attachment.html
2007年03月16日 星期五 17:02
有人用scipy, numpy做数据分析的呼? 诸如需要做个采些数据作个高斯分布并制成图表等等的。需要些sample研究下,有推荐一下的?
2007年03月16日 星期五 19:08
www.python.org 跟链接到scipy的站点 上面有很多例子和文档 在07-3-16,Weimin Li <wli at sst.com> 写道: > > 有人用scipy, numpy做数据分析的呼? 诸如需要做个采些数据作个高斯分布并制成图表等等的。需要些sample研究下,有推荐一下的? > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- devdoer devdoer at gmail.com http://devdoer.blog.sohu.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070316/710e1f44/attachment.html
2007年03月16日 星期五 22:59
能够捕获异常的,但是好像 vim 会先把异常显示出来,然后再把异常提提交给Python处 理。例如: python <http://groups.google.com/group/Vim-cn
2007年03月16日 星期五 23:06
²»½»Òì³£ÄÇÓÐʲôÓã¡°¥¡£ On 3/16/07, tocer <tocer.deng在gmail.com> wrote: > > Äܹ»²¶»ñÒì³£µÄ£¬µ«ÊǺÃÏñ vim »áÏÈ°ÑÒì³£ÏÔʾ³öÀ´£¬È»ºóÔÙ°ÑÒì³£ÌáÌá½»¸øPython´¦ > Àí¡£ÀýÈ磺 > > python <> import vim > try: > vim.command('throw "raise exception"') > except: > print 'a error occure' > EOF > > Èç¹û²»ÏëÈà vim ÏÔʾ³öÒì³££¬¿ÉÒÔʹÓà silent! ÃüÁµ«ÊÇÕâʱҲûÓÐÒì³£Ìá½» > ¸ø Python ÁË > > -- > Vim ÖÐÎÄ Google ÂÛ̳ http://groups.google.com/group/Vim-cn > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- ×¢ÒâÉíÌ壬ÉíÌåÊǸïÃüµÄ±¾Ç®£¡£¡ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070316/f688ee0e/attachment.htm
2007年03月16日 星期五 23:12
·¢ÏÖÓÃpythonдvim½Å±¾Ê±£¬vimÄ£¿éÀïÌ«ÉÙº¯ÊýÁË£¡ ³£³£Òª£ºvim.command('let outArg = getline(".")') ºÃÏñÔÚÓÃvim±¾ÉíµÄ½Å±¾Ð´Ò»Ñù£¡£¡µ½µÍÓÃpythonдvim½Å±¾·½±ãÔÚÄÄ£¿ÎÒÏÖÔÚÖ»ÓÃpythonдvim½Å±¾µÄËã·¨ ¸øÈ˼ÒÆÁË£¬ÒÑΪÓÃpythonдºÜ·½±ã£¡ On 3/16/07, jessinio smith <jessinio在gmail.com> wrote: > > ²»½»Òì³£ÄÇÓÐʲôÓã¡°¥¡£ > > On 3/16/07, tocer <tocer.deng在gmail.com> wrote: > > > > Äܹ»²¶»ñÒì³£µÄ£¬µ«ÊǺÃÏñ vim »áÏÈ°ÑÒì³£ÏÔʾ³öÀ´£¬È»ºóÔÙ°ÑÒì³£ÌáÌá½»¸øPython´¦ > > Àí¡£ÀýÈ磺 > > > > python <> > import vim > > try: > > vim.command('throw "raise exception"') > > except: > > print 'a error occure' > > EOF > > > > Èç¹û²»ÏëÈà vim ÏÔʾ³öÒì³££¬¿ÉÒÔʹÓà silent! ÃüÁµ«ÊÇÕâʱҲûÓÐÒì³£Ìá½» > > ¸ø Python ÁË > > > > -- > > Vim ÖÐÎÄ Google ÂÛ̳ http://groups.google.com/group/Vim-cn > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > -- > ×¢ÒâÉíÌ壬ÉíÌåÊǸïÃüµÄ±¾Ç®£¡£¡ -- ×¢ÒâÉíÌ壬ÉíÌåÊǸïÃüµÄ±¾Ç®£¡£¡ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070316/b334e8cf/attachment.html
2007年03月17日 星期六 08:38
呵呵,目前就是这个样子的 jessinio smith wrote:: > 发现用python写vim脚本时,vim模块里太少函数了! > > 常常要:vim.command('let outArg = getline(".")') > > 好像在用vim本身的脚本写一样!!到低用python写vim脚本方便在哪?我现在只用 > python写vim脚本的算法 > > > 给人家骗了,已为用python写很方便! > -- Vim 中文 Google 论坛 http://groups.google.com/group/Vim-cn
Zeuux © 2025
京ICP备05028076号