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
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
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
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
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
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
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
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
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
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
--
failing condition, for instance.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
[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
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
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
/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
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
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
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
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
/*
*(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
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
to it).
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
, the order will stay the same.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
).
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
.
--
||\/|
/--\
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
at it]
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
]
and that'll work.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
:-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
:-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
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
!) 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
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
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
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
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
, 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
.
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
).
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
:-)
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
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
, 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
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
in a module.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
.
--
||\/|
/--\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
--
http://mail.python.org/mailman/listinfo/python-list
101 - 157 of 157 matches
Mail list logo