ANN: cssutils 0.9.7b1

2010-05-31 Thread Christof
what is it -- A Python package to parse and build CSS Cascading Style Sheets. (Not a renderer though!) about this release -- 0.9.7b1 is a beta release but quite stable now I guess... main changes 0.9.7b1 optimizes handling speed of CSSVariables *a lot*...

Sphinx 1.0 beta 2 released

2010-05-31 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm happy to announce the release of Sphinx 1.0 beta 2, the second testing preview of the new and shiny Sphinx 1.0. Please test Sphinx 1.0 with your documentation now! Several critical bugs have been found in beta 1, thanks to

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-31 Thread christian schulze
On 28 Mai, 18:09, Peter Otten __pete...@web.de wrote: christian schulze wrote: On 28 Mai, 17:12, Sebastian Bassi sba...@clubdelarazon.org wrote: On Fri, May 28, 2010 at 9:41 AM, Tino Wildenhain t...@wildenhain.de wrote: Did you consider adding a part dealing with postgresql too?

Re: xrange issue 7721

2010-05-31 Thread Martin v. Loewis
For the record, the issue you were looking at was a complaint that the documentation is incorrect. This had been fixed by correcting the documentation. I think Mark's point is that the code snippet given isn't a full replacement for xrange, since it doesn't support negative step sizes, nor does

Re: GUI programs

2010-05-31 Thread eb303
On May 30, 5:21 pm, Alf P. Steinbach al...@start.no wrote: PS: Tkinter on its own does not provide image resizing and does not on its own support common image formats like JPEG or PNG (it does support GIF). Native PNG support in tcl/tk and hence Tkinter is planned for the next release (8.6),

Re: tkinter function outout to text widget

2010-05-31 Thread eb303
On May 29, 10:51 pm, Johan Lans johan.l...@apspektakel.com wrote: Hi I'm totally new on python and I'm doing an assignement where I'm doing a class that manipulates a text. The program is also supposed to have a GUI, for which I have used tkinter. So far I have entry widgets for file names

Re: Tkinter library reference

2010-05-31 Thread eb303
On May 29, 3:11 pm, Pradeep B pradeepb...@gmail.com wrote: Do we have a standard reference library for Tkinter available? -- Pradeep Short answer: no, at least not a complete one for Tkinter itself. However, there is a complete reference for tcl/tk here: http://www.tcl.tk/man/tcl8.5/ Once

Re: Creating a single list

2010-05-31 Thread Astley Le Jasper
On May 29, 4:10 pm, superpollo ute...@esempio.net wrote: Astley Le Jasper ha scritto: This is probably a really silly question but, given the example code at the bottom, how would I get a single list? What I currently get is: ('id', 20, 'integer') ('companyname', 50, 'text')

Re: Py_single_input and the side-effects...

2010-05-31 Thread moerchendiser2k3
Hi Carl, thanks for your help!! The only foolproof way to ensure that an object has been finalized is to do it manually (i.e., provide a finalize method to releases resources). Yes, you are right, thats what I thought, too. So I wanted to manually delete the reference, but browsing the

reading help() - newbie question

2010-05-31 Thread Payal
Hi, I am trying to learn Python (again) and have some basic doubts which I hope someone in the list can address. (English is not my first language and I have no CS background except I can write decent shell scripts) When I type help(something) e.g. help(list), I see many methods like,

Re: reading help() - newbie question

2010-05-31 Thread Xavier Ho
On 31 May 2010 20:19, Payal payal-pyt...@scriptkitchen.com wrote: Hi, I am trying to learn Python (again) and have some basic doubts which I hope someone in the list can address. (English is not my first language and I have no CS background except I can write decent shell scripts) Welcome

Re: reading help() - newbie question

2010-05-31 Thread Colin J. Williams
On 31-May-10 06:19 AM, Payal wrote: Hi, I am trying to learn Python (again) and have some basic doubts which I hope someone in the list can address. (English is not my first language and I have no CS background except I can write decent shell scripts) When I type help(something) e.g.

Re: reading help() - newbie question

2010-05-31 Thread Chris Rebert
On Mon, May 31, 2010 at 3:41 AM, Xavier Ho cont...@xavierho.com wrote: On 31 May 2010 20:19, Payal payal-pyt...@scriptkitchen.com wrote: snip When I type help(something) e.g. help(list), I see many methods like, __methodname__(). Are these something special? They're very special. You can

Re: Py_single_input and the side-effects...

2010-05-31 Thread moerchendiser2k3
Hi Carl, you are right, Python still holds the last reference. I just set a dummy and thats it :) Can you tell me where did you get the information from? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Fedora and CentOS

2010-05-31 Thread Jason D
The major Red Hat based Linux distros are still shipping with Python 2.4. As a result, almost all hosting providers are running obsolete versions of Python. The big problem seems to be that amp;quot;cPanelamp;quot; and amp;quot;yumamp;quot; still use older versions of Python, and those

how to generate a csr in python?

2010-05-31 Thread holmes86
hi,everyone I want generate a Certificate signing request in python,but I don't how to realize this function.I don't find any method after read the python-openssl manual.Any help will appreciate. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter library reference

2010-05-31 Thread Pradeep B
On Mon, May 31, 2010 at 2:46 PM, eb303 eric.brunel.pragma...@gmail.com wrote: On May 29, 3:11 pm, Pradeep B pradeepb...@gmail.com wrote: Do we have a standard reference library for Tkinter available? -- Pradeep Short answer: no, at least not a complete one for Tkinter itself. However,

Re: Python and Tkinter Programming by John Grayson

2010-05-31 Thread Pradeep B
On Sat, May 29, 2010 at 7:33 PM, Kevin Walzer k...@codebykevin.com wrote: Tkinter doesn't wrap native printing API's. There are a few extensions that do it, but they are platform specific and not complete. The usual ways of printing are like this: 1. If you're outputting data from the text

parsing question

2010-05-31 Thread Mag Gam
I have a file with bunch of nfsstat -c (on AIX) which has all the hostnames, for example r1svr== Client rpc: Connection oriented calls badcalls badxids timeouts newcreds badverfs timers 0 0 0 0 0 0 0 nomem cantconn

Re: Python vs. Fedora and CentOS

2010-05-31 Thread Philip Semanchuk
On May 31, 2010, at 7:13 AM, Jason D wrote: The major Red Hat based Linux distros are still shipping with Python 2.4. As a result, almost all hosting providers are running obsolete versions of Python. The big problem seems to be that amp;quot;cPanelamp;quot; and amp;quot;yumamp;quot; still

Question about permutations (itertools)

2010-05-31 Thread Vincent Davis
As a note I am doing this in py3. I am looking for the most efficient (speed) way to produce an an iterator to of permutations. One of the problem I am having it that neither combinations nor permutations does not exactly what I want directly. For example If I want all possible ordered lists of

Re: Question about permutations (itertools)

2010-05-31 Thread Xavier Ho
list(combinations_with_replacement('01',3)) ('0', '0', '0') ('0', '0', '1') ('0', '1', '1') ('1', '1', '1') Is it possible to get combinations_with_replacement to return numbers rather than strings? (see above) list(combinations_with_replacement(range(0,2), 3)) [(0, 0, 0), (0, 0, 1),

Re: Question about permutations (itertools)

2010-05-31 Thread Peter Otten
Vincent Davis wrote: As a note I am doing this in py3. I am looking for the most efficient (speed) way to produce an an iterator to of permutations. One of the problem I am having it that neither combinations nor permutations does not exactly what I want directly. For example If I want

Re: Question about permutations (itertools)

2010-05-31 Thread Vincent Davis
On Mon, May 31, 2010 at 8:17 AM, Xavier Ho cont...@xavierho.com wrote: list(combinations_with_replacement('01',3)) ('0', '0', '0') ('0', '0', '1') ('0', '1', '1') ('1', '1', '1') Is it possible to get combinations_with_replacement to return numbers rather than strings? (see above)

Re: Question about permutations (itertools)

2010-05-31 Thread Mark Dickinson
On May 31, 3:04 pm, Vincent Davis vinc...@vincentdavis.net wrote: For example If I want all possible ordered lists of 0,1 of length 3 (0,0,0) (0,0,1) (0,1,1) (1,1,1) (1,0,1) (1,1,0) (1,0,0) I don't see a way to get this directly from the itertools. But maybe I am missing something. In

Re: parsing question

2010-05-31 Thread Tim Chase
On 05/31/2010 08:42 AM, Mag Gam wrote: I have a file with bunch of nfsstat -c (on AIX) which has all the hostnames, for example ... Is there a an easy way to parse this file according to each host? So, r1svr.Connectionless.calls=6553 r1svr.Connectionless.badcalls=0 and so on... I am

Re: Question about permutations (itertools)

2010-05-31 Thread Ulrich Eckhardt
Vincent Davis wrote: I am looking for the most efficient (speed) way to produce an an iterator to of permutations. One of the problem I am having it that neither combinations nor permutations does not exactly what I want directly. For example If I want all possible ordered lists of 0,1 of

writing numbers in binary file

2010-05-31 Thread eskandari
Hi, I am a newbie in python. I have an data.pickle file which is serialized form of an array of strings, I want to write their offsets in another binary file, so an C++ program can read and analyse them. But when I try to write offset (number) in binary file, it raise exception below in line

Re: Python vs. Fedora and CentOS

2010-05-31 Thread John Nagle
Philip Semanchuk wrote: Hi Jason, CentOS is based on RHEL SRPMs. How could it ship a more advanced version of Python than RHEL? I have CentOS 5.4 installed, and it only offers Python 2.4.3. And distrowatch.org backs this up -- the latest Python available for Centos 5.x is 2.4:

Re: writing numbers in binary file

2010-05-31 Thread MRAB
eskandari wrote: Hi, I am a newbie in python. I have an data.pickle file which is serialized form of an array of strings, I want to write their offsets in another binary file, so an C++ program can read and analyse them. But when I try to write offset (number) in binary file, it raise exception

Re: writing numbers in binary file

2010-05-31 Thread Tim Chase
On 05/31/2010 10:56 AM, eskandari wrote: But when I try to write offset (number) in binary file, it raise exception below in line offsetfile.write(offset) TypeError: argument 1 must be string or read-only buffer, not int I search the internet, find that all suggest converting number to string

Re: writing numbers in binary file

2010-05-31 Thread eskandari
On May 31, 12:30 pm, MRAB pyt...@mrabarnett.plus.com wrote: eskandari wrote: Hi, I am a newbie in python. I have an data.pickle file which is serialized form of an array of strings, I want to write their offsets in another binary file, so an C++ program can read and analyse them. But

Do you want the safety of the computer ?

2010-05-31 Thread ekr3d
Do you want the safety of the computer? Take this gift Advanced SystemCare Free 3.3.1 http://free-ekramy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Tkinter Programming by John Grayson

2010-05-31 Thread Arndt Roger Schneider
Pradeep B schrieb: On Sat, May 29, 2010 at 7:33 PM, Kevin Walzer k...@codebykevin.com wrote: Tkinter doesn't wrap native printing API's. There are a few extensions that do it, but they are platform specific and not complete. The usual ways of printing are like this: 1. If you're

passing external data to web forms

2010-05-31 Thread M L
(Note: If you just skim this and can tell me how to pass data from an external program to a web form, that's all I need, and the rest is just what I'd like to have.) This is probably extremely simple when you know what you're doing. I figured I'd see if I could find a kind soul who could give me

Re: writing numbers in binary file

2010-05-31 Thread Terry Reedy
On 5/31/2010 12:43 PM, eskandari wrote: On May 31, 12:30 pm, MRABpyt...@mrabarnett.plus.com wrote: eskandari wrote: Use the 'struct' module to convert the int to a bytestring, and remember to open the file as a binary file. Thanks alot, I have an question, if I do so, Will the second

Windows and Linux Tips

2010-05-31 Thread Pavel Haque
Hi Friends, For Windows and Linux Tips, Please Visit: www.windowsandlinuxtips.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Problems with relative imports and pep 366

2010-05-31 Thread Gabriele Lanaro
I've yet asked this question on SO, I'll copy the contents: I have a canonical file structure like that (I'm giving sensible names to ease the reading): mainpack/ __main__.py __init__.py - helpers/ __init__.py path.py - network/ __init__.py clientlib.py

Re: Inheritable Slots Metaclass

2010-05-31 Thread Aahz
In article 5a3a5737-f1b7-4419-9bb3-088c244a4...@c13g2000vbr.googlegroups.com, Carl Banks pavlovevide...@gmail.com wrote: However, Aahz will be by shortly to tell you never to use slots. Please note that there is an important distinction between don't use slots and never use slots -- if you can

RE: where are the program that are written in python?

2010-05-31 Thread Sandy Ydnas
http://en.wikipedia.org/wiki/List_of_Python_software List of Python software From Wikipedia, the free encyclopedia Jump to:navigation, search This article needs additional citations for verification. Please help improve this article by adding reliable

Spawning console and piping the stdout into it

2010-05-31 Thread Leonhard Weber
Hi, I'm stuck at a puzzle for quite some time. Situation: (Linux environment) I have a script that is invoked from an application (running my script as part of embedded python). I have no power over that application, only supply the script it executes. Now for development reasons I want that

Re: if, continuation and indentation

2010-05-31 Thread Lie Ryan
On 05/31/10 05:10, Colin J. Williams wrote: On 30-May-10 01:50 AM, Nathan Rice wrote: On 27-May-10 08:48 AM, Xavier Ho wrote: On 27 May 2010 22:22, HHhenri...@gmail.com mailto:henri...@gmail.com mailto:henri...@gmail.com

Re: passing external data to web forms

2010-05-31 Thread Tim Chase
On 05/31/2010 12:16 PM, M L wrote: Specifically, I'm needing to login to a particular website, and which username I use varies based on it being specified in the email. Are you in control of this email generation (that is, can you generate an email with an HTML form within, or is this email

Re: xrange issue 7721

2010-05-31 Thread Mark Lawrence
On 31/05/2010 09:22, Martin v. Loewis wrote: For the record, the issue you were looking at was a complaint that the documentation is incorrect. This had been fixed by correcting the documentation. I think Mark's point is that the code snippet given isn't a full replacement for xrange, since it

Re: Vote to Add Python Package pubsub to the Python Standard Library

2010-05-31 Thread Aahz
In article 6b9d2898-4166-40b4-9016-dc55dee77...@q33g2000vbt.googlegroups.com, Tom tom.brow...@gmail.com wrote: I vote for adding the Python package pubsub to the Python standard library. It has recently been added to wxpython (replacing the old wx.lib.pubsub package), but it has application to

Re: writing numbers in binary file

2010-05-31 Thread Dave Angel
eskandari wrote: On May 31, 12:30 pm, MRAB pyt...@mrabarnett.plus.com wrote: eskandari wrote: Hi, I am a newbie in python. I have an data.pickle file which is serialized form of an array of strings, I want to write their offsets in another binary file, so an C++ program can read and

Re: if, continuation and indentation

2010-05-31 Thread Colin J. Williams
On 31-May-10 17:15 PM, Lie Ryan wrote: On 05/31/10 05:10, Colin J. Williams wrote: On 30-May-10 01:50 AM, Nathan Rice wrote: On 27-May-10 08:48 AM, Xavier Ho wrote: On 27 May 2010 22:22, HHhenri...@gmail.com mailto:henri...@gmail.com

Re: Help with Regexp, \b

2010-05-31 Thread John Machin
On May 30, 1:30 am, andrew cooke and...@acooke.org wrote: That's what I thought it did...  Then I read the docs and confused empty string with space(!) and convinced myself otherwise.  I think I am going senile. Not necessarily. Conflating concepts like string containing whitespace, string

Re: GUI programs

2010-05-31 Thread Gregory Ewing
jyoun...@kc.rr.com wrote: Has anyone had any luck getting PyGUI working on Snow Leopard? I can't seem to get the blobedit example to work. I've received reports that it seems to be problematic on Snow Leopard. Unfortunately I don't have access to a Snow Leopard system at the moment to

problem with Descriptors

2010-05-31 Thread Steven W. Orr
I just discovered descriptors but what I want to do isn't working right. I hope this isn't too long. :-( Here's what I have that works: class C(object): def g(self): print dir(g):,dir(self.g) def f(self, ss): print ss = , ss cc = C() cc.ff = f.__get__(C,cc) cc.ff('Round 3') And

Error building on cygwin

2010-05-31 Thread huangqiang.zhou
Hi All: When i install wxPython on cygwin in windows xp, i get this error and can't continue... my enviroment: $ cygcheck -c cygwin Cygwin Package Information Package VersionStatus cygwin 1.7.5-1Incomplete wxPython-src-2.8.11.0 Following the

Re: Vote to Add Python Package pubsub to the Python Standard Library

2010-05-31 Thread Terry Reedy
On 5/31/2010 5:37 PM, Aahz wrote: In article6b9d2898-4166-40b4-9016-dc55dee77...@q33g2000vbt.googlegroups.com, Tomtom.brow...@gmail.com wrote: I vote for adding the Python package pubsub to the Python standard library. It has recently been added to wxpython (replacing the old wx.lib.pubsub

What timeouts are required when reading SSL certificates with Python 2.6.4?

2010-05-31 Thread John Nagle
I'm converting some M2Crypto code to use the new ssl module, and I'm concerned about protection against hung machines at the remote end. With M2Crypto, getting timeout to work properly required much tweaking. Here's the code. I've tried it on about fifteen domains, some of which support

Re: What timeouts are required when reading SSL certificates with Python 2.6.4?

2010-05-31 Thread John Nagle
Is bug #5103 relevant here? The one about the 30-minute connection hang? http://bugs.python.org/issue5103 John Nagle John Nagle wrote: I'm converting some M2Crypto code to use the new ssl module, and I'm concerned about protection against

[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses

2010-05-31 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What operating system is this on? What exact Python version are you using? I can't reproduce this with r81614 on Linux. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue8859] split() splits on non whitespace char when ther is no separator given.

2010-05-31 Thread Peter Landgren
Peter Landgren peter.tal...@telia.com added the comment: So as a summary to what Ezio Melotti said: I should always specify encoding when calling split() to be sure nothing nasty happens? (Belive Ezio Melotti meant calling split() not calling unicode() in his last answer?) Thanks for pointing

[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses

2010-05-31 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'm not seeing this either, on SuSE Linux 10.3/amd64: Python 3.2a0 (py3k:81616, May 31 2010, 10:05:21) [GCC 4.2.1 (SUSE Linux)] on linux2 Type help, copyright, credits or license for more information. import socket [55247 refs]

[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses

2010-05-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This is under Mandriva Linux 2010.1 (release candidate). Python 3.2a0 (py3k:81616, May 31 2010, 12:40:34) [GCC 4.4.3] on linux2 It seems ENABLE_IPV6 isn't defined: $ grep IPV6 pyconfig.h 32:/* #undef ENABLE_IPV6 */ Yet AF_INET6 is defined and

[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses

2010-05-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The problem was solved after running configure again. Sorry. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8858

[issue1491] BaseHTTPServer incorrectly implements response code 100

2010-05-31 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1491 ___ ___ Python-bugs-list mailing

[issue1777412] Python's strftime dislikes years before 1900

2010-05-31 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1777412 ___ ___ Python-bugs-list mailing

[issue8793] IDLE crashes on opening invalid file

2010-05-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: When running IDLE in a console, I get the error: Exception in Tkinter callback Traceback (most recent call last): File c:\prod\python\lib\lib-tk\Tkinter.py, line 1410, in __call__ return self.func(*args) File

[issue7879] Too narrow platform check in test_datetime

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: - 26backport committed in r81618. - merged to release31-maint in r81619. The skipIf patch blocked from release26-maint (skipIf is new in 2.7) and merged into release31-maint in r81620. -- stage: commit review -

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Alexander Belopolsky
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: From issue1289118, msg106389: from datetime import timedelta as d [d(microseconds=i + .5)//d.resolution for i in range(-10,10)] [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Should this be

[issue8857] socket.getaddrinfo needs tests

2010-05-31 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: About the doc patch: I like the word Resolves more than Translate. Resolves implies possible network activity to me. Translate sounds like it's just a change in representation. Of course, things like `AI_NUMERICHOST`

[issue8857] socket.getaddrinfo needs tests

2010-05-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the comments. Other functions use translate too (gethostbyname, getservbyname, etc.), so I preferred to keep it for consistency. I've now committed the doc patch. -- ___ Python tracker

[issue6771] Curses.wrapper: documentation/implementation error

2010-05-31 Thread July Tikhonov
July Tikhonov july.t...@gmail.com added the comment: I think, since curses.wrapper is actually a function (and module named curses.wrapper cannot be trivially accessed), we can just modify docs, stripping out any mentions of module, instead documenting the function. We can leave the module

[issue6560] socket sendmsg(), recvmsg() methods

2010-05-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Would you like to upload your patch to http://codereview.appspot.com/? It would make reviewing easier. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560

[issue8861] curses.wrapper : unnessesary code

2010-05-31 Thread July Tikhonov
New submission from July Tikhonov july.t...@gmail.com: wrapper() code in Lib/curses/wrapper.py has an unnesesary line: res = None This variable is not used anywhere else in wrapper(). Inspecting the history of trunk, we can see that it was used used as a result of applying func(), but

[issue8862] curses.wrapper does not restore terminal if curses.getkey() gets KeyboardInterrupt

2010-05-31 Thread July Tikhonov
New submission from July Tikhonov july.t...@gmail.com: Run test.py (below) in terminal, and interrupt it with Ctrl-C. Result: terminal settings are not restored (checked with linux console and xterm, with Python 2.7 and 3.2). # test.py # Broke it with KeyboardInterrupt import curses def

[issue1289118] timedelta multiply and divide by floating point

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in r81625. Fixed white space and added a note to new in 3.2 section of the RST doc. -- resolution: - accepted stage: commit review - committed/rejected status: open - closed

[issue8863] Segfault handler: display Python backtrace on segfault

2010-05-31 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Attached patch implements an handler for the signal SIGSEGV. It uses its own stack to be able to allocate memory on the stack (eg. call a function), even on stack overflow. The patch requires sigaction() and sigaltstack()

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Here is a shorter example of inconsistent behavior: 0.5 * timedelta(microseconds=1) datetime.timedelta(0) timedelta(microseconds=0.5) datetime.timedelta(0, 0, 1) -- ___

[issue8863] Segfault handler: display Python backtrace on segfault

2010-05-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #3999: a similar patch to raise an exception on segfault. This patch was rejected because Python internal state may be corrupted, and we cannot guarantee that next instructions will be executed correctly. This patch

[issue3999] Real segmentation fault handler

2010-05-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: That's fine, but please provide a link to the new issue once you create it. Done: issue #8863. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3999

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Does this need to be brought up on python-dev for acceptance? -- nosy: +mark.dickinson stage: unit test needed - patch review versions: +Python 3.2 -Python 2.7 ___ Python

[issue5023] Segfault in datetime.time.strftime(%z)

2010-05-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5023 ___

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I agree it would be nice to fix this. We could either (1) alter delta_new so that the final round uses round-to-nearest; this would give the desired behaviour in most cases, but there would still be a small possibility of rounding going

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-05-31 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: This doesn't appear to be at all controversial; I don't think it's necessary to consult python-dev. (I haven't looked at the patch, though.) -- ___ Python tracker rep...@bugs.python.org

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Aargh! No, I take that back. round() also does round-half-away-from-zero, of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8860

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a first stab at a patch. It still needs tests. -- keywords: +patch Added file: http://bugs.python.org/file17508/issue8860.patch ___ Python tracker rep...@bugs.python.org

[issue8318] Deprecation of multifile inappropriate or incomplete

2010-05-31 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: For the sake of completeness: the Zope2 trunk and its current stable branch now no longer use the multifile module, thanks to the following patch: http://svn.zope.org/Zope/trunk/src/OFS/tests/testRanges.py?rev=110704r1=110402r2=110704

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2010-05-31 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: The attached patch adds Mark's examples to test_pickle as a failing test. -- nosy: +tseaver Added file: http://bugs.python.org/file17509/issue1692335-tests.patch ___ Python tracker

[issue5023] Segfault in datetime.time.strftime(%z)

2010-05-31 Thread Philipp Gortan
Philipp Gortan mephi...@gmx.net added the comment: @belopolsky: unittest exists, /usr/lib/python2.6/test/test_datetime.py as mentioned by the OP, this unittest reproduces the issue. -- ___ Python tracker rep...@bugs.python.org

[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-05-31 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: There is apparently a regression on ^/trunk with multiprocessing on solaris10-x86 today. (used to work a few weeks before) cc -Kpic -OPT:Olimit=0 -g -DNDEBUG -O -IModules/_multiprocessing -I. -IInclude -I./Include

[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-05-31 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Platforms affected: SunOS ginsu 5.10 Generic_125101-10 i86pc i386 i86pc SunOS nail 5.8 Generic_117350-55 sun4u sparc SUNW,Sun-Fire-280R Compiler used: bash-2.03$ which cc /opt/SUNWspro/bin//cc bash-2.03$ cc -V

[issue8865] select.poll is not thread safe

2010-05-31 Thread Christian Schubert
New submission from Christian Schubert b...@apexo.de: invoking select.poll.poll() concurrently from multiple threads frequently yields garbage in one thread: while poll_poll in thread 1 is parsing its result, another thread 2 calling poll may overwrite revents; assuming poll_result was 1 in

[issue8865] select.poll is not thread safe

2010-05-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Do you have a script that reproduces it? -- assignee: d...@python - components: -Documentation nosy: +pitrou versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker

[issue8866] socket.getaddrinfo() should support keyword arguments

2010-05-31 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: As of now socket.getaddrinfo() only supports positional arguments, so that if I want to, say, specify flags argument I'm forced to specify 0 for other missing arguments: socket.getaddrinfo(www.python.org, 0, 0, 0, socket.SOL_TCP) [(2,

[issue8866] socket.getaddrinfo() should support keyword arguments

2010-05-31 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: ...also, the returning tuples could be named tuples instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8866 ___

[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-05-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +movement, zooko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8864 ___ ___ Python-bugs-list

[issue8867] serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues

2010-05-31 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: If you do a 'make serve' in the docs directory (after doing a make html, of course) and try to open the What's New link in the served doc pages, the following error results: ValueError: Unicode data must contain only code points

[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-05-31 Thread John Levon
John Levon movem...@users.sourceforge.net added the comment: This appears to be one of the few cases where there's incompatibilities between different versions of the standards. Old BSD sockets use msg_accrights*, whereas the more modern way is msg_control* pointing to a struct cmsghdr. In

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed in r81632. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845

[issue7583] Improve explanation of tab expansion in doctests

2010-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: In the absence of feedback about the doc patch, I have applied it in r81634. @techtonic: if I recall correctly I explained in your issue that had the patch what the problem was. Short summary: there are two equally valid ways in which

[issue5023] Segfault in datetime.time.strftime(%z)

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Philipp, Why do you think you see the same problem as Eric? Can you set a trace on tuple and see when it gets modified? Do you see the crash with zone_failure.py, test_datetime.py or both? --

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Mark (2) seems like overkill to me. I agree, however it would be interesting to figure out when accumulated errors can produce an inaccurate result. ISTM that leftover is the sum of up to 7 doubles each between 0 and 1

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-05-31 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I wonder if it would be justified to expose something like int _PyLong_IsOdd(PyObject *self) { PyLongObject *lo = (PyLongObject *)self; return Py_SIZE(lo) != 0 ((lo-ob_digit[0] 1) != 0); } in longobject.h?

[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-05-31 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Defining _XPG4_2 is surely the wrong thing to do, right? It's an internal flag only, not meant to be used by applications. -- ___ Python tracker rep...@bugs.python.org