cn.bbs.comp.lang.python
  Home FAQ Contact Sign in
cn.bbs.comp.lang.python only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
cn.bbs.comp.lang.python Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  python里的recv函数         


Author: ¸ß²»¼ûÔ¶
Date: Jun 1, 2008 22:59

socket的recv函数参数很简单,比如recv(4096)
它怎么知道是否recv完成了呢?靠超时来判断吗?

--

※ 来源:・水木社区 newsmth.net・[FROM: 219.133.62.*]
no comments
  Re: 求一个小段代码,关于编码问题         


Author: Lobsters On The Run
Date: Jun 1, 2008 22:29

几十几百行的代码还可以吧。
【 在 goodtaste (有乐享乐,没乐刨乐) 的大作中提到: 】
: 标 题: Re: 求一个小段代码,关于编码问题
: 发信站: 水木社区 (Mon Jun 2 13:29:06 2008), 转信
:
: 就有一点,很慢
: 【 在 FeiSan (肥三) 的大作中提到: 】
: : 说到编辑器,强烈推荐PSPad,完全free,很强大,尤其它的代码浏览器,真的很方便,对python、html、甚至js都支持的不错。
:

--
While this is mathematically impeccable,
it is the wrong way to think about such equations.

※ 来源:・水木社区 newsmth.net・[FROM: 202.127.16.*]
no comments
  Re: 求一个小段代码,关于编码问题         


Author: ÓÐÀÖÏíÀÖ£¬Ã»ÀÖÅÙÀÖ
Date: Jun 1, 2008 22:29

就有一点,很慢
【 在 FeiSan (肥三) 的大作中提到: 】
: 说到编辑器,强烈推荐PSPad,完全free,很强大,尤其它的代码浏览器,真的很方便,对python、html、甚至js都支持的不错。

--

有乐享乐,没乐刨乐

※ 来源:・水木社区 newsmth.net・[FROM: 219.142.163.*]
no comments
  Re: 求一个小段代码,关于编码问题         


Author: Lobsters On The Run
Date: Jun 1, 2008 22:23

【 在 FeiSan (肥三) 的大作中提到: 】
: 标 题: Re: 求一个小段代码,关于编码问题
: 发信站: 水木社区 (Mon Jun 2 13:22:32 2008), 转信
:
: 说到编辑器,强烈推荐PSPad,完全free,很强大,尤其它的代码浏览器,真的很方便,对python、html、甚至js都支持的不错。
这里的完全,是指的完全不要钱吧……
:
: 【 在 PRML (Emeditor真好用) 的大作中提到: 】
: : 不能吧。
: : 最近看那本PyQt的书,Emeditor配置一下抄代码,auto complete很方便。
--
While this is mathematically impeccable,
it is the wrong way to think about such equations.

几何分布的方差也算不出来喽……废柴都不如,类似废渣。

※ 来源:・水木社区 newsmth.net・[FROM: 202.127.16.*]
no comments
  Re: 求一个小段代码,关于编码问题         


Author: ·ÊÈý
Date: Jun 1, 2008 22:22

说到编辑器,强烈推荐PSPad,完全free,很强大,尤其它的代码浏览器,真的很方便,对python、html、甚至js都支持的不错。

【 在 PRML (Emeditor真好用) 的大作中提到: 】
: 不能吧。
: 最近看那本PyQt的书,Emeditor配置一下抄代码,auto complete很方便。

--
我是肥三,可爱的肥三

※ 来源:・水木社区 newsmth.net・[FROM: 221.220.88.*]
no comments
  Re: popen的.exe的输出能不能同时送到屏幕和文件?         


Author: ´óÁ³Ã¨
Date: Jun 1, 2008 21:47

你可以考虑自己包装一个能同时输出到屏幕和文件的stdout取代系统默认的
如下

import sys

class bi_stdout:
file = None
old_stdout = None

def __init__(self, file_str):
self.file = open(file_str, "w+")
old_stdout = sys.stdout
sys.stdout = self

def write(self, str):
if not file == None:
self.file.write(str)
sys.__stdout__.write(str)

def close(self):
if not file == None:
self.file.close()
sys.stdout = self.old_stdout
Show full article (1.14Kb)
no comments
  Re: popen的.exe的输出能不能同时送到屏幕和文件?         


Author: °ÂÔËÖ®ÉñÂúÈû
Date: Jun 1, 2008 21:41

tee ?

【 在 baxi (庆祝夺冠|小白下课!) 的大作中提到: 】
: 目前的写法 p=Popen(command,stdout=fLog)
: 这样输出定向到了fLog文件
: 想同时在屏幕上也看到该怎么写?
: ...................

--
He said all were knights.
You say all are managers.
Then they fight and die
and program and survive.
But they lost the holy land
without angel's crying.

※ 来源:・水木社区 newsmth.net・[FROM: 221.122.43.*]
no comments
  Re: 如何获得8.3旧风格的文件名         


Author: »Ó×ųá°òµÄÄк¢
Date: Jun 1, 2008 19:57



【 在 mirror (Lobsters On The Run) 的大作中提到: 】
: 安装pywin32(.sf.net)
: import win32file
: for file_data in win32file.FindFilesIterator ("*.*"):
: ...................

--
bug本是无所谓有无所谓无的,世界上本没有bug,de的人多了,也便成了bug

※ 来源:・水木社区 newsmth.net・[FROM: 143.89.157.*]
no comments
  Re: numpy里面的a+=b 和a = a+b会类型不一致啊         


Author: ·ÉÌìÉñ¿
Date: Jun 1, 2008 18:16

我刚看了一下Python的源码,整型的+=运算没有专门写,估计是用通用的+加赋值了。
【 在 Hechuan (hc) 的大作中提到: 】
: 嗯,是的。
: 不过python里面a是整型时候 a+=1.0就变成浮点数了……

--

※ 来源:・水木社区 newsmth.net・[FROM: 211.99.222.*]
no comments
  Re: numpy里面的a+=b 和a = a+b会类型不一致啊         


Author: hc
Date: Jun 1, 2008 18:03

嗯,是的。
不过python里面a是整型时候 a+=1.0就变成浮点数了……
【 在 Aerodonkey (飞天神驴) 的大作中提到: 】
: 标 题: Re: numpy里面的a+=b 和a = a+b会类型不一致啊
: 发信站: 水木社区 (Mon Jun 2 08:59:31 2008), 转信
:
: 这还是符合逻辑的吧。
: +=运算是在原来的基础上加一个增量,因而保留原来的类型;而+的时候会做类型提升,到两者中表示范围广的类型,然后再赋值。
: 【 在 Hechuan (hc) 的大作中提到: 】
: : a是int32的,b是float64的时候
: : a += b ,a还是int32的,
: : a = a+b, a就是float64的了。
: : ...................

--
While this is mathematically impeccable,
it is the wrong way to think about such equations.

※ 来源:・水木社区 newsmth.net・[FROM: 202.127.16.*]
no comments
1 2 3 4 5 6 7 8 9