RE: [Python-3000] bug in modulus?

2006-05-03 Thread Michael Chermside
merical algorithms and hoping to make the language smart enough to "just work" for them, then I'm afraid it's hopeless. I'm far from a beginner, but I don't think I could implement a non-trivial numerical algorithm. (Well, I could make it work, but I'm betting it

RE: lstat(fileName)[ST_SIZE]

2005-06-10 Thread Michael Chermside
unsurprised to learn that it doesn't handle file sizes larger than MAXINT on your box... hardly any OS's allowed such a thing back then. I recomend using a newer version... 2.4.1 is quite nice. -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list

using python from c/c++

2005-06-10 Thread Michael Chermside
eone else will write in to point one out. -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list

RE: a question from a newcomer to this language

2005-06-10 Thread Michael Chermside
e elegant as well. If you look at a problem and are nearly certain that it needs to be solved using exec, try posting it here... the people on this newsgroup are very good at solving challenges like that. But try it yourself first... you may learn something. -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list

RE: match groups: optional groups not accessible

2005-06-10 Thread Michael Chermside
ast): > File "", line 1, in ? > IndexError: no such group Because the name of the named group in your example is 'm' not 'maybe'. 'maybe' is the text to match. Try it like this: >>> import re >>> m = re.match('(?Pmaybe)?yes', "yes") >>> print m.group(1) None >>> print m.group('m') None -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list

RE: without shell

2005-06-10 Thread Michael Chermside
execute the child program. -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list

RE: line-by-line output from a subproce

2005-05-24 Thread Michael Chermside
the > readahead buffer used by the file iterator is 8192 bytes, which clearly > might be too much. Jp Calderone writes: > def iterread(fobj): > return iter(fobj.readline, '') Thanks folks... that did it nicely! -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list

string goes away

2005-04-01 Thread Michael Chermside
lly testing them. If you don't have time to test, then just don't optimize... write whatever is most readable. If you NEED more speed, then profiling and testing will show you what to fix. (Using a better algorithm is a different story... do that whenever you need it.) -- Michael Chermside -- http://mail.python.org/mailman/listinfo/python-list