The PySide team is happy to announce the second beta release of PySide:
Python for Qt. New versions of some of the PySide toolchain components
(API Extractor and Shiboken) have been released as well.
This is a source code release only; we hope our community packagers will
be providing provide
Hi - I've got a straightforward class I want to serialize as JSON
(actually I want to a serialize a list of them but I believe that's
irrelevant).
I've subclassed JSONEncoder and defined my own version of the
'default' method ( based upon what I read at
http://docs.python.org/library/json.html
)
shearichard wrote:
Hi - I've got a straightforward class I want to serialize as JSON
(actually I want to a serialize a list of them but I believe that's
irrelevant).
I've subclassed JSONEncoder and defined my own version of the
'default' method ( based upon what I read at
On 17/12/2010 0.51, Steven D'Aprano wrote:
Don't get me wrong... spaghetti code is*bad*. But there are other ways
of writing bad code too, and hanging around inside a function long after
you've finished is also bad:
def function(arg):
done = False
do_something()
if
On Dec 18, 11:30 pm, Peter Otten __pete...@web.de wrote:
shearichard wrote:
Hi - I've got a straightforward class I want to serialize as JSON
(actually I want to a serialize a list of them but I believe that's
irrelevant).
I've subclassed JSONEncoder and defined my own version of the
On Fri, Dec 17, 2010 at 17:57, Sebastian Alonso wrote:
Hey everyone, I'm working on a script which uses subprocess to launch a
bunch of installers, but I'm getting problems with .msi installers
although .exe ones work fine. The output I get is this:
import subprocess
p =
cronoklee cronok...@gmail.com wrote:
Hey thanks for the help fellas. The links were helpful and the pyExe
program looks great. I might well end up using this.
I'm still a little confused as to how the directory structure works. PIL
(http://www.pythonware.com/products/pil/#pil117), for example
On 12/17/2010 02:36 PM, Daniel Fetchinson wrote:
How-To: Add VirtualEnv and Pylons (WSGI framework) to XAMPP
http://www.apachefriends.org/f/viewtopic.php?f=17t=42981
Maybe, if there's no Zope. Or we'll run away screaming...
That is rather pathetically true...
Ah well, each to their own...
On 12/18/2010 6:32 AM, shearichard wrote:
Brilliant - thank you very much.
Now that you've explained it I can see why the documentation is
written the way it is ! Before I saw your example I thought the
documentation was a bit strange but I can see now what it was trying
to tell me !
If you
On Sat, 18 Dec 2010 12:29:31 +0100, Francesco wrote:
[...]
I agree to your point, but I'm afraid you chose a wrong example (AFAIK,
and that's not much). Sure, the second version of function(arg) is much
more readable, but why do you think the first one would do *lots* of
unnecessary work?
On Dec 17, 12:23 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
On Thu, 16 Dec 2010 20:32:29 -0800, Carl Banks wrote:
Even without the cleanup issue, sometimes you want to edit a function to
affect all return values somehow. If you have a single exit point you
just make
Is there any way to use a true lists (with O(c) insertion/deletion and
O(n) search) in python? For example, to make things like reversing
part of the list with a constant time.
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 19, 9:18 am, Dmitry Groshev lambdadmi...@gmail.com wrote:
Is there any way to use a true lists (with O(c) insertion/deletion and
O(n) search) in python? For example, to make things like reversing
part of the list with a constant time.
I forgot to mention that I mean *fast* lists. It's
Dmitry Groshev wrote:
Is there any way to use a true lists (with O(c) insertion/deletion and
O(n) search) in python? For example, to make things like reversing
part of the list with a constant time.
if you're interested just in reverse a collection maybe you can take a
look at the deque[0]
On Dec 19, 9:48 am, Vito 'ZeD' De Tullio zak.mc.kra...@libero.it
wrote:
Dmitry Groshev wrote:
Is there any way to use a true lists (with O(c) insertion/deletion and
O(n) search) in python? For example, to make things like reversing
part of the list with a constant time.
if you're
New submission from Ayman Elmasry elmasry.ay...@gmail.com:
I hope this topic is not completely unfitting here.
fwbackups error after backup attempt which concerned python lib:
ERROR : Traceback (most recent call last): File
/usr/lib/python2.4/site-packages/fwbackups/operations/backup.py,
Georg Brandl ge...@python.org added the comment:
Not reproducable anymore.
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9775
___
Steven Bethard steven.beth...@gmail.com added the comment:
Looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9234
___
___
Steven Bethard steven.beth...@gmail.com added the comment:
Yep, this is a documentation bug. Help is definitely intended to print to
stdout.
--
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10728
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Steven, can you go ahead and apply this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9234
___
Steven Bethard steven.beth...@gmail.com added the comment:
Applied in r87362.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9234
New submission from Grygoriy Fuchedzhy grygoriy.fuched...@gmail.com:
Please add '.svgz': '.svg.gz' map to mimetypes.suffix_map
--
components: Library (Lib)
messages: 124282
nosy: gry
priority: normal
severity: normal
status: open
title: add .svgz to mimetypes.suffix_map
type: feature
Eric Smith e...@trueblade.com added the comment:
fwbackups is a third party package. See if you can submit a bug at
http://www.diffingo.com/oss/fwbackups
--
nosy: +eric.smith
resolution: - invalid
stage: - committed/rejected
status: open - closed
Ayman Elmasry elmasry.ay...@gmail.com added the comment:
thank you
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10729
___
___
Python-bugs-list
Ezio Melotti ezio.melo...@gmail.com added the comment:
Fixed in 3.2 (r87368) and 3.1 (r87370), thanks for the patch!
--
assignee: - ezio.melotti
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker
Mark Dickinson dicki...@gmail.com added the comment:
I'll take a look at this.
--
assignee: - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9990
___
New submission from Marc Culler cul...@math.uic.edu:
In OS X tkinter the two-finger scroll generates MouseWheel events.
The following code:
bug.py
import tkinter
def mouse_wheel(event):
print('Mouse wheel event')
tk = tkinter.Tk()
list = tkinter.Listbox(tk)
list.bind('MouseWheel',
Ezio Melotti ezio.melo...@gmail.com added the comment:
The attached patch changes the following things
- assertDictContainsSubset(expected, actual, msg=None)
+ assertDictContainsSubset(subset, dictionary, msg=None)
This doesn't change the order of the args, even though the name of the method
R. David Murray rdmur...@bitdance.com added the comment:
Fixed in r87372.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10728
R. David Murray rdmur...@bitdance.com added the comment:
Ayman: FYI it looks like you are trying to run the program on a Python version
older than what it requires (the delete keyword for NamedTemporaryFile was
introduced in version 2.6, as you can find out by looking it up in the python
Kevin Hendricks kevin.hendri...@sympatico.ca added the comment:
Same problem exists in Python 3.1.3 and in later versions as well.
Same patch should also work.
--
versions: +Python 3.1, Python 3.2
___
Python tracker rep...@bugs.python.org
Georg Brandl ge...@python.org added the comment:
If Michael and Raymond reach a consensus, this can go in before beta2.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10573
R. David Murray rdmur...@bitdance.com added the comment:
What are the media types, and are they registered with IANA? A citation from
http://www.isi.edu/in-notes/iana/assignments/media-types will be needed in
order for this addition to happen if they are not x- types.
I checked out of
Oren Held o...@held.org.il added the comment:
Just adding some info:
This bug is not Solaris-specific; I reproduced it on HP-UX 11.31.
On Python 2.6.4, thread_test.py fails with the same RunTime error exception.
On Python 2.6.6, it passes and things look good.
--
nosy: +Oren_Held
Senthil Kumaran orsent...@gmail.com added the comment:
In the morning, I had a comment on the patch wondering why read _MAXLENGH + 1
and then check for len of header _MAXLENGH. Instead of just reading _MAXLENGH
(and if the length matched rejecting). ( Looks like it did not go through).
I
Georg Brandl ge...@python.org added the comment:
Looks fine, David, do you want to commit?
--
assignee: ronaldoussoren - r.david.murray
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10404
Changes by R. David Murray rdmur...@bitdance.com:
--
assignee: - ronaldoussoren
components: +Macintosh -Tkinter
nosy: +ned.deily, ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10731
Changes by R. David Murray rdmur...@bitdance.com:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10731
___
___
Grygoriy Fuchedzhy grygoriy.fuched...@gmail.com added the comment:
I'm not sure we are talking about the same table. I don't see .mp4 there.
suffix_map = {
'.tgz': '.tar.gz',
'.taz': '.tar.gz',
'.tz': '.tar.gz',
'.tbz2': '.tar.bz2',
}
*.svgz is gzipped
R. David Murray rdmur...@bitdance.com added the comment:
Committed to py3k in r87374, 3.1 in r87375, and 2.7 in r87376.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
You are correct, I misread your message. However, my point still stands. .svg
is not a file extension that appears in the types_map table, so adding the line
you request to the suffix_map table is not something we would do by itself.
Georg Brandl ge...@python.org added the comment:
Committed in r87378.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10723
___
Grygoriy Fuchedzhy grygoriy.fuched...@gmail.com added the comment:
*.svg and *.svgz files have image/svg+xml media type.
I have following in /etc/mime.types
callisto ~ $ grep svg /etc/mime.types
image/svg+xml svg svgz
--
Antoine Pitrou pit...@free.fr added the comment:
Partially backported in r87382 (3.1) and r87383 (2.7). Not everything could be
merged in because of HTTP 0.9 support and (in 2.7) a slightly different
architecture. Thank you.
--
stage: patch review - committed/rejected
status: open -
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
These three changes look fine.
The argument order for assertDictContainsSubset is problematic (doesn't match
its own name and doesn't match the order for other __contains__ methods
elsewhere in Python), but it's too late
R. David Murray rdmur...@bitdance.com added the comment:
Committed in r87384.
Barry, I've added you as nosy in case you disagree with this fix. The
essential point is that before, parseaddr would turn 'merwok w...@example.com'
into 'merwok...@example.com', and now it preserves the
Michael Foord mich...@voidspace.org.uk added the comment:
The argument order doesn't match the name (which isn't a huge deal I don't
think) - but subset in dict does match the element in container order of
assertIn.
--
___
Python tracker
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
There's no rush on this one.
There desired properties are:
* separate content from presentation
* validated CSS and HTML
* simple CSS so that people can *easily* customize it
* possibly offer two premade stylesheets
1) a
New submission from Antoine Pitrou pit...@free.fr:
In getargs.c, in addcleanup_convert(), PyCapsule_SetContext() is called with a
second argument int (*destr)(PyObject*,void*), but it really expects a void
(*PyCapsule_Destructor)(PyObject *).
I'm not sure it's a good idea, although the ABI may
Martin v. Löwis mar...@v.loewis.de added the comment:
I fail to see the problem. The context is a plain void*, not (necessarily) a
function pointer, and getargs uses it with the same type it put in. Why do you
think PyCapsule_Destructor is of relevance?
--
R. David Murray rdmur...@bitdance.com added the comment:
This media type does not appear in the official IANA registry. Has it not yet
been officially approved? If you want to argue that its use is common enough
and its approval immanent enough (I do see that it has been submitted) to
Antoine Pitrou pit...@free.fr added the comment:
I fail to see the problem. The context is a plain void*, not
(necessarily) a function pointer, and getargs uses it with the same
type it put in. Why do you think PyCapsule_Destructor is of relevance?
Woops, sorry. Apparently I messed up
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10732
___
New submission from Mitchell Model m...@acm.org:
plistlib rejects control characters found in XML plists that Apple's 'plutil
lint' accepts. I have attached my Terminal preferences as an example. (plistlib
accepts the contents of the default Terminal preferences file)
--
assignee:
R. David Murray rdmur...@bitdance.com added the comment:
Backport done in r87387 and r87388.
--
nosy: +r.david.murray
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Martin v. Löwis mar...@v.loewis.de added the comment:
This is tricky. It's clearly ill-formed XML, so I'm not sure that this needs to
be bug-compatible with Apple's implementation.
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
Ezio Melotti ezio.melo...@gmail.com added the comment:
Fixed in r87389. This can be backported to 3.1/2.7 where applicable.
--
stage: needs patch - commit review
Added file: http://bugs.python.org/file20105/issue10573.diff
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
Victor, I think you attached to the wrong issue.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10616
___
R. David Murray rdmur...@bitdance.com added the comment:
Victor, I think you attached msg123266 to the wrong issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10616
___
Changes by R. David Murray rdmur...@bitdance.com:
--
Removed message: http://bugs.python.org/msg124315
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10616
___
R. David Murray rdmur...@bitdance.com added the comment:
The approach looks good to me. I think this issue is orthogonal to #10616,
since the message here needs to be modified anyway, regardless of what happens
to the underlying issue.
--
nosy: +r.david.murray
Changes by R. David Murray rdmur...@bitdance.com:
--
versions: -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6780
___
___
Ned Deily n...@acm.org added the comment:
This is a duplicate of Issue8458. Merging the nosy lists.
--
nosy: +ned.deily
resolution: - duplicate
status: open - closed
superseder: - buildbot: test_cmd_line failure on Tiger: [Errno 9] Bad file
descriptor
Ned Deily n...@acm.org added the comment:
See also msg124254.
--
assignee: - gregory.p.smith
nosy: +gregory.p.smith, ncoghlan, pitrou
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8458
Antoine Pitrou pit...@free.fr added the comment:
Perhaps there is a race condition with cleaning up the p2c pipe from a
previous run?
This would be rather strange, since it would have a different file descriptor.
Or it means there's a bug somewgere (perhaps in subprocess, or perhaps even in
R. David Murray rdmur...@bitdance.com added the comment:
What about bytearray? Apparently that works pre-patch for at least read,
though setpassword rejects it via an assertion.
Also, the error message should be expected bytes rather than bytes
expected. Don't ask me why, that's just the
Barry A. Warsaw ba...@python.org added the comment:
On Dec 18, 2010, at 06:31 PM, R. David Murray wrote:
Barry, I've added you as nosy in case you disagree with this fix. The
essential point is that before, parseaddr would turn 'merwok w...@example.com'
into 'merwok...@example.com', and now it
Martin v. Löwis mar...@v.loewis.de added the comment:
I don't think this needs to block the beta release.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10734
___
Mitchell Model m...@acm.org added the comment:
I can see where that does make it tricky. (I also tried reading the plist after
opening the file as binary, but no luck.) The problem here, of course, is that
the only reason for the existence of this library is to read Apple's plist
files,
Terry J. Reedy tjre...@udel.edu added the comment:
I do not have much to add, but second the idea of inquiring on python-list or
the gmane mirror, especially about alternatives (other than Notepad, which is
what I started with). Happily, IDLE has nearly always worked fine on my xp
machine, so
Terry J. Reedy tjre...@udel.edu added the comment:
This issue is actually a request to add .svg to the types map and the the
abbreviation .svgz for .svg.gx to the suffix_map.
I believe Scalable Vector Graphics are well on the way to becoming *the*
standard vector graphics format for the web,
Terry J. Reedy tjre...@udel.edu added the comment:
Separate issue: from the mimetypes doc ...
MimeTypes.types_map
Dictionary mapping filename extensions to MIME types. This is initially a copy
of the global types_map defined in the module.
But on Windows, I get a *tuple*, not a dict, of two
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 87390.
It is a stretch to see this as a bugfix rather than a new feature so probably
*shouldn't* be backported to 2.7. On the other hand the fix is combined with
the fix for issue 9857 which *is* a bugfix and
Michael Foord mich...@voidspace.org.uk added the comment:
Correction, the fix is combined with the fix for issue 10611.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9857
___
New submission from Ned Deily n...@acm.org:
OS X Mach-O universal executable files often contain multiple architectures
including a combination of 32-bit and 64-bit archs, as with the newer OS X
installer variants provided on python.org. In such cases, the
platform.architecture() function
R. David Murray rdmur...@bitdance.com added the comment:
I think a variance from the policy stated in mimetypes is quite possible, and
the kind of information you provide, Terry, is a step in that direction. We
would need release manager approval, of course, since we are in Beta, but this
is
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +lemburg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10735
___
___
Python-bugs-list
Ned Deily n...@acm.org added the comment:
The attached patches for py3k (3.2+) and 2.7 correct platform.architecture() to
return the bit architecture ('32bit' or '64bit') of the running interpreter in
the default case where executable = sys.executable. The linkage string will
also contain
Changes by Ned Deily n...@acm.org:
--
keywords: +patch
Added file: http://bugs.python.org/file20106/issue10735-py3k.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10735
___
Changes by Ned Deily n...@acm.org:
Added file: http://bugs.python.org/file20107/issue10735-27.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10735
___
80 matches
Mail list logo