2007年11月28日 星期三 11:33
赞~ On Nov 28, 2007 2:21 AM, swordsp <sparas2006 at gmail.com> wrote: > 程序员和科幻迷在中国交集一直很大——或许还可以加上动漫fans,一个很有趣的社会现象:) > 也许是因为这三者或多或少都有着理想主义倾向吧。
2007年11月28日 星期三 12:31
¸ßÈË¡£¶àл¡£ hongqing.lv 2007-11-28 ·¢¼þÈË£º pan ·¢ËÍʱ¼ä£º 2007-11-28 00:51:50 ÊÕ¼þÈË£º python-chinese在lists.python.cn ³ËÍ£º Ö÷Ì⣺ Re: [python-chinese]ipython ÔõôճÌùÖÐÎÄĿ¼ ipythonÄ¿Ç°»¹ÎÞ·¨½øÈëÖÐÎÄĿ¼, ÎÒ¸Õ²ÅÏòËûÃÇÓʼþÁÐ±í·´Ó³ÁËÕâ¸öÎÊÌâ, ¿ÉÄÜϸö°æ±¾¾Í¿ÉÒÔÁË, »òÕßÄã×Ô¼ºÐÞ¸ÄһϴúÂëÒ²¿ÉÒÔ: ¸Ä±äÈçÏ´úÂë: ÔÚrunsource iplib.py: "code = self.compile(source,filename,symbol)" to "code = self.compile(source.encode(sys.stdout.encoding),filename,symbol)" -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071128/7e4cf684/attachment.htm
2007年11月28日 星期三 13:34
在 IPython/__init__.py 还需要改 import sys reload(sys) sys.setdefaultencoding(sys.stdin.encoding) 我的补丁是 diff -ruNp ipython-0.8.1.orig/IPython/__init__.py ipython-0.8.1/IPython/__init__.py --- ipython-0.8.1.orig/IPython/__init__.py 2007-05-05 04:01:13.000000000 +0800 +++ ipython-0.8.1/IPython/__init__.py 2007-11-28 13:29:46.000000000 +0800 @@ -38,6 +38,8 @@ $Id: __init__.py 1854 2006-10-30 19:54:2 # Enforce proper version requirements import sys +reload(sys) +sys.setdefaultencoding(sys.stdin.encoding) if sys.version[0:3] < '2.3': raise ImportError('Python Version 2.3 or above is required for IPython.') diff -ruNp ipython-0.8.1.orig/IPython/iplib.py ipython-0.8.1/IPython/iplib.py --- ipython-0.8.1.orig/IPython/iplib.py 2007-05-05 04:01:13.000000000 +0800 +++ ipython-0.8.1/IPython/iplib.py 2007-11-28 13:30:42.000000000 +0800 @@ -1884,7 +1884,7 @@ want to merge them back into the new fil source = 'if 1:\n%s' % source try: - code = self.compile(source,filename,symbol) + code = self.compile(source.encode(sys.stdout.encoding),filename,symbol) except (OverflowError, SyntaxError, ValueError): # Case 1 self.showsyntaxerror(filename) On Nov 27, 2007 8:19 PM, pan <nirvana117 at gmail.com> wrote: > ipython目前还无法进入中文目录, 我刚才向他们邮件列表反映了这个问题, 可能下个版本就可以了, 或者你自己修改一下代码也可以: > > 改变如下代码: 在runsource iplib.py: > > "code = self.compile(source,filename,symbol)" to > "code = self.compile(source.encode(sys.stdout.encoding),filename,symbol)" > > -------------- next part -------------- A non-text attachment was scrubbed... Name: ipython-zh.diff Type: text/x-patch Size: 1129 bytes Desc: not available Url : http://python.cn/pipermail/python-chinese/attachments/20071128/9a689289/attachment.bin
2007年11月28日 星期三 13:38
如果不修改 sys.setdefaultencoding 的话, 我这里会出错,见 http://paste.ubuntu.org.cn/4186 $ ipython Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) Type "copyright", "credits" or "license" for more information. IPython 0.8.1 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: cd 离歌 ---------------------------------------------------------------------------Traceback (most recent call last) /var/lib/python-support/python2.5/IPython/iplib.py in multiline_prefilter(self, line, continue_prompt) 2282 out = [] 2283 for l in line.rstrip('\n').split('\n'): -> 2284 out.append(self._prefilter(l, continue_prompt)) 2285 return '\n'.join(out) 2286 /var/lib/python-support/python2.5/IPython/iplib.py in _prefilter(self, line, continue_prompt) 2197 (self.rc.multi_line_specials or not continue_prompt): 2198 return self.handle_magic(line,continue_prompt, -> 2199 pre,iFun,theRest) 2200 else: 2201 return self.handle_normal(line,continue_prompt) /var/lib/python-support/python2.5/IPython/iplib.py in handle_magic(self, line, continue_prompt, pre, iFun, theRest) 2345 2346 -> 2347 cmd = '%s_ip.magic(%s)' % (pre,make_quoted_expr(iFun + " " + theRest)) 2348 self.log(line,cmd,continue_prompt) 2349 #print 'in handle_magic, cmd=<%s>' % cmd # dbg /var/lib/python-support/python2.5/IPython/genutils.py in make_quoted_expr(s) 985 # give up, backslash-escaped string will do 986 return '"%s"' % esc_quotes(s) --> 987 res = itpl("$raw$quote$s$tailpadding$quote$tail") 988 return res 989 /var/lib/python-support/python2.5/IPython/Itpl.py in itpl(text) 250 251 # utilities for fast printing --> 252 def itpl(text): return str(Itpl(text)) 253 def printpl(text): print itpl(text) 254 # versions with namespace /var/lib/python-support/python2.5/IPython/Itpl.py in __str__(self) 216 loc, glob = frame.f_locals, frame.f_globals 217 --> 218 return self._str(glob,loc) 219 220 class ItplNS(Itpl): /var/lib/python-support/python2.5/IPython/Itpl.py in _str(self, glob, loc) 199 app = result.append 200 for live, chunk in self.chunks: --> 201 if live: app(str(eval(chunk,glob,loc))) 202 else: app(chunk) 203 out = ''.join(result) : 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128) In [2]: On Nov 28, 2007 1:34 PM, Jiahua Huang <jhuangjiahua at gmail.com> wrote: > 在 IPython/__init__.py 还需要改 > import sys > reload(sys) > sys.setdefaultencoding(sys.stdin.encoding) > > > > > 我的补丁是 > > diff -ruNp ipython-0.8.1.orig/IPython/__init__.py > ipython-0.8.1/IPython/__init__.py > --- ipython-0.8.1.orig/IPython/__init__.py 2007-05-05 > 04:01:13.000000000 +0800 > +++ ipython-0.8.1/IPython/__init__.py 2007-11-28 13:29:46.000000000 +0800 > @@ -38,6 +38,8 @@ $Id: __init__.py 1854 2006-10-30 19:54:2 > > # Enforce proper version requirements > import sys > +reload(sys) > +sys.setdefaultencoding(sys.stdin.encoding) > > if sys.version[0:3] < '2.3': > raise ImportError('Python Version 2.3 or above is required for IPython.') > diff -ruNp ipython-0.8.1.orig/IPython/iplib.py ipython-0.8.1/IPython/iplib.py > --- ipython-0.8.1.orig/IPython/iplib.py 2007-05-05 04:01:13.000000000 +0800 > +++ ipython-0.8.1/IPython/iplib.py 2007-11-28 13:30:42.000000000 +0800 > @@ -1884,7 +1884,7 @@ want to merge them back into the new fil > source = 'if 1:\n%s' % source > > try: > - code = self.compile(source,filename,symbol) > + code = > self.compile(source.encode(sys.stdout.encoding),filename,symbol) > except (OverflowError, SyntaxError, ValueError): > # Case 1 > self.showsyntaxerror(filename) > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: ipython-zh.diff Type: text/x-patch Size: 1129 bytes Desc: not available Url : http://python.cn/pipermail/python-chinese/attachments/20071128/a95a3f42/attachment.bin
2007年11月28日 星期三 17:42
我喜欢 Whitespace,太好玩了 在 07-11-28,swordsp<sparas2006在gmail.com> 写道: > 我的理解是: > 广义上说,编程语言是人机界面的一种。程序员用编程语言描述计算模型,而编译器将计算模型翻译成机器指令序列。所以,编程语言的核心还是计算模型,表面上的语法也好、关键字也好,本质上只不过是一套包裹在外的符号系统,是描述计算模型时的工具,怎么方便就可以怎么来。 > > 从这层意义上来说,符号本身其实无所谓好与不好,只要习惯了、用顺手了就行。阿拉伯数字、希腊字母用来作为标准的数学符号系统真的最好吗?也未见得,只不过几千年下来大家习惯了。所以我们也只是习惯了英文关键字而已,将来的程序员完全可以去习惯汉语编程或者其它的什么――也许更久远的将来,会有一套全新的符号来描述程序,谁又知道呢? > > 所以,汉语编程虽然算不上革命性的变化,至少是有趣且有益的尝试,不是吗? > 真要说"用处"的话……大概总会比Whitespace[1]和Brainfuck[2]更有用吧:) > > 注: > Whitespace和Brainfuck是两种保留了计算模型的本质,同时把"符号系统"发挥到极致的语言: > [1] http://compsoc.dur.ac.uk/whitespace/ > [2] http://www.muppetlabs.com/~breadbox/bf/ > > > On Nov 27, 2007 8:50 PM, pan <nirvana117在gmail.com> wrote: > > > 目前我觉得汉语编程只是proof-of- concept. 目前虽然用处不大, 但是主要原因是局限于编译器. 如果编译器能像人一样理解代码, > 那时汉语编程才能体现出优势. > > > > _______________________________________________ > 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 >
2007年11月28日 星期三 18:28
ºº±àÒѱ»Ö¤ÊµÊÇÍêÈ«³ÁËForthµÄ´úÂ룬¾ÍºÃ±È÷è÷ëOS³ÁËBSD¡£ ÎÒÈÏΪ£¬"ººÓï±à³Ì"ÍêÈ«ÊÇÉÙÊýÈËȱ·¦Ãñ×å×ÔÐÅÐĵıíÏÖ¡£ Ëùν°®¹ú£¬²»ÊÇÂÒºëÑïÖйúÎÄ»¯£¬¹Ø¼üÔÚÓÚ¿´Ë×öµÄʵ¼Ê¹±Ïס£ ÔÚ07-11-28£¬Jiahua Huang <jhuangjiahua在gmail.com> дµÀ£º > > ÔÞ~ > > On Nov 28, 2007 2:21 AM, swordsp <sparas2006在gmail.com> wrote: > > ³ÌÐòÔ±ºÍ¿Æ»ÃÃÔÔÚÖйú½»¼¯Ò»Ö±ºÜ´ó¡ª¡ª»òÐí»¹¿ÉÒÔ¼ÓÉ϶¯Âþfans£¬Ò»¸öºÜÓÐȤµÄÉç»áÏÖÏó:) > > Ò²ÐíÊÇÒòΪÕâÈýÕß»ò¶à»òÉÙ¶¼ÓÐ×ÅÀíÏëÖ÷ÒåÇãÏò°É¡£ > _______________________________________________ > 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 -- Ray Stinger, nickname Lich_Ray God is in his heaven, all's right with the world. ------------------------------------------------- let focus = 'computing' in where: http://lichray.javaeye.com let focus = 'computing' in here: http://lichray.bokeland.com -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071128/388337e5/attachment.htm
2007年11月28日 星期三 19:28
广义的"用汉语编程"(包括易语言、中蟒、周蟒……)和狭义的"汉编"还是要分清楚的,不要误伤。 On Nov 28, 2007 6:28 PM, Lich_Ray <solo.lich at gmail.com> wrote: > 汉编已被证实是完全抄了Forth的代码,就好比麒麟OS抄了BSD。 > 我认为,"汉语编程"完全是少数人缺乏民族自信心的表现。 > 所谓爱国,不是乱弘扬中国文化,关键在于看谁做的实际贡献。 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20071128/edb9db0d/attachment.htm
2007年11月28日 星期三 19:58
支持中文的意义:其实简单支持了中文关键字/函数变量名之类, 技术上没什么大不了 但对对于小学之类的确很大差别
2007年11月28日 星期三 21:44
ÓÐЩ´ÊÓÔÚÓ¢ÓïÀï¿ÉÄܾÍÒ»¸öµ¥´Ê£¬¶ø¸Ä³ÉÖÐÎÄ£¬¿ÉÄܺÜÄÑÃèÊöÇå³þ£¬¾Í±ÈÈ磺itemÕâ¸ö¶«Î÷£¬ÔÚÄĶ¼¿ÉÄÜÓã¬ÄÜʹ¶ÁÕßһĿÁËÈ»£¬ÖÐÎĵĻ°£¬¾ÍÄѱíʾÁË¡£ ÔÚ07-11-28£¬Jiahua Huang <jhuangjiahua在gmail.com> дµÀ£º > > Ö§³ÖÖÐÎĵÄÒâÒ壺 > >Æäʵ¼òµ¥Ö§³ÖÁËÖÐÎĹؼü×Ö/º¯Êý±äÁ¿ÃûÖ®Àà, ¼¼ÊõÉÏûʲô´ó²»ÁË µ«¶Ô¶ÔÓÚСѧ֮ÀàµÄÈ·ºÜ´ó²î±ð > _______________________________________________ > 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 -- It's doesn't matter who wins, just try you best -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071128/c85fb901/attachment.html
2007年11月29日 星期四 09:11
µ«ÊÇÔÚwindowsϲ»»á, ¿ÉÄÜÊÇÒòΪÓõÄpyreadlineµÄ¹Øϵ. 2007/11/28, Jiahua Huang <jhuangjiahua在gmail.com>: > > Èç¹û²»ÐÞ¸Ä sys.setdefaultencoding µÄ»°£¬ > ÎÒÕâÀï»á³ö´í£¬¼û http://paste.ubuntu.org.cn/4186 > > > $ ipython > Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) > Type "copyright", "credits" or "license" for more information. > > IPython 0.8.1 -- An enhanced Interactive Python. > ? -> Introduction to IPython's features. > %magic -> Information about IPython's 'magic' % functions. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > In [1]: cd Àë¸è > > --------------------------------------------------------------------------- >Traceback (most recent call > last) > > /var/lib/python-support/python2.5/IPython/iplib.py in > multiline_prefilter(self, line, continue_prompt) > 2282 out = [] > 2283 for l in line.rstrip('\n').split('\n'): > -> 2284 out.append(self._prefilter(l, continue_prompt)) > 2285 return '\n'.join(out) > 2286 > > /var/lib/python-support/python2.5/IPython/iplib.py in _prefilter(self, > line, continue_prompt) > 2197 (self.rc.multi_line_specials or not > continue_prompt): > 2198 return self.handle_magic(line,continue_prompt, > -> 2199 pre,iFun,theRest) > 2200 else: > 2201 return self.handle_normal > (line,continue_prompt) > > /var/lib/python-support/python2.5/IPython/iplib.py in > handle_magic(self, line, continue_prompt, pre, iFun, theRest) > 2345 > 2346 > -> 2347 cmd = '%s_ip.magic(%s)' % (pre,make_quoted_expr(iFun + > " " + theRest)) > 2348 self.log(line,cmd,continue_prompt) > 2349 #print 'in handle_magic, cmd=<%s>' % cmd # dbg > > /var/lib/python-support/python2.5/IPython/genutils.py in > make_quoted_expr(s) > 985 # give up, backslash-escaped string will do > 986 return '"%s"' % esc_quotes(s) > --> 987 res = itpl("$raw$quote$s$tailpadding$quote$tail") > 988 return res > 989 > > /var/lib/python-support/python2.5/IPython/Itpl.py in itpl(text) > 250 > 251 # utilities for fast printing > --> 252 def itpl(text): return str(Itpl(text)) > 253 def printpl(text): print itpl(text) > 254 # versions with namespace > > /var/lib/python-support/python2.5/IPython/Itpl.py in __str__(self) > 216 loc, glob = frame.f_locals, frame.f_globals > 217 > --> 218 return self._str(glob,loc) > 219 > 220 class ItplNS(Itpl): > > /var/lib/python-support/python2.5/IPython/Itpl.py in _str(self, glob, loc) > 199 app = result.append > 200 for live, chunk in self.chunks: > --> 201 if live: app(str(eval(chunk,glob,loc))) > 202 else: app(chunk) > 203 out = ''.join(result) > >: 'ascii' codec can't encode > characters in position 3-4: ordinal not in range(128) > > In [2]: > > > On Nov 28, 2007 1:34 PM, Jiahua Huang <jhuangjiahua在gmail.com> wrote: > > ÔÚ IPython/__init__.py »¹ÐèÒª¸Ä > > import sys > > reload(sys) > > sys.setdefaultencoding(sys.stdin.encoding) > > > > > > > > > > ÎҵIJ¹¶¡ÊÇ > > > > diff -ruNp ipython-0.8.1.orig/IPython/__init__.py > > ipython-0.8.1/IPython/__init__.py > > --- ipython-0.8.1.orig/IPython/__init__.py 2007-05-05 > > 04:01:13.000000000 +0800 > > +++ ipython-0.8.1/IPython/__init__.py 2007-11-28 13:29:46.000000000+0800 > > @@ -38,6 +38,8 @@ $Id: __init__.py 1854 2006-10-30 19:54:2 > > > > # Enforce proper version requirements > > import sys > > +reload(sys) > > +sys.setdefaultencoding(sys.stdin.encoding) > > > > if sys.version[0:3] < '2.3': > > raise ImportError('Python Version 2.3 or above is required for > IPython.') > > diff -ruNp ipython-0.8.1.orig/IPython/iplib.py ipython-0.8.1 > /IPython/iplib.py > > --- ipython-0.8.1.orig/IPython/iplib.py 2007-05-05 04:01:13.000000000+0800 > > +++ ipython-0.8.1/IPython/iplib.py 2007-11-28 13:30:42.000000000+0800 > > @@ -1884,7 +1884,7 @@ want to merge them back into the new fil > > source = 'if 1:\n%s' % source > > > > try: > > - code = self.compile(source,filename,symbol) > > + code = > > self.compile(source.encode(sys.stdout.encoding),filename,symbol) > > except (OverflowError, SyntaxError, ValueError): > > # Case 1 > > self.showsyntaxerror(filename) > > > > > > > > _______________________________________________ > 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/20071129/c1ae79cf/attachment.html
2007年11月29日 星期四 11:03
不过记得以前 Vista 和 XP 下用 ipython 的时候,中文输入法好像用不了, 只能别处粘贴中文 On Nov 29, 2007 9:11 AM, pan <nirvana117 at gmail.com> wrote: > 但是在windows下不会, 可能是因为用的pyreadline的关系. > >
2007年11月29日 星期四 11:26
ÎÒÓÃdebian²âÊÔÁËÏÂ, µÄÈ·»á³ö´í. ·¢ÏÖÈç¹ûʹÓÃsetappdefaultencoding, ¾Í²»ÓÃreload(sys)ÁË, »¹ÓоÍÊÇconsoleµÄstdoutºÍstdinµÄencodingÓ¦¸ÃÒ»Ö±¶¼ÊÇÒ»ÑùµÄ, Ëæ±ãÓÃÄǸö¶¼¿ÉÒÔ, ÕâÀï¸Ä³Écode = self.compile(str(source),filename,symbol)¾ÍÐÐÁË. >²»¹ý¼ÇµÃÒÔÇ° Vista ºÍ XP ÏÂÓà ipython µÄʱºò£¬ÖÐÎÄÊäÈë·¨ºÃÏñÓò»ÁË£¬Ö»Äܱð´¦Õ³ÌùÖÐÎÄ ¿ÉÄÜÊÇÄãÓõÄÊäÈë·¨ÓÐÎÊÌâ, ÎÒÓõÄÊÇËѹ·µÄÄǸöÊäÈë·¨. -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071129/1ba35b3a/attachment-0001.html
2007年11月29日 星期四 11:32
»¹ÓоÍÊÇÈç¹ûÓÃcode = self.compile(str(source),filename,symbol). ÔÚipythonϾͲ»ÄÜÔÚÏñÕâÑùs = u"µÃµ½", Õâʱs²»ÊÇunicode, ±ØÐëÊÖ¶¯unicode²ÅÐÐ, ÏñÕâÑùs = unicode("µÃµ½"). -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071129/fc8903c7/attachment.html
2007年11月29日 星期四 11:37
On Nov 29, 2007 11:26 AM, pan <nirvana117 at gmail.com> wrote: > 我用debian测试了下, 的确会出错. > > 发现如果使用setappdefaultencoding, 就不用reload(sys)了, > 还有就是console的stdout和stdin的encoding应该一直都是一样的, 随便用那个都可以, 这里改成code = > self.compile(str(source),filename,symbol)就行了. > 恩,因为你 Debian 里边是旧版本的 Python 2.3, Python2.4 以后 sys 里边是没有 sys.setappdefaultencoding 的, 而 import sys 后需要 reload 才有 sys.setdefaultencoding 这个跟木头前辈讨论过。 如果要同时兼容 python2.3- 和 python2.4+ 那么得换成 import sys reload(sys) try: sys.setdefaultencoding(sys.stdin.encoding) except: sys.setappdefaultencoding(sys.stdin.encoding) > > > >不过记得以前 Vista 和 XP 下用 ipython 的时候,中文输入法好像用不了,只能别处粘贴中文 > > 可能是你用的输入法有问题, 我用的是搜狗的那个输入法. > 用默认安装 Windows 的自带输入法 另外,贴修改的时候,似乎用 diff -ruNp 输出的补丁格式会更加容易理解, --- ipython-0.8.1.orig/IPython/__init__.py 2007-05-05 04:01:13.000000000 +0800 +++ ipython-0.8.1/IPython/__init__.py 2007-11-29 11:36:07.000000000 +0800 @@ -38,6 +38,11 @@ $Id: __init__.py 1854 2006-10-30 19:54:2 # Enforce proper version requirements import sys +reload(sys) +try: + sys.setdefaultencoding(sys.stdin.encoding) +except: + sys.setappdefaultencoding(sys.stdin.encoding) if sys.version[0:3] < '2.3': raise ImportError('Python Version 2.3 or above is required for IPython.')
2007年11月29日 星期四 11:40
Windows 下 mingw32 应该就带了 diff、 patch 等工具 On Nov 29, 2007 11:37 AM, Jiahua Huang <jhuangjiahua at gmail.com> wrote: > 另外,贴修改的时候,似乎用 diff -ruNp 输出的补丁格式会更加容易理解, >
2007年11月29日 星期四 11:41
这 ipython 下好像一直都不可以吧 On Nov 29, 2007 11:32 AM, pan <nirvana117 at gmail.com> wrote: > 还有就是如果用code = self.compile(str(source),filename,symbol). 在ipython下就不能在像这样s = > u"得到", 这时s不是unicode, 必须手动unicode才行, 像这样s = unicode("得到"). >
2007年11月29日 星期四 12:11
·¹ýһϣ®ipythonÊÇʲô£¿ ÔÚ07-11-29£¬Jiahua Huang <jhuangjiahua在gmail.com> дµÀ£º > > Õâ ipython ϺÃÏñÒ»Ö±¶¼²»¿ÉÒÔ°É > > On Nov 29, 2007 11:32 AM, pan <nirvana117在gmail.com> wrote: > > »¹ÓоÍÊÇÈç¹ûÓÃcode = self.compile(str(source),filename,symbol). > ÔÚipythonϾͲ»ÄÜÔÚÏñÕâÑùs = > > u"µÃµ½", Õâʱs²»ÊÇunicode, ±ØÐëÊÖ¶¯unicode²ÅÐÐ, ÏñÕâÑùs = unicode("µÃµ½"). > > > _______________________________________________ > 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/20071129/8ee15698/attachment.htm
2007年11月29日 星期四 12:14
¿ÉÄÜÊÇIronPython(Python for .NET)°É ÔÚ07-11-29£¬Àé°Ê <nameliba在gmail.com> дµÀ£º > > ·¹ýһϣ®ipythonÊÇʲô£¿ > > ÔÚ07-11-29£¬Jiahua Huang <jhuangjiahua在gmail.com> дµÀ£º > > > > Õâ ipython ϺÃÏñÒ»Ö±¶¼²»¿ÉÒÔ°É > > > > On Nov 29, 2007 11:32 AM, pan <nirvana117在gmail.com > wrote: > > > »¹ÓоÍÊÇÈç¹ûÓÃcode = self.compile(str(source),filename,symbol). > > ÔÚipythonϾͲ»ÄÜÔÚÏñÕâÑùs = > > > u"µÃµ½", Õâʱs²»ÊÇunicode, ±ØÐëÊÖ¶¯unicode²ÅÐÐ, ÏñÕâÑùs = unicode("µÃµ½"). > > > > > _______________________________________________ > > 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 > > > > _______________________________________________ > 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/20071129/e71b5f01/attachment.html
2007年11月29日 星期四 12:18
Ò»Á½ÐÐÎÒÏë¾Í²»ÓÃdiffÁË°Ñ, »¹ÓÐsvnÒ²´øÁËdiffµÄ, ÓÃsvn diff > d.patchÒ²¿ÉÒÔ ÔÚ07-11-29£¬Jiahua Huang <jhuangjiahua在gmail.com> дµÀ£º > > Windows Ï mingw32 Ó¦¸Ã¾Í´øÁË diff¡¢ patch µÈ¹¤¾ß > > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071129/d7490ae1/attachment.htm
2007年11月29日 星期四 12:19
增强的 Python 交互界面 huahua at huahua:sf$ apt-cache show ipython Package: ipython Priority: optional Section: universe/python Installed-Size: 2544 Maintainer: Ubuntu MOTU Developers <ubuntu-motu at lists.ubuntu.com> Original-Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org> Architecture: all Version: 0.8.1-1 Replaces: python2.3-ipython, python2.4-ipython, ipython-common Depends: python, python-support (>= 0.2), python-pexpect Recommends: python-numeric, python-numeric-ext, python-matplotlib Suggests: python-profiler Conflicts: python2.3-ipython, python2.4-ipython, ipython-common Filename: pool/universe/i/ipython/ipython_0.8.1-1_all.deb Size: 1047256 MD5sum: dbca77e2abad63a7fe1c2afadd78d29a SHA1: 3df0f85b4a65603429a2d8fecd279354c0b8b942 SHA256: f35288075d8b71d80bd84fe6a40b479c4509f200234b9b75daf1886f8fdf98b9 Description: enhanced interactive Python shell IPython can be used as a replacement for the standard Python shell, or it can be used as a complete working environment for scientific computing (like Matlab or Mathematica) when paired with the standard Python scientific and numerical tools. It supports dynamic object introspections, numbered input/output prompts, a macro system, session logging, session restoring, complete system shell access, verbose and colored traceback reports, auto-parentheses, auto-quoting, and is embeddable in other Python programs. . Homepage: http://ipython.scipy.org/ Bugs: mailto:ubuntu-users at lists.ubuntu.com Origin: Ubuntu On Nov 29, 2007 12:11 PM, 篱笆 <nameliba at gmail.com> wrote: > 路过一下.ipython是什么? > 另外, google 甚至 baidu 一下都可以知道的。
Zeuux © 2025
京ICP备05028076号