emacs lisp text processing example (html5 figure/figcaption)

2011-07-04 Thread Xah Lee
OMG, emacs lisp beats perl/python again! Hiya all, another little emacs lisp tutorial from the tiny Xah's Edu Corner. 〈Emacs Lisp: Processing HTML: Transform Tags to HTML5 “figure” and “figcaption” Tags〉 xahlee.org/emacs/elisp_batch_html5_tag_transform.html plain text version follows.

Re: Problem!!

2011-07-04 Thread TheSaint
Irmen de Jong wrote: No, I misplaced my crystal ball. I'm waiting mine, brand new in HD :D, with remote control :D :D -- goto /dev/null -- http://mail.python.org/mailman/listinfo/python-list

Re: The end to all language wars and the great unity API to come!

2011-07-04 Thread Gregory Ewing
rantingrick wrote: I agree however i see merit in both approaches. But why must we have completely different languages just for that those two approaches? We have different languages because different people have different ideas about what a language should be like. Ruby people like user

Re: Why won't this decorator work?

2011-07-04 Thread Gregory Ewing
OKB (not okblacke) wrote: A decorator basically modifies a function/method, so that ALL subsequent calls to it will behave differently. Furthermore, usually a decorator is used when for some reason you *can't* achieve the same effect with code inside the function itself. For example,

HeaderParseError

2011-07-04 Thread Thomas Guettler
Hi, I get a HeaderParseError during decode_header(), but Thunderbird can display the name. from email.header import decode_header decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=') Traceback (most recent call last): File stdin, line 1, in module File

Re: Implicit initialization is EVIL!

2011-07-04 Thread Gregory Ewing
rantingrick wrote: Unlike most GUI libraries the Tkinter developers thought is would just wonderful if the root GUI window just sprang into existence if the programmer somehow forgot to create one. IMO the real problem here is the existence of a privileged root window at all. No GUI platform

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Mon, Jul 4, 2011 at 6:33 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: rantingrick wrote: Unlike most GUI libraries the Tkinter developers thought is would just wonderful if the root GUI window just sprang into existence if the programmer somehow forgot to create one. IMO the real

Re: Virtual functions are virtually invisible!

2011-07-04 Thread Gregory Ewing
rantingrick wrote: what concerns me is the fact that virtual methods in derived classes just blend in to the crowd. I think we really need some sort of visual cue in the form of forced syntactical notation (just like the special method underscores). If you're suggesting that it should be

Re: Problem!!

2011-07-04 Thread Gregory Ewing
TheSaint wrote: On 4-7-2011 1:41, amir chaouki wrote: No, I misplaced my crystal ball. I'm waiting mine, brand new in HD :D, with remote control :D :D The new digital models are great. But there's a distressing tendency for visions to come with DRM protection these days, so you can only

Re: web hosting, first hand experiences?

2011-07-04 Thread Daniel Fetchinson
Hi folks, I know this comes up regularly but the thing is that the quality of service changes also quite regularly with many of the hosting companies. What's currently the best option for shared hosting of a turbogears application? I'm thinking of dreamhost and webfaction does anyone have any

Re: HeaderParseError

2011-07-04 Thread Peter Otten
Thomas Guettler wrote: I get a HeaderParseError during decode_header(), but Thunderbird can display the name. from email.header import decode_header decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=') Traceback (most recent call last): File stdin,

Sending email in python

2011-07-04 Thread vijay swaminathan
Hi All, I read through the smtplib and email modules of python and have come up with a simple program to send a email as an attachment. This module sends out an email but not as an attachment but in the body of the email. Any problem with this code? any insight would be greatly appreciated.

Re: HeaderParseError

2011-07-04 Thread Thomas Guettler
On 04.07.2011 11:51, Peter Otten wrote: Thomas Guettler wrote: I get a HeaderParseError during decode_header(), but Thunderbird can display the name. from email.header import decode_header decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=') Traceback

Re: HeaderParseError

2011-07-04 Thread Peter Otten
Thomas Guettler wrote: On 04.07.2011 11:51, Peter Otten wrote: Thomas Guettler wrote: I get a HeaderParseError during decode_header(), but Thunderbird can display the name. from email.header import decode_header

ONLY FOR MEN`

2011-07-04 Thread SAHITHI
FOR FAST UPDATED IN TELUGU FILM INDUSTRY http://allyouwants.blogspot.com/ PRIYAMANI SPICY PHOTOS IN COW GIRL http://allyouwants.blogspot.com/2011/02/priyamani-spicy-photo-shoot-cow-girl.html KAJAL HOT PHOTOS IN SAREE

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 3:33 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: IMO the real problem here is the existence of a privileged root window at all. No GUI platform I know of has any such concept (except for a desktop window that represents the whole screen, which is not the same thing). All

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 3:44 am, Chris Angelico ros...@gmail.com wrote: I don't know Tkinter, but from the look of the example code, he's creating a Label that's not attached to a window, and then packing it into nothing. The toolkit kindly creates him a window. Is that the root GUI window that he means? A

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 1:19 AM, rantingrick rantingr...@gmail.com wrote: But let's dig a little deeper here. Your comment suggests that you personally need to create multiple windows for your applications. Is this correct? If so i pity any users of such application as they would be thoroughly

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 10:40 am, Chris Angelico ros...@gmail.com wrote: Uhh, sorry. No. There are plenty of good reasons for one application to make multiple top-level windows, and if I ever find myself using a toolkit that makes this difficult, I'll either be hacking the toolkit or using a different one.

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
oops. should have used symmetric_difference! a.symmetric_difference(b) set(['_w', '_setup', 'report_callback_exception', '_do', '__getattr__', 'loadtk', '_loadtk', 'readprofile']) -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 1:46 AM, rantingrick rantingr...@gmail.com wrote: On Jul 4, 10:40 am, Chris Angelico ros...@gmail.com wrote: Uhh, sorry. No. There are plenty of good reasons for one application to make multiple top-level windows, and if I ever find myself using a toolkit that makes

Re: The end to all language wars and the great unity API to come!

2011-07-04 Thread rantingrick
On Jul 4, 12:06 am, alex23 wuwe...@gmail.com wrote: rantingrick rantingr...@gmail.com wrote: But why must we have completely different languages just for that those two approaches? Because monocultures die. That's an interesting statement Alex (even though you parrot it constantly). So

Re: Anyone want to critique this program?

2011-07-04 Thread OKB (not okblacke)
John Salerno wrote: On Jul 3, 1:06 pm, OKB (not okblacke) brennospamb...@nobrenspambarn.net wrote: Yeah, I considered that, but I just hate the way it looks when the line wraps around to the left margin. I wanted to line it all up under the opening quotation mark. The wrapping may not

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 11:01 am, Chris Angelico ros...@gmail.com wrote: On Tue, Jul 5, 2011 at 1:46 AM, rantingrick rantingr...@gmail.com wrote: On Jul 4, 10:40 am, Chris Angelico ros...@gmail.com wrote: Uhh, sorry. No. There are plenty of good reasons for one application to make multiple top-level

Re: The end to all language wars and the great unity API to come!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 2:35 AM, rantingrick rantingr...@gmail.com wrote: I believe (unlike most people) that nature is striving for perfection NOT for diversity. Diversity is just a byproduct of feeble attempts to GUESS the correct answer. Here is a thought exercise for the advanced

Re: Anyone want to critique this program?

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 2:37 AM, OKB (not okblacke) brennospamb...@nobrenspambarn.net wrote:        Well, what I'm saying is I use an editor that lets me make the lines as long as I want, and it still wraps them right, so I never explicitly hit enter to break a line except at the end of a string

i have configured proxy but fiddler can't capture python's network requests

2011-07-04 Thread 成都七中2002级7班_大家都是天才~
here's my code. I've change the port from to . import urllib2 proxy_support = urllib2.ProxyHandler({'http':'http://127.0.0.1:'}) opener = urllib2.build_opener(proxy_support, urllib2.HTTPHandler) urllib2.install_opener(opener) content = urllib2.urlopen('http://www.google.com').read()

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 3:09 AM, rantingrick rantingr...@gmail.com wrote: On Jul 4, 11:01 am, Chris Angelico ros...@gmail.com wrote: This is not a modal dialog; it's not even a modeless dialog - it's a completely stand-alone window that can be moved around the Z order independently of the

[RELEASED] Python 3.2.1 rc 2

2011-07-04 Thread Georg Brandl
On behalf of the Python development team, I am pleased to announce the second release candidate of Python 3.2.1. Python 3.2.1 will the first bugfix release for Python 3.2, fixing over 120 bugs and regressions in Python 3.2. For an extensive list of changes and features in the 3.2 line, see

Re: i have configured proxy but fiddler can't capture python's network requests

2011-07-04 Thread Chris Angelico
2011/7/5 成都七中2002级7班_大家都是天才~ liu.liuwei@gmail.com: 2. If I open fiddler, everything works great. But I can't see the traffic in fiddler. And if I change port from to any other number, it works find too. It sounds to me like the traffic's going through fiddler, but you're just not

Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
Using Python 2.6 on ubuntu 10.04. inspect module : I want to 'inspect' a module and get a list of all functions, classes and global variables in that module. ## A module has been imported, and we call `getmembers' members = inspect.getmembers(mod) ## While iterating thru `members', we test to

Re: emacs lisp text processing example (html5 figure/figcaption)

2011-07-04 Thread S.Mandl
Nice. I guess that XSLT would be another (the official) approach for such a task. Is there an XSLT-engine for Emacs? -- Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 12:41 pm, Chris Angelico ros...@gmail.com wrote: For another example, look at where web browsers are going. By your description, one instance of a browser should work with precisely one document (which in this case would be a web page). That's how browsers were in the early days,

Re: Testing if a global is defined in a module

2011-07-04 Thread rantingrick
On Jul 4, 1:11 pm, Tim Johnson t...@johnsons-web.com wrote: Using Python 2.6 on ubuntu 10.04. inspect module : I want to 'inspect' a module and get a list of all functions, classes and global variables in that module. ## A module has been imported, and we call `getmembers' members =

Re: Compiling Python 3.2 on Cygwin fails

2011-07-04 Thread Aly Tawfik
On Jun 20, 12:44 pm, sewpafly sewpa...@gmail.com wrote: I was able to a little further by changing 2 lines in Makefile.pre.in. On line 170, changed:     DLLLIBRARY= @DLLLIBRARY@ to:     DLLLIBRARY= libpython$(VERSION).dll On line 509 it had:     $(DLLLIBRARY) libpython$(VERSION).dll.a:

Re: Compiling Python 3.2 on Cygwin fails

2011-07-04 Thread Aly Tawfik
On Jun 20, 12:44 pm, sewpafly sewpa...@gmail.com wrote: I was able to a little further by changing 2 lines in Makefile.pre.in. On line 170, changed:     DLLLIBRARY= @DLLLIBRARY@ to:     DLLLIBRARY= libpython$(VERSION).dll On line 509 it had:     $(DLLLIBRARY) libpython$(VERSION).dll.a:

Re: [Python-ideas] Allow isinstance second argument to be a set of types

2011-07-04 Thread MRAB
On 04/07/2011 20:41, Amaury Forgeot d'Arc wrote: Hi, 2011/7/4 Antoine Pitrousolip...@pitrou.net: Le lundi 04 juillet 2011 à 10:52 -0700, Gregory P. Smith a écrit : note that a fast lookup implies exact type and not subclass making my point silly... at which point you're back to iterating so I

Re: [Python-ideas] Allow isinstance second argument to be a set of types

2011-07-04 Thread Chris Rebert
On Mon, Jul 4, 2011 at 12:53 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 04/07/2011 20:41, Amaury Forgeot d'Arc wrote: Le lundi 04 juillet 2011 à 10:52 -0700, Gregory P. Smith a écrit : note that a fast lookup implies exact type and not subclass making my point silly... at which point

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* rantingrick rantingr...@gmail.com [110704 12:00]: On Jul 4, 1:11 pm, Tim Johnson t...@johnsons-web.com wrote: Well if you follow the python style guide (and most accepted styles for global notation) then it's a trial exercise. You don't even have to import anything!!! :) GLOBAL_STR =

Re: Testing if a global is defined in a module

2011-07-04 Thread Chris Rebert
On Mon, Jul 4, 2011 at 11:11 AM, Tim Johnson t...@johnsons-web.com wrote: Using Python 2.6 on ubuntu 10.04. inspect module : I want to 'inspect' a module and get a list of all functions, classes and global variables in that module. You meant first defined in that module. snip Example, for a

Re: Testing if a global is defined in a module

2011-07-04 Thread rantingrick
On Jul 4, 3:30 pm, Tim Johnson t...@johnsons-web.com wrote:   Thanks for the reply: *but*   dir(targetmodule) will also show globals from other modules imported   by the target module. So I would need a way to distinguish between   those imported and those defined in targetmodule Okay, then

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Chris Rebert c...@rebertia.com [110704 13:16]: What else can I do here? Look at the names in the module's import statements using the `ast` module, and exclude those from the set of names defined in the module. Won't work for `from foo import *`, but that's bad practice and should be

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 5:30 AM, rantingrick rantingr...@gmail.com wrote: Umm, if you want to see where things are going you should learn about the inner workings of chrome which actually spawns a new process for every tab created; which has the benefit of avoiding application lock up when one

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* rantingrick rantingr...@gmail.com [110704 13:47]: On Jul 4, 3:30 pm, Tim Johnson t...@johnsons-web.com wrote:   Thanks for the reply: *but*   dir(targetmodule) will also show globals from other modules imported   by the target module. So I would need a way to distinguish between  

Re: Testing if a global is defined in a module

2011-07-04 Thread Steven D'Aprano
Tim Johnson wrote: dir(targetmodule) will also show globals from other modules imported by the target module. So I would need a way to distinguish between those imported and those defined in targetmodule Why would you want to do that? Importing *is* a definition in targetmodule.

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Steven D'Aprano steve+comp.lang.pyt...@pearwood.info [110704 15:18]: You are mistaken. TestAddresses is *not* a member of an imported module. It is a member of the current module, which may or may not happen to point to the same object as the other module as well. You are correct. I

Re: The end to all language wars and the great unity API to come!

2011-07-04 Thread Steven D'Aprano
rantingrick wrote: On Jul 4, 12:06 am, alex23 wuwe...@gmail.com wrote: rantingrick rantingr...@gmail.com wrote: But why must we have completely different languages just for that those two approaches? Because monocultures die. That's an interesting statement Alex (even though you parrot

Re: Problem!!

2011-07-04 Thread Steven D'Aprano
amir chaouki wrote: the problem is when i use the seek function on windows it gives me false results What do you mean false results? What does this even mean? Please show us: * what you do * what result you expect * what result you actually get -- Steven --

Re: Testing if a global is defined in a module

2011-07-04 Thread Steven D'Aprano
Tim Johnson wrote: It seems to me that your approach here is unnecessarily complex and fragile. I don't know what problem you are trying to solve, but trying to solve it by intraspecting differences that aren't differences is surely the wrong way to do it. See my last post... Yes, but

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Steven D'Aprano steve+comp.lang.pyt...@pearwood.info [110704 15:48]: Tim Johnson wrote: It seems to me that your approach here is unnecessarily complex and fragile. I don't know what problem you are trying to solve, but trying to solve it by intraspecting differences that aren't

Re: Anyone want to critique this program?

2011-07-04 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: In this instance, I believe the OP was paragraphing his text. What is “paragraphing”? Is there a convenient way to do that in a triple-quoted string? Did I answer this earlier in the thread (also at

Re: Testing if a global is defined in a module

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 10:01 AM, Tim Johnson t...@johnsons-web.com wrote:  Steven, I'm building a documentation system. I have my own MVC framework  and the goal is to have a documentation module for each project. Is there a reason for not using Doxygen / Autodoc / etc, or at least something

Re: Problem!!

2011-07-04 Thread Dan Stromberg
It turned out that switching to binary I/O made seek do what he was expecting. I'm guessing the transparent crlf to lf conversions in windows text I/O get seek() a bit perplexed, because it transparently changes the number of bytes. On Mon, Jul 4, 2011 at 4:30 PM, Steven D'Aprano

Re: Anyone want to critique this program?

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 10:03 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: In this instance, I believe the OP was paragraphing his text. What is “paragraphing”? If you look at the original code, you'll see embedded newlines used to create multiple

Re: Testing if a global is defined in a module

2011-07-04 Thread Tim Johnson
* Chris Angelico ros...@gmail.com [110704 16:19]: On Tue, Jul 5, 2011 at 10:01 AM, Tim Johnson t...@johnsons-web.com wrote:  Steven, I'm building a documentation system. I have my own MVC framework  and the goal is to have a documentation module for each project. Is there a reason for

Re: Problem!!

2011-07-04 Thread Dave Angel
On 01/-10/-28163 02:59 PM, amir chaouki wrote: the problem is when i use the seek function on windows it gives me false results other then the results on *ux. the file that i work with are very large about 10mb. If you still care about this problem, you should take some of the other

Re: The end to all language wars and the great unity API to come!

2011-07-04 Thread alex23
rantingrick rantingr...@gmail.com wrote: I believe (unlike most people) that nature is striving for perfection Your belief is wrong. Nature doesn't strive for _anything_. Things in the world are either fit enough to continue their existence or not. As circumstances change, some things that were

Re: Testing if a global is defined in a module

2011-07-04 Thread Ian Kelly
On Mon, Jul 4, 2011 at 6:01 PM, Tim Johnson t...@johnsons-web.com wrote: Yes, but what are you actually *trying to do*? Detecting data members is not an end in itself. Why do you think you need to detect data members?  Steven, I'm building a documentation system. I have my own MVC framework  

Re: from module import * using __import__?

2011-07-04 Thread Gabriel Genellina
En Sat, 02 Jul 2011 16:52:11 -0300, Dan Stromberg drsali...@gmail.com escribió: Is there a decent way of running from variable import *? Perhaps using __import__? Does it mean using the copy module or adding an element to globals() somehow? Yes, I think I do have a good use for this:

[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python

2011-07-04 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 06cb0d602468 by Ned Deily in branch '2.7': Issue #8716: Fix errors in the non-OS X path of the 27 backport. http://hg.python.org/cpython/rev/06cb0d602468 -- status: pending - open ___

[issue12043] Update shutil documentation

2011-07-04 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12043 ___ ___ Python-bugs-list

[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python

2011-07-04 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing

[issue12470] Fix cutpaste typo in test_shutil

2011-07-04 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: This can be closed? -- assignee: - orsenthil nosy: +georg.brandl, orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12470 ___

[issue12470] Fix cutpaste typo in test_shutil

2011-07-04 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12470 ___

[issue12484] The Py_InitModule functions no longer exist, but remain in the docs

2011-07-04 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12484 ___ ___ Python-bugs-list

[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-07-04 Thread Nicolas Estibals
Nicolas Estibals nicolas.estib...@gmail.com added the comment: Thanks for your help and the interesting discussion with this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___

[issue12411] cgi.parse_multipart is broken on 3.x

2011-07-04 Thread Tal Einat
Tal Einat talei...@gmail.com added the comment: The patch seems broken to me. In cgi.parse_multipart(), the 'boundary' variable can be a string even though it is concatenated to bytes. Its default value is a string, and a string can be given via the pdict argument. There is no validity check

[issue12156] test_multiprocessing.test_notify_all() timeout (1 hour) on FreeBSD 7.2

2011-07-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Another recent hang: http://www.python.org/dev/buildbot/all/builders/x86%20FreeBSD%207.2%203.x/builds/1951/steps/test/logs/stdio [296/356/3] test_multiprocessing Timeout (1:00:00)! Thread 0x28402be0: File

[issue12467] test_threading.test_6_daemon_threads(): Assertion failed: PyUnicode_Check(*filename), file ..\Python\_warnings.c, line 501

2011-07-04 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12467 ___

[issue12471] wrong TypeError message on '%i' formatting

2011-07-04 Thread Renaud Blanch
Renaud Blanch rndbl...@gmail.com added the comment: that was quick! just a question: is it worth backporting the fix to 2.7? if this helps, here is a backport for the patch commited to 3.2 http://hg.python.org/cpython/rev/97707459bb5a -- Added file:

[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-07-04 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset a624b86264a4 by Victor Stinner in branch '2.7': Issue #12429: Skip interrupted write tests on FreeBSD = 7 http://hg.python.org/cpython/rev/a624b86264a4 New changeset e924e51e9447 by Victor Stinner in branch '3.2': Issue #12429: Skip

[issue12487] urllib2.urlopen() returns object missing context manager

2011-07-04 Thread Peter Schuller
New submission from Peter Schuller peter.schul...@infidyne.com: The documentation states it returns a file-like object. In Python 2.5+ I expect such file-like objects to have a context manager for use with the with statement. In my particular use-case, the lack comes from urllib.addinfourl

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: In order to have a basis for discussion, I've set up a repo at http://hg.python.org/features/pep-3118#memoryview with an implementation of PyManagedBuffer. The whole test suite passes, also with refleak counting and Valgrind.

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file22564/bbe70ca4e0e5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Nick Coghlan rep...@bugs.python.org wrote: The reason redirecting all requests to the underlying object doesn't work is because repeated calls to getbuffer on mutable objects are allowed to return *different* answers. Assume we have a

[issue12439] BaseHTTPServer's send_reponse adds extra \r\n when using HTTPMessage in input

2011-07-04 Thread Yoav Weiss
Yoav Weiss yoav.weiss...@gmail.com added the comment: Thanks for correcting me. I guess I assumed that the message variable is an HTTPMessage. Is send_response documented somewhere? I failed to find a reference. On Sun, Jul 3, 2011 at 9:45 PM, Petri Lehtinen rep...@bugs.python.orgwrote:

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-07-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch version 2, more complete: use HAVE_MBCS everywhere. -- Added file: http://bugs.python.org/file22566/have_mbcs-2.patch ___ Python tracker rep...@bugs.python.org

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Pauli Virtanen
Pauli Virtanen p...@iki.fi added the comment: @skrah: Yes, Numpy exposes only a single buffer per object. Making this a requirement in the PEP would probably be a sane change, as there is probably little real-world need to allow it behave otherwise. Comment on the patch: it seems you do not

[issue12411] cgi.parse_multipart is broken on 3.x

2011-07-04 Thread Jonas Wagner
Jonas Wagner ve...@gmx.ch added the comment: Hi Tal, Thanks a lot for your feedback. My primary objective was to increase the test coverage for cgi.py. If it is a problem to have the additional tests in this patch I'm happy to create a new issue with a separate patch. The default value for

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-07-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Version 3 of the patch: - fix initialization of the filesystem encoding if HAVE_MBCS is not set - Python fails on the filesystem encoding if it is unable to get the filesystem encoding instead of using UTF-8 - reorganize the

[issue12488] multiprocessing.Connection does not communicate pipe closure between parent and child

2011-07-04 Thread Luke
New submission from Luke lcamp...@email.unc.edu: I have found that when using multiprocessing.Connection objects to pass data between two processes, closing one end of the pipe is not properly communicated to the other end. My expectation was that when calling recv() on the remote end, it

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-07-04 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 7ce685cda0ae by Victor Stinner in branch 'default': Issue #9642: Fix filesystem encoding initialization: use the ANSI code page on http://hg.python.org/cpython/rev/7ce685cda0ae -- nosy: +python-dev

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-07-04 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 75b18b10064f by Victor Stinner in branch 'default': Issue #9642: Fix the definition of time.clock() on Windows http://hg.python.org/cpython/rev/75b18b10064f -- ___ Python tracker

[issue12411] cgi.parse_multipart is broken on 3.x

2011-07-04 Thread Tal Einat
Tal Einat talei...@gmail.com added the comment: Yes, please submit the other additional tests in a separate issue. The default value for boundary should surely be b. A simple test should be added where cgi.parse_multipart() uses the default boundary. If valid_boundary() is used only for

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Pauli Virtanen rep...@bugs.python.org wrote: Comment on the patch: it seems you do not track the re-export count in memory_getbuf: a = memoryview(obj) b = numpy.asarray(a) a.release() b[0] = 123 # -- BOOM: the

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-07-04 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 13e6d3cb2ecd by Victor Stinner in branch 'default': Issue #9642: Uniformize the tests on the availability of the mbcs codec http://hg.python.org/cpython/rev/13e6d3cb2ecd -- ___ Python

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-07-04 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9642 ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: It might be worth postponing the multi-dimensional support to a second patch, though. If we can get the buffer lifecycle solid first then that provides a better foundation for any further development. --

[issue12452] reuse plistlib in sysconfig; deprecation process in plistlib

2011-07-04 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 4f14050a963f by Victor Stinner in branch 'default': Issue #12452: Plist and Dict are now deprecated http://hg.python.org/cpython/rev/4f14050a963f -- nosy: +python-dev ___ Python tracker

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: As far as the rule of disallowing shape changes while a buffer is exported, I actually think that's a more sane approach as well. However, I've been burned enough times by going nobody would be insane enough to rely on that, would they? that

[issue11859] test_interrupted_write_text() of test_io failed of Python 3.3 on FreeBSD 7.2

2011-07-04 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11859 ___ ___

[issue10141] SocketCan support

2011-07-04 Thread Tiago Gonçalves
Tiago Gonçalves tiagogoncal...@ua.pt added the comment: There is this simple program that can be easily adapted to test the interface. http://old.nabble.com/Socketcan-with-Python-td29286297.html#a29286297 -- nosy: +ogait87 ___ Python tracker

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: [I agree that multi-dimensional support should not be part of this patch. I was thinking about creating a separate branch for that.] Nick Coghlan rep...@bugs.python.org wrote: As far as the rule of disallowing shape changes while a

[issue12488] multiprocessing.Connection does not communicate pipe closure between parent and child

2011-07-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: That's because the other end of the pipe (p1) is open in the child process (FDs are inherited on fork()). Just add p1.close() at the beginning of fn() and you'll get EOF. Closing as invalid. -- nosy: +neologix resolution: -

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Nice work with the patch Stefan - I've added a few review comments (including a suggestion on how to deal with the GetContiguous problem). One idea that review did prompt is that if we aren't going back to the original object for fresh buffer

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-07-04 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Is there anything stopping us just storing the flags on PyManagedBuffer? It's OK if the construction API requires the flag information in addition to the Py_buffer struct. -- ___ Python tracker

[issue10141] SocketCan support

2011-07-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix, rosslagerwall versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10141 ___

[issue12415] Missing: How to checkout the Doc sources

2011-07-04 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: We fix bugs in 3.2 and then forward-merge in what will become 3.3, using Mercurial. Then we apply the same change for 2.7. More info: http://docs.python.org/devguide I will commit this change this week. -- assignee: docs@python -

[issue12488] multiprocessing.Connection does not communicate pipe closure between parent and child

2011-07-04 Thread Luke
Luke lcamp...@email.unc.edu added the comment: That's interesting, thanks for your response. It is also a bit awkward.. Might I recommend adding a note to the documentation? It is not really intuitive that each child should need to close the end of the pipe it isn't using (especially since it

  1   2   >