On Wed, 2009-02-25 at 15:54 -0500, Shawn Milochik wrote:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch de...@nospam.web.de wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an
Shawn Milochik schrieb:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch de...@nospam.web.de wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an actual reason for that. The way you
do it
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -cimport os; print os.path.exists('alpha/beta')
True
$ chmod u-x alpha
$ python -cimport os; print os.path.exists('alpha/beta')
False
$
I Don't know how this is handled on Windows...
Here's one
On 2009-02-25, Diez B. Roggisch de...@nospam.web.de wrote:
Don't waste time coding for a future you can't even pretend to
know. Do what is needed to solve the actual problem.
Premature obfuscation is even worse than premature optimization.
--
Grant Edwards grante
May a écrit :
On Feb 24, 10:36 am, Diez B. Roggisch de...@nospam.web.de wrote:
Thanks for all your suggestions. From what I've experienced in Django
and now that I know a little more about how Python functions, I will
probably use a combination of PHP and Django, instead of trying to get
On 24 fév, 18:34, Dario Traverso traver...@gmail.com wrote:
I've been trying to install the Python Image Library (PIL) on my Mac
OSX Leopard laptop, but have been running into some difficulties.
I've built the library, using the included setup.py script. The build
summary checks out ok,
i found the solution
This is my first attempt at memcaching html page using cheetah
since cheetah render needs locals() i use getCallerInfo() to get the
locals() and send to memcached
let me know if it is possible to better do this
*notice getCallerInfo
*
*utils.py*
@log_time_func
def
On Wed, 25 Feb 2009 15:54:46 -0500, Shawn Milochik sh...@milochik.com wrote:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch de...@nospam.web.de wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless
Tim Chase wrote:
As an aside, as of the last time I read the PEP[1] on this, I
believe it exhausts (or attempts to exhaust) any iterator. IMHO,
I think this exhausting is a bad idea because it prevents things like
def numbers(start=0):
i = start
while True:
yield i
I think Django is fabulous for the admin-interface, a simple text
search and template inheritance. I will use Django for all of those.
What I'm not getting an answer to and cannot find an example of is a
complex search, where I have to retrieve data from multiple tables,
combine the data, remove
for a introduction to the multitude of query-options. I doubt that your
rather simple m:n-relationship is covered there.
s/is/isn't/
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 25, 2009 at 05:05:28PM -0200, Gabriel Genellina wrote:
I'd try to move all the global stuff in that module into a function,
init. Importing the module will always succeed - you have to manually
call init() after importing it.
i normally do that anyway and would also have done
Hello,
I created a QTextEdit where I wanted to display log messages.
A logging.Handler should do this job.
It worked with one thread well, but when I start a QThread the text on all
widgets is removed and I get many errors in my konsole:
X Error: RenderBadGlyphSet (invalid GlyphSet parameter)
On 26/02/2009 4:51 AM, Lorenzo wrote:
PS: Mark, this could be added to a kind of Deployment entry in
py2exe wiki, it would be useful.
IIRC, I've never edited the py2exe wiki (despite appearances to the
contrary sometimes, I don't formally maintain that package!).
But that is the cool thing
On Feb 25, 2009, at 3:20 PM, Vincent Davis wrote:
I have looked around for a good howto setup PYTHONPATH on Mac os x
10.5 Although I get many results I am not sure which is correct. I
am not
sure if it is different for 10.5 over previous versions. Does anyone
know of
a well documented set
On Feb 25, 10:18 am, Xah Lee xah...@gmail.com wrote:
On Feb 25, 3:34 am, nick_keighley_nos...@hotmail.com wrote:
the nasty cons then only appears in a single function which
you can hide in a library
I think the following answers that.
Q: If you don't like cons, lisp has arrays and
On Wed, 25 Feb 2009 08:48:27 -, Bruno Desthuilliers
bruno.42.desthuilli...@websiteburo.invalid wrote:
Ben Finney a écrit :
(snip - about using ALL_CAPS for pseudo-constants)
Perhaps I'd even
argue for an update to PEP 8 that endorses this as conventional.
+1
I've been a bit surprised
En Wed, 25 Feb 2009 21:24:33 -0200, chr...@fsfe.org escribió:
On Wed, Feb 25, 2009 at 05:05:28PM -0200, Gabriel Genellina wrote:
I'd try to move all the global stuff in that module into a function,
init. Importing the module will always succeed - you have to manually
call init() after
On Feb 24, 9:34 am, Dario Traverso traver...@gmail.com wrote:
I've been trying to install the Python Image Library (PIL) on my Mac
OSX Leopard laptop, but have been running into some difficulties.
...
I've followed all of the installation instructions exactly. The build
summary reported
On Feb 25, 2009, at 3:54 PM, Shawn Milochik wrote:
It is true that it would be fewer lines of code with the same
functionality, but it's better practice to have that framework in
place so that any changes made in the future wouldn't break any of the
code accessing my class. Obviously this is a
#
class MyError(Exception):
def __init__(self):
self.message = u'Some Chinese:中文'
def __str__(self):
return self.message.encode('utf8')
#
This is an exception that I defined.
Dictionaries just store references to objects, right? So is it thread
safe to lock a specific key/val pair on a dictionary and modify its
val and release the lock?
example snippet:
# assuming d_lock was initialized long ago in a thread-safe manner
d_lock.acquire()
d = {}
d[1] =
Thanks! All fixed!
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 26, 2:35 am, Emile van Sebille em...@fenx.com wrote:
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -cimport os; print os.path.exists('alpha/beta')
True
$ chmod u-x alpha
$ python -cimport os; print os.path.exists('alpha/beta')
music24...@gmail.com wrote:
On Feb 26, 2:35 am, Emile van Sebille em...@fenx.com wrote:
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -cimport os; print os.path.exists('alpha/beta')
True
$ chmod u-x alpha
$ python -cimport os; print
I have to make some queries for 4 tables I have. The following
relations are:
Classes(class, type, country, numGuns, bore, displacement)
Ships (name, class, launched)
Battles (name, date)
Outcomes (ship, battle, result)
The three queries I'm stuck on are the following:
1. Find the classes that
On Feb 26, 9:03 am, Steve Holden st...@holdenweb.com wrote:
music24...@gmail.com wrote:
On Feb 26, 2:35 am, Emile van Sebille em...@fenx.com wrote:
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -cimport os; print
On Feb 26, 3:16 pm, music24...@gmail.com wrote:
On Feb 26, 9:03 am, Steve Holden st...@holdenweb.com wrote:
music24...@gmail.com wrote:
On Feb 26, 2:35 am, Emile van Sebille em...@fenx.com wrote:
Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch
Ha the guru himself responding :-)
--- On Wed, 25/2/09, Paul McGuire pt...@austin.rr.com wrote:
From: Paul McGuire pt...@austin.rr.com
Subject: Re: XML Parsing
To: python-list@python.org
Date: Wednesday, 25 February, 2009, 2:04 PM
On Feb 25, 1:17 am, hrishy hris...@yahoo.co.uk
wrote:
Hi
Hi Cliff
Thanks so using elementree is the right way to handle this problem
regards
Hrishy
--- On Wed, 25/2/09, J. Clifford Dyer j...@sdf.lonestar.org wrote:
From: J. Clifford Dyer j...@sdf.lonestar.org
Subject: Re: XML Parsing
To: hris...@yahoo.co.uk
Cc: python-list@python.org, Lie Ryan
mmcclaf wrote:
I have to make some queries for 4 tables I have. The following
relations are:
Classes(class, type, country, numGuns, bore, displacement)
Ships (name, class, launched)
Battles (name, date)
Outcomes (ship, battle, result)
The three queries I'm stuck on are the following:
1. Find
+1 for site packages and standard shebang, still lets you launch with
python first followed by .py file or big long path to a specific
python followed by .py file
also for some clues, just open up a terminal in your Mac OS X computer
and check out your exports your PATH will be different
Hi,
I have a problem with setting a property to a class instance, in
python 2.5.1. The property is defined through get and set methods, but
when I set it, the setter doesn't get called. Instead, I believe the
property in the instance gets replaced with a new object (string).
I have the following
Dan Barbus schrieb:
Hi,
I have a problem with setting a property to a class instance, in
python 2.5.1. The property is defined through get and set methods, but
when I set it, the setter doesn't get called. Instead, I believe the
property in the instance gets replaced with a new object
New submission from wrobell wrob...@pld-linux.org:
python documentation can be downloaded in pdf format (a4, us letter),
html and text plain. they are useful for printing and computer based
viewing, but not so good to read on ebook hardware/software
(i.e. sony prs-{505,700} or stanza ebook
Senthil orsent...@gmail.com added the comment:
I got into thinking if sphinx-dev or docutils be the best place for this ticket?
Python Documentation is nothing but ReStructured text and it is
required to create a rst2epub that would convert restructured text to
epub format. If you are already
New submission from Chris Rebert pyb...@rebertia.com:
I would like the offer the table in the attached file for addition to
the 'time' module documentation so as to provide a quick overview of how
to convert between the various time representations. As it currently
stands (at least on the
Nick Coghlan ncogh...@gmail.com added the comment:
That's an interesting problem... since one of the things I like about
CMs is the ability to turn pretty much any block of code into a context
manager by substituting a yield statement at the appropriate point, not
having the ability to skip the
wrobell wrob...@pld-linux.org added the comment:
probably sphinx/docutils deserve their own tickets, but appropriate
tools support will not guarantee, that documentation in epub format is
going to be published on
http://docs.python.org/download.html
if documentation won't be published in
Senthil orsent...@gmail.com added the comment:
On Wed, Feb 25, 2009 at 5:12 PM, wrobell rep...@bugs.python.org wrote:
probably sphinx/docutils deserve their own tickets,
I agree with your points and I would wait for Georg's call on this ticket.
It would definitely help if you have already
Giampaolo Rodola' billiej...@users.sourceforge.net added the comment:
Actually I have encountered a possible bug. the close()
method doesn't seem to actually close the connection...
Why? What happens exactly?
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
I just took a quick look at Lib/abc.py and there's no way *I*'ll
reimplement it in C :)
The only workable approach would be:
1. rename the current would-be ABCs (IOBase, RawIOBase, etc.) with a
leading underscore (_IOBase, _RawIOBase, etc.)
2.
New submission from anatoly techtonik techto...@gmail.com:
When documentation grows too large it is nice to have clear examples
that stand out of text. Explanation is important to get the idea, but
for a reference cookbook examples work better.
Here is a patch to clarify the usage of
New submission from Joachim Ott joachim@gmail.com:
I saw it first in /usr/lib/python2.5/subprocess.py on two different
systems, line 12 reads:
rsubprocess - Subprocesses with accessible I/O streams
It's still there in 3.0.1. Is a single r a valid python statement?
--
components:
Preston Briggs prest...@google.com added the comment:
In all this discussion, it seems that we have not discussed the
possibility of adapting David Gay's code, dtoa.c, which nicely handles
both halves of the problem. It's also free and has been well exercised
over the years.
It's available
New submission from Steve Owens st...@integrityintegrators.net:
Not sure what to set theType field to, this is my first patch
submission. The attached files are a unit test
test_curses_color_set.py and the diff color_set_diff, apparently I can
only attach one fo thetwo files.
--
Changes by Steve Owens st...@integrityintegrators.net:
Added file: http://bugs.python.org/file13175/test_curses_color_set.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5368
___
Mark Dickinson dicki...@gmail.com added the comment:
It'd probably have to be touched up a bit.
This may be an understatement. :-)
In the first 50 lines of the 3897-line dtoa.c file, I see this warning:
/* On a machine with IEEE extended-precision registers, it is
* necessary to specify
Preston Briggs prest...@google.com added the comment:
It'd probably have to be touched up a bit.
This may be an understatement. :-)
Probably so. Nevertheless, it's got to be easier
than approaching the problem from scratch.
And considering that this discussion has been
going on for over a
New submission from Arkadiusz Miskiewicz
Arkadiusz Miskiewicz ar...@users.sourceforge.net:
Python/ceval.c and many other places rely on __ppc__ (and __ppc64__)
symbol defined like below.
Unfortunately on my Linux ppc __ppc__ is never defined while
__powerpc__
Benjamin Peterson benja...@python.org added the comment:
On Wed, Feb 25, 2009 at 10:15 AM, Antoine Pitrou rep...@bugs.python.org wrote:
Antoine Pitrou pit...@free.fr added the comment:
I just took a quick look at Lib/abc.py and there's no way *I*'ll
reimplement it in C :)
I don't blame you
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
FWIW, I did a further update to the super docs to clarify that parent
classes are search in single inheritance models and that both parent and
siblings are searched in multiple inheritance models. Made the concept
more
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
See: http://docs.python.org/dev/library/functions.html#super
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5229
___
Benjamin Peterson benja...@python.org added the comment:
The prefix r on a string makes it a raw string, certainly a valid
construct.
--
nosy: +benjamin.peterson
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
Probably attached patch will fix this issue. But this patch doesn't
cover other similar problematic codes.
It seems this is multi inheritance problem. Following code shows B.setUp
and B.tearDown are called twice respectively. (In
Mark Dickinson dicki...@gmail.com added the comment:
I would consider compiling the library with flags appropriate to forcing
64-bit IEEE arithmetic if possible.
Using the right compiler flags is only half the battle, though. You
should really be setting the rounding precision dynamically:
Gregory P. Smith g...@krypto.org added the comment:
Could the PyObject_ClearWeakRefs(self); call in the middle of the lines
del_changes_class.patch adds also be used to cause python code to set
__del__ or __dict__ causing the wrong destructor or wrong dict to be
DECREFed?
(I'm trying to wrap
Jake McGuire j...@youtube.com added the comment:
Ugh. Clearly I didn't check to see if it worked or not, as it didn't even
compile. A new diff, tested and verified to work, is attached. I'll work
on creating a test.
Added file: http://bugs.python.org/file13178/cPickle.c.diff
Changes by Jake McGuire j...@youtube.com:
Removed file: http://bugs.python.org/file12882/cPickle.c.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5084
___
Changes by Jake McGuire j...@youtube.com:
Removed file: http://bugs.python.org/file13169/cPickle.c.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5084
___
New submission from Mike Meyer m...@users.sourceforge.net:
The attached short file causes all of python 2.5, 2.6 and 3.0 to drop
into infinite recursion trying to unpickle the created object, but the
2.5 version has the cleanest The problem appears to be that the unpickle
code (C in 3.0; Python
New submission from Mitchell Model m...@acm.org:
In the library documentation of standard types, the instance method
str.format is shown as taking a format-specification as its first
argument. I'm pretty sure that this is incorrect. When format is called
through a string, it is that string
Tarek Ziadé ziade.ta...@gmail.com added the comment:
right, subclasses must use super if their superclasses do.
I'll apply Hirozaku patch (thanks).
I might also simplify distutil base test class to avoid Mixins.
___
Python tracker rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Even if someone devoted the time to get possibly get this right, it
would be somewhat difficult to maintain.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1580
Tarek Ziadé ziade.ta...@gmail.com added the comment:
applied in r69976 and r69977
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5316
___
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Thanks! These improvements are very helpful. The one missing notion is
that object-or-type may be a proxy object, in which case super()
returns a new proxy that additionally skips type.
Perhaps add the following sentence to
Guido van Rossum gu...@python.org added the comment:
What maintenance issues are you anticipating?
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1580
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Gay's code is 3800+ lines and includes many ifdef paths that we need to
get right. Mark points out that the code itself needs additional work.
The discussions so far also get into setting compiler flags on
different systems
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Perhaps add the following sentence to the end of
the first paragraph: If *object-or-type* is a proxy
object, *super* returns a new proxy that additionally
skips *type*.
I'm not really sure what that even means. Nor do
Tim Peters tim.pet...@gmail.com added the comment:
The GNU library's float-string routines are based on David Gay's.
Therefore you can compare those to Gay's originals to see how much
effort was required to make them mostly portable, and can look at the
history of those to get some feel for the
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Actually, it's essential to how super() works. Here's an example using
single inheritance:
class A(object):
def foo(self):
print 'A'
class B(object):
def foo(self):
super(B, self).foo()
print 'B'
class
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
In the previous example, I meant to type
class B(A)
and
class C(B)
rather than having them all derive from object. That's what I get for
not actually testing the code. ;-)
___
Python
New submission from Collin Winter coll...@gmail.com:
(Tarek, I've been told you're the new distutils maintainer. Feel free to
unassign this if that isn't the case.)
The test distutils uses to decide whether it needs to recompile an
existing .o file when building extension modules is too
Benjamin Peterson benja...@python.org added the comment:
Fixed in r69987.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5371
Changes by Tarek Ziadé ziade.ta...@gmail.com:
Added file: http://bugs.python.org/file13181/rpm.ptch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1533164
___
Changes by Tarek Ziadé ziade.ta...@gmail.com:
Removed file: http://bugs.python.org/file13153/rpm.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1533164
___
Changes by Collin Winter coll...@gmail.com:
--
nosy: +collinwinter
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list
Jeffrey Yasskin jyass...@gmail.com added the comment:
Oh, and no problem with picking up the patches. Thanks for writing them
in the first place.
Here's the backport to trunk. I particularly enjoyed the bit in
pyassem.py where I had to teach the pure-Python compiler that you can
get to a block
Collin Winter coll...@gmail.com added the comment:
Jeffrey: updated the patch to address your concerns.
Martin: I'm not sure I completely understand it either, though it seems
similar to issue4477. In the course of developing this patch, I tried
also #ifdef'ing out all usages of the
Changes by Collin Winter coll...@gmail.com:
Removed file: http://bugs.python.org/file13168/no_py3k_warning.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5362
___
Collin Winter coll...@gmail.com added the comment:
Bah, forgot to run autoreconf. Fixed.
Added file: http://bugs.python.org/file13184/no_py3k_warning.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5362
Changes by Collin Winter coll...@gmail.com:
Removed file: http://bugs.python.org/file13183/no_py3k_warning.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5362
___
Matthew Barnett pyt...@mrabarnett.plus.com added the comment:
issue2636-features-4.diff includes:
Bugfixes
msg74203: duplicate capture group numbers
msg74904: duplicate capture group names
Added file: http://bugs.python.org/file13185/issue2636-features-4.diff
Skip Montanaro s...@pobox.com added the comment:
I verified the bug. I started to work on a patch (see attached), but
it quickly seems to get out-of-hand with tracebacks about stuff not
supporting the buffer API. I suspect the real solution might involve
doing something to convert the bytes to
Mike Frysinger vap...@users.sourceforge.net added the comment:
Garrett: your configure method is overly complicated. all you need to
do is set --build=binos_c3.4.3-p1.mips64-octeon-linux. autoconf will
figure out all the other toolchain settings.
___
Python
Jeffrey Yasskin jyass...@gmail.com added the comment:
The numbers are:
Intel Core 2, gcc-4.3, 32-bit
2to3:
25.24 - 24.89: 1.38% faster
Django:
Min: 0.618 - 0.607: 1.90% faster
Avg: 0.621 - 0.615: 1.04% faster
PyBench:
Min: 5324 - 5280: 0.83% faster
Avg: 5456 - 5386: 1.30% faster
Pickle:
Min:
Clinton Roy clinton@gmail.com added the comment:
Oh, you meant for me to reply =)
- Do all unix-like system support pkg-config?
Yes. It even works on windows.
- Is $(LIBDIR)/pkgconfig the only choice for installing this file?
While pkg-config can be told to look in other directories for
Rob Renaud rren...@google.com added the comment:
I am totally new to Python dev. I reinvented a NamedTupleReader
tonight, only to find out that it was created a year ago. My primary
motivation is that DictReader reads headers nicely, but DictWriter
totally sucks at handling them.
Consider
Rob Renaud rren...@google.com added the comment:
My previous patch could write the header twice. But I am not sure about
about how the writer should handle the fieldnames parameter on one hand,
and the namedtuple._fields on the other.
Added file:
Changes by Rob Renaud rren...@google.com:
Removed file: http://bugs.python.org/file13187/named_tuple_write_header.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1818
___
101 - 190 of 190 matches
Mail list logo