[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: bash-3.2$ uname -a Darwin david-beazleys-macbook.local 9.5.1 Darwin Kernel Version 9.5.1: Fri Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELEASE_I386 i386 bash-3.2$ ./python.exe -c import sys; print(sys.version) 3.1a0 (py3k:67609, Dec 6

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-29 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: I agree with previous comments that write() should definitely write all data when in blocking mode. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4428

[issue4447] exec inside a function

2008-11-27 Thread David M. Beazley
New submission from David M. Beazley [EMAIL PROTECTED]: Is the following code valid Python 3 or not? def foo(): x = 1 exec(x = 42) print(x)# Prints 1 (exec has no effect) I know there are a variety of issues surrounding exec(), function bodies, and other matters. Just

[issue4447] exec inside a function

2008-11-27 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: For what it's worth, I hope this behavior gets well-documented. Thanks. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4447

[issue4428] io.BufferedWriter does not observe buffer size limits

2008-11-25 Thread David M. Beazley
New submission from David M. Beazley [EMAIL PROTECTED]: The Buffered I/O interface in the io module has the user specify buffer limits such as size and max_buffer_size. The first limit (size) is easy to understand as a buffering threshold at which writes will occur. However, no apparent

[issue4362] FileIO object in io module

2008-11-20 Thread David M. Beazley
New submission from David M. Beazley [EMAIL PROTECTED]: The FileIO object defined in the new io library has name and mode properties. However, attempts to access either value result in an AttributeError exception. The C source code in _fileio.c doesn't even implement a name attribute

[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-11-20 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: Just a quick comment from the Python training universe--this bug makes it impossible to use Python 2.6 in any kind of Python teaching environment where IDLE tends to be used a lot. I'm having to tell students to stick with Python-2.5.2

Testing out Newsproxy.

2008-07-20 Thread David M Lemcoe Jr.
Going to see if Newsproxy actually blocks google groups. -=___=- David M Lemcoe Jr. Roswell, Georgia http://www.davidlemcoe.com/ [EMAIL PROTECTED] QRZ: KI4YJL AIM: lemcoe9 YIM: lemcoe9 GTalk: [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] Xfire: shawtylo1 ICQ: 359114839

Re: Question

2008-07-19 Thread David M Lemcoe Jr.
Hello [EMAIL PROTECTED], No language is better than another because Python is not intended for the same uses and/or people. Your question has no place here. David -=___=- David M Lemcoe Jr. Roswell, Georgia http://www.davidlemcoe.com/ [EMAIL PROTECTED] QRZ: KI4YJL

Re: Any Game Developers here?

2008-07-18 Thread David M Lemcoe Jr.
Hello Michael, Any people that use Python as the predominant language for their game development here? ~Michael Well, I make little CLI games that are extremely basic and have no actual graphics, but i'm sure a few people actually use them in video games. David --

Re: setting a breakpoint in the module

2006-08-23 Thread David M. Cooke
failing condition, for instance. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding style

2006-07-18 Thread David M. Cooke
) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding style

2006-07-18 Thread David M. Cooke
[EMAIL PROTECTED] (David M. Cooke) writes: Bruno's already mentioned that iterators and generators aren't sequences. Numpy arrays act like the other sequence types: a = numpy.array([]) a array([], dtype=int64) len(a) 0 bool(a) False (0-dimensional numpy arrays are pathological anyways

Re: ANN: NumPy 0.9.8 released

2006-05-17 Thread David M. Cooke
the latest setuptools (0.6b1). The hacks I added to get easy_install and numpy.distutils to get along are hard enough without trying to be backward compatible :-( -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster

Re: pow (power) function

2006-03-17 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Python advocacy in scientific computation

2006-03-06 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Scientific Computing with NumPy

2006-02-10 Thread David M. Cooke
setup.py build python setup.py install. Do you need Tiger (10.4) or Panther (10.3) compatibility? -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: good library for pdf

2006-01-26 Thread David M. Cooke
/pyPdf/. I haven't tried it, but it looks interesting. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

problem adding list values

2005-12-22 Thread David M. Synck
Hi all, I am fairly new to Python and trying to figure out a syntax error concerning lists and iteration through the same. What I am trying to do is sum a list of float values and store the sum in a variable for use later. The relevant code looks like this - def getCredits(): This

Re: idea of building python module using pyrex

2005-12-09 Thread David M. Cooke
C code, but it does the job well. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Reading binary data

2005-11-23 Thread David M
OK so here is my task. I want to get at the data stored in /var/account/pacct, which stores process accounting data, so that I can make it into a more human understandable format then what the program sa can do. The thing is, its in a binary format and an example program that reads some data

Re: Reading binary data

2005-11-23 Thread David M
Thanks but the C Struct describing the data doesn't match up with the list on the module-struct page. this is the acct.h file #ifndef _SYS_ACCT_H #define _SYS_ACCT_H 1 #include features.h #define __need_time_t #include time.h #include sys/types.h __BEGIN_DECLS #define ACCT_COMM 16 /*

Re: Underscores in Python numbers

2005-11-19 Thread David M. Cooke
*(a8 + x2*a10 (or least that's what I like to write). Now, if I were going to higher precision, I'd have more digits of course. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http

Re: authentication for xmlrpc via cgi

2005-09-22 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to determine -- when parsing -- if a word contains a builtin name or other imported system module name?

2005-08-04 Thread David M. Cooke
there :) For modules, sys.modules is a dictionary of the modules that have been imported. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: without shell

2005-06-10 Thread David M. Cooke
to it). -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Annoying behaviour of the != operator

2005-06-10 Thread David M. Cooke
Robert Kern [EMAIL PROTECTED] writes: greg wrote: David M. Cooke wrote: To solve that, I would suggest a fourth category of arbitrary ordering, but that's probably Py3k material. We've got that: use hash(). [1+2j, 3+4j].sort(key=hash) What about objects that are not hashable? The purpose

Re: Annoying behaviour of the != operator

2005-06-09 Thread David M. Cooke
, the order will stay the same. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: computer algebra packages

2005-06-08 Thread David M. Cooke
be possible. I haven't had the time to actually do anything, though :-) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for shelve files

2005-05-01 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a package with convolution and related methods?

2005-04-21 Thread David M. Cooke
). -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads and variable assignment

2005-04-12 Thread David M. Cooke
where timestamps w/ state changes are pushed on in thread 1, and popped off and analysed before logging in thread 2. (Or something; this just popped in my head.) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster

Re: python/svn issues....

2005-04-12 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: richcmpfunc semantics

2005-04-07 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: curious problem with large numbers

2005-04-07 Thread David M. Cooke
) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-04 Thread David M. Cooke
at it] -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric module

2005-04-01 Thread David M. Cooke
] and that'll work. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric module

2005-04-01 Thread David M. Cooke
:-) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools to iter transition

2005-03-30 Thread David M. Cooke
classmethod, and the datetime extension module use the C version (the METH_CLASS flag). And staticmethod (and METH_STATIC) aren't used at all in 2.3 or 2.4 :-) [if you ignore __new__] -- ||\/| /--\ |David M. Cooke |cookedm(at)physics

Re: breaking up is hard to do

2005-03-25 Thread David M. Cooke
:-) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python to extend a python app

2005-03-24 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing arguments to python from URL

2005-03-22 Thread David M. Cooke
this: import cgi form = cgi.FieldStorage() if form.getvalue('sort') == 'ascending': ... sort in ascending order ... etc. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org

Re: how to handle repetitive regexp match checks

2005-03-17 Thread David M. Cooke
def __getitem__(self, name): return self.m.group(name) Then, use it like for line in fo: m = Matcher(line) if m.match(rx1): do something elif m.match(rx2): do something else: error -- ||\/| David M. Cooke cookedm(at)physics(dot)mcmaster(dot)ca

Re: SAX parsing problem

2005-03-15 Thread David M. Cooke
!) is not guaranteed to get all contiguous character data in one call. Also check if .skippedEntity() methods are firing. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread David M. Cooke
doesn't name their plugin 'os; os.system(rm -rf /); import sys' Use __import__ instead. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: binutils strings like functionality?

2005-03-03 Thread David M. Cooke
missing tabs (\t). The GNU binutils string utility looks for \t or [\x20-\x7e]. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Python 2.4 Quick Reference available

2005-02-19 Thread David M. Cooke
what I believe the consensus is about the usage of open vs. file. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: LinearAlgebra incredibly slow for eigenvalue problems

2005-01-28 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: LinearAlgebra incredibly slow for eigenvalue problems

2005-01-28 Thread David M. Cooke
, check that import Numeric Numeric.__file__ gives you something you're expecting, and not something else. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python

Re: pickling extension class

2005-01-18 Thread David M. Cooke
. The tp_name slot of your extension type should be model.hyper.PeriodicGrid. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: readline, rlcompleter

2005-01-11 Thread David M. Cooke
). Have a look at the readline info page, or the man page. The syntax of readline.parse_and_bind is the same as that of an inputrc file. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread David M. Cooke
:-) -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: why not datetime.strptime() ?

2005-01-10 Thread David M. Cooke
with same date and time fields)}, It probably would help to add some documentation to add to the datetime module documentation. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org

Re: Python3: on removing map, reduce, filter

2005-01-10 Thread David M. Cooke
, best of 3: 216 usec per loop So factor of 2, instead of 13700 ... -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: getattr() woes

2004-12-28 Thread David M. Cooke
is if getattr, when raising AttributeError, somehow reused the old traceback (which would point out the original problem). I don't know how to do that, though. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot

Re: Namespaces and the timeit module

2004-12-14 Thread David M. Cooke
in a module. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Distutils vs. Extension header files

2004-12-10 Thread David M. Cooke
. -- ||\/| /--\ |David M. Cooke |cookedm(at)physics(dot)mcmaster(dot)ca -- http://mail.python.org/mailman/listinfo/python-list

<    1   2