etree, lxml unexpected behaviour

2009-06-17 Thread Emanuele D'Arrigo
Hi everybody, I just tried the following: import xml.etree.ElementTree as etree e = etree.fromstring('aRoot xmlns=aNamespace xmlns:ans=anotherNamespaceaChild anAttr=1 ans:anotherAttr=2//aRoot') e.getchildren()[0].attrib {'anAttr': '1', '{anotherNamespace}anotherAttr': '2'} Notice the lack

Reading and setting file permissions programmatically

2009-06-17 Thread Cameron Pulsford
Sorry to flood the list but my google fu isn't up to par today I guess. Basically, is it possible to read the permissions on one file and then set the permissions of another file to the ones we just read? os.dup2 seemed like it would work but I might not be using it correctly. I know there is

Re: Regarding Python is scripting language or not

2009-06-17 Thread Lie Ryan
Jean-Michel Pichavant wrote: abhishek goswami wrote: Hi, I have very basic question about Python that do we consider pyhton as script language. I searched in google but it becomes more confusion for me. After some analysis I came to know that Python support oops . Can anyone Guide me that

Re: etree, lxml unexpected behaviour

2009-06-17 Thread Stefan Behnel
Emanuele D'Arrigo wrote: Hi everybody, I just tried the following: import xml.etree.ElementTree as etree e = etree.fromstring('aRoot xmlns=aNamespace xmlns:ans=anotherNamespaceaChild anAttr=1 ans:anotherAttr=2//aRoot') e.getchildren()[0].attrib {'anAttr': '1',

Re: Reading and setting file permissions programmatically

2009-06-17 Thread MRAB
Cameron Pulsford wrote: Sorry to flood the list but my google fu isn't up to par today I guess. Basically, is it possible to read the permissions on one file and then set the permissions of another file to the ones we just read? os.dup2 seemed like it would work but I might not be using it

RE: Good books in computer science?

2009-06-17 Thread Phil Runciman
Because it reminds me of when things went badly wrong. IBM360, Von Neumann architecture, no hardware stacks ... IMHO Burroughs and ICL had better approaches to OS design back then but had less resources to develop their ideas. However, mainly this period marked a transition from the

Re: Exotic Logics

2009-06-17 Thread Lie Ryan
pdpi wrote: On Jun 17, 5:37 pm, Lie Ryan lie.1...@gmail.com wrote: Steven D'Aprano wrote: On Tue, 16 Jun 2009 22:46:14 -0700, William Clifford wrote: I was staring at a logic table the other day, and I asked myself, what if one wanted to play with exotic logics; how might one do it? This

Re: exit() or sys.exit()

2009-06-17 Thread Sebastian Wiesner
Brendan – Mittwoch, 17. Juni 2009 18:15 What is the difference on exit() and sys.exit() when called in the main body of a script? From the command line they seem to have the same effect. As of Python 2.5 there is no difference, however documentation [1] says about exit() and quit(): They

Re: Exotic Logics

2009-06-17 Thread Luis Alberto Zarrabeitia Gomez
Quoting Lie Ryan lie.1...@gmail.com: pdpi wrote: On Jun 17, 5:37 pm, Lie Ryan lie.1...@gmail.com wrote: Steven D'Aprano wrote: On Tue, 16 Jun 2009 22:46:14 -0700, William Clifford wrote: I was staring at a logic table the other day, and I asked myself, what if one wanted to play with

Re: Perl's @foo[3,7,1,-1] ?

2009-06-17 Thread Alan G Isaac
On 6/17/2009 4:03 PM J. Cliff Dyer apparently wrote: example code should always include relevant imports. Agreed. It was a cut and paste failure. Apologies. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

generator expression works in shell, NameError in script

2009-06-17 Thread ssc
Hello, I am trying to generate this list of tuples: [(0, ''), (1, 'Dr'), (2, 'Miss'), (3, 'Mr'), (4, 'Mrs'), (5, 'Ms')] My code works fine in the Python shell: titles = ['Dr', 'Miss', 'Mr', 'Mrs', 'Ms',] title_choices = [(0, '')] + list((titles.index(t)+1, t) for t in titles) title_choices

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Emile van Sebille
On 6/17/2009 3:19 PM ssc said... Hello, I am trying to generate this list of tuples: [(0, ''), (1, 'Dr'), (2, 'Miss'), (3, 'Mr'), (4, 'Mrs'), (5, 'Ms')] My code works fine in the Python shell: titles = ['Dr', 'Miss', 'Mr', 'Mrs', 'Ms',] title_choices = [(0, '')] + list((titles.index(t)+1, t)

Re: walking a directory with very many files

2009-06-17 Thread Lawrence D'Oliveiro
In message 20090617214535.10866...@coercion, Mike Kazantsev wrote: On Wed, 17 Jun 2009 23:04:37 +1200 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 20090617142431.2b25f...@malediction, Mike Kazantsev wrote: On Wed, 17 Jun 2009 17:53:33 +1200 Lawrence D'Oliveiro

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Chris Rebert
On Wed, Jun 17, 2009 at 3:19 PM, sscsteven.samuel.c...@gmail.com wrote: Hello, I am trying to generate this list of tuples: [(0, ''), (1, 'Dr'), (2, 'Miss'), (3, 'Mr'), (4, 'Mrs'), (5, 'Ms')] My code works fine in the Python shell: titles = ['Dr', 'Miss', 'Mr', 'Mrs', 'Ms',] title_choices

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Jason Tackaberry
On Wed, 2009-06-17 at 15:38 -0700, Chris Rebert wrote: See what Emile said, but here's a nicer way to code it, IMHO: titles = ['Dr', 'Miss', 'Mr', 'Mrs', 'Ms'] title_choices = zip(range(len(titles)+1), ['']+titles) zip() to the rescue! How about: enumerate([''] + titles) --

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Emile van Sebille
On 6/17/2009 3:41 PM Jason Tackaberry said... How about: enumerate([''] + titles) or perhaps, depending on usage... list(enumerate(titles)) Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Jon Clements
On Jun 17, 11:19 pm, ssc steven.samuel.c...@gmail.com wrote: Hello, I am trying to generate this list of tuples: [(0, ''), (1, 'Dr'), (2, 'Miss'), (3, 'Mr'), (4, 'Mrs'), (5, 'Ms')] My code works fine in the Python shell: titles = ['Dr', 'Miss', 'Mr', 'Mrs', 'Ms',] title_choices = [(0,

Re: persistent composites

2009-06-17 Thread Rhodri James
On Wed, 17 Jun 2009 16:06:22 +0100, Aaron Brady castiro...@gmail.com wrote: On Jun 16, 10:09 am, Mike Kazantsev mk.frag...@gmail.com wrote: On Tue, 16 Jun 2009 06:57:13 -0700 (PDT) Aaron Brady castiro...@gmail.com wrote: Making the charitable interpretation that this was the extent of c-l-

Re: Pythonic way to overwrite a file

2009-06-17 Thread Rhodri James
Top-posting, tsk, tsk. On Wed, 17 Jun 2009 19:26:07 +0100, Cameron Pulsford cameron.pulsf...@gmail.com wrote: Essentially it just cleans up a source file of erroneous spaces and tabs and can also convert tabs to spaces so loading the whole file into memory is possibly an option. I am

Re: first full alpha release of PyLab_Works v0.3

2009-06-17 Thread Stef Mientki
program didn't start because .dll is missing (sorry I don't have the name)... I don't know if that is just an issue with the installer with vista or not (missing msv something 71. dll) You probably mean the microsoft visual C++ runtime (msvcr71.dll), windows vista has a brand new way

Re: generator expression works in shell, NameError in script

2009-06-17 Thread ssc
Wow! Didn't expect that kind of instant support. Thank you very much, I'll give both zip and enumerate a try. The code I've shown is actually copied pretty straight from a Django form class, but I didn't want to mention that as not to dilute the conversation. Don't think it matters, anyway. This

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Chris Rebert
On Wed, Jun 17, 2009 at 3:54 PM, sscsteven.samuel.c...@gmail.com wrote: Wow! Didn't expect that kind of instant support. Thank you very much, I'll give both zip and enumerate a try. The code I've shown is actually copied pretty straight from a Django form class, but I didn't want to mention

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Emile van Sebille
On 6/17/2009 3:54 PM ssc said... Wow! Didn't expect that kind of instant support. Thank you very much, I'll give both zip and enumerate a try. The code I've shown is actually copied pretty straight from a Django form class, but I didn't want to mention that as not to dilute the conversation.

Re: TypeError: int argument required

2009-06-17 Thread Rhodri James
On Wed, 17 Jun 2009 12:07:15 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: [snip example code] You haven't managed to get rid of the backslashes. [snip other example code] Now you've lost track of the original point of the discussion, which is about using alternate

Re: generator expression works in shell, NameError in script

2009-06-17 Thread Steven Samuel Cole
Both zip and enumerate do the trick. Thanks for the pointers, that's 2 more built-ins under my belt :-) Still don't really understand why my initial code didn't work, though... Thanks everyone! :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Create 3D Surface / Contour (with vpython?)

2009-06-17 Thread norseman
Philip Gröger wrote: Hi! How can I create a 3D surface (or something like the picture on the FAQ page http://www.vpython.org/contents/FAQ.html ) with python [or vpython]. Didnt find anything in the Documentation under graph Basically like a contourf diagram in 3D

Re: python tutorial

2009-06-17 Thread steve
Carl Banks pavlovevide...@gmail.com wrote in message news:2f6271b1-5ffa-4cec-81f8-0276ad647...@p5g2000pre.googlegroups.com... On Jun 15, 7:56 pm, steve st...@nospam.au wrote: I was just looking at the python tutorial, and I noticed these lines:

Re: python tutorial

2009-06-17 Thread steve
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote in message news:pan.2009.06.16.04.29...@remove.this.cybersource.com.au... On Mon, 15 Jun 2009 20:58:47 -0700, Carl Banks wrote: On Jun 15, 7:56 pm, steve st...@nospam.au wrote: I was just looking at the python tutorial, and I

Re: Exotic Logics

2009-06-17 Thread Steven D'Aprano
On Wed, 17 Jun 2009 16:37:04 +, Lie Ryan wrote: Imagine for a moment that there are no boolean values. There are no numbers. They were never invented. There are no classes. There are no objects. There are only functions. Could you define functions that act like boolean values? And

Re: python tutorial

2009-06-17 Thread Robert Kern
On 2009-06-17 19:36, steve wrote: Carl Bankspavlovevide...@gmail.com wrote in message news:2f6271b1-5ffa-4cec-81f8-0276ad647...@p5g2000pre.googlegroups.com... On Jun 15, 7:56 pm, stevest...@nospam.au wrote: I was just looking at the python tutorial, and I noticed these lines:

Re: python tutorial

2009-06-17 Thread Steven D'Aprano
On Thu, 18 Jun 2009 10:36:01 +1000, steve wrote: 1) Windows does not make a distinction between text and binary files. Of course it does. Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. f

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-17 Thread Steven D'Aprano
On Wed, 17 Jun 2009 07:49:52 -0400, Charles Yeomans wrote: Even CPython doesn't rely completely on reference counting (it has a fallback gc for cyclic garbage). Python introduced the with statement to get away from the kludgy CPython programmer practice of opening files and relying on the

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-17 Thread Steven D'Aprano
On Wed, 17 Jun 2009 23:29:48 +1200, Lawrence D'Oliveiro wrote: In message 7x7hzbv14a@ruckus.brouhaha.com, wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Reference counting is an implementation detail used by CPython but not [implementations built on runtimes

Re: walking a directory with very many files

2009-06-17 Thread Mike Kazantsev
On Thu, 18 Jun 2009 10:33:49 +1200 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 20090617214535.10866...@coercion, Mike Kazantsev wrote: On Wed, 17 Jun 2009 23:04:37 +1200 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message

How can I enumerate (list) serial ports?

2009-06-17 Thread Jason
Hi, I'm developing an application to talk to a device over a serial port. I'm trying my hardest to keep it cross platform, so I was using pySerial for the serial communications. But I can't see a pythonic, cross-platform way to enumerate serial ports on a machine. Ideally I could show the user a

GUI(eclipse+pydev/SPE) freeze when doing python auto-completion under Linux

2009-06-17 Thread Wei, James
When I am editing python program with SPE, I found that SPE will freeze when it is doing auto-completion. The behavior is very strange that I can not edit the file again. If I switch to another file and then switch back, I can edit it again. So I switch to eclipse+pydev, but I found the same

Re: GUI(eclipse+pydev/SPE) freeze when doing python auto-completion under Linux

2009-06-17 Thread Wei, James
On Jun 18, 10:45 am, Wei, James wist...@gmail.com wrote: When I am editing python program with SPE, I found that SPE will freeze when it is doing auto-completion. The behavior is very strange that I can not edit the file again. If I switch to another file and then switch back, I can edit it

Re: GUI(eclipse+pydev/SPE) freeze when doing python auto-completion under Linux

2009-06-17 Thread Tyler Laing
Do you experience the same problem even on an empty program file or is it limited to just one file? -Tyler On Wed, Jun 17, 2009 at 7:47 PM, Wei, James wist...@gmail.com wrote: On Jun 18, 10:45 am, Wei, James wist...@gmail.com wrote: When I am editing python program with SPE, I found that SPE

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-17 Thread Charles Yeomans
On Jun 17, 2009, at 9:43 PM, Steven D'Aprano wrote: On Wed, 17 Jun 2009 07:49:52 -0400, Charles Yeomans wrote: Even CPython doesn't rely completely on reference counting (it has a fallback gc for cyclic garbage). Python introduced the with statement to get away from the kludgy CPython

fastest native python database?

2009-06-17 Thread per
hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making dictionaries out of very large text files (around 1000MB in size) and pickling was simply too slow. i am not looking for fancy SQL

Re: GUI(eclipse+pydev/SPE) freeze when doing python auto-completion under Linux

2009-06-17 Thread Wei, Xiaohai
yes, the same problem even on an empty program. every file has the same problem. for example, if I new a file and input the following: import os os. after I input '.', it will pop up the window, and i can select the function of os module or continue input. but after that, no action can be taken

Re: What text editor is everyone using for Python

2009-06-17 Thread JussiJ
On May 31, 12:42 am, edexter eric_dex...@msn.com wrote: On the Windows platform the Zeus editor has Python language support: http://www.zeusedit.com I will sometimes use word pad but i perfer syntax highlighting.. The syntax highlighter is fully configurable. I would be after is to be

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-17 Thread Steven D'Aprano
On Wed, 17 Jun 2009 22:58:27 -0400, Charles Yeomans wrote: On Jun 17, 2009, at 9:43 PM, Steven D'Aprano wrote: On Wed, 17 Jun 2009 07:49:52 -0400, Charles Yeomans wrote: Even CPython doesn't rely completely on reference counting (it has a fallback gc for cyclic garbage). Python introduced

Re: fastest native python database?

2009-06-17 Thread Emile van Sebille
On 6/17/2009 8:28 PM per said... hi all, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making dictionaries out of very large text files (around 1000MB in size) and pickling was simply too slow.

Re: fastest native python database?

2009-06-17 Thread per
i would like to add to my previous post that if an option like SQLite with a python interface (pysqlite) would be orders of magnitude faster than naive python options, i'd prefer that. but if that's not the case, a pure python solution without dependencies on other things would be the best option.

Re: Reading and setting file permissions programmatically

2009-06-17 Thread Kushal Kumaran
On Thu, Jun 18, 2009 at 2:05 AM, Cameron Pulsfordcameron.pulsf...@gmail.com wrote: Sorry to flood the list but my google fu isn't up to par today I guess. Basically, is it possible to read the permissions on one file and then set the permissions of another file to the ones we just read? os.dup2

Re: walking a directory with very many files

2009-06-17 Thread Ethan Furman
Lawrence D'Oliveiro wrote: In message 20090617214535.10866...@coercion, Mike Kazantsev wrote: On Wed, 17 Jun 2009 23:04:37 +1200 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 20090617142431.2b25f...@malediction, Mike Kazantsev wrote: On Wed, 17 Jun 2009

Re: Regarding Python is scripting language or not

2009-06-17 Thread Asun Friere
On Jun 18, 5:03 am, Terry Reedy tjre...@udel.edu wrote: That depends on what you mean by 'put into classes' (and 'everything'). If you mean 'be an instance of a class', which I think is the most natural reading, then Python *is* object-oriented and, if I understand what I have read correctly

Re: fastest native python database?

2009-06-17 Thread Pierre Bourdon
On Thu, Jun 18, 2009 at 05:28, perperfr...@gmail.com wrote: hi all, Hi, i'm looking for a native python package to run a very simple data base. i was originally using cpickle with dictionaries for my problem, but i was making dictionaries out of very large text files (around 1000MB in size)

Re: waling a directory with very many files

2009-06-17 Thread Asun Friere
On Jun 15, 6:35 am, Andre Engels andreeng...@gmail.com wrote: What kind of directories are those that just a list of files would result in a very large object? I don't think I have ever seen directories with more than a few thousand files... (a...@lucrezia:~/pit/lsa/act:5)$ ls -1 | wc -l

[issue6294] Improve shutdown exception ignored message

2009-06-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I should have said 3.1.1. Ie, would this be a bug fix or really a new feature that has to wait. Moot until someone does a patch. -- ___ Python tracker rep...@bugs.python.org

[issue6164] [AIX] Patch to correct the AIX C/C++ linker argument used for 'runtime_library_dirs'

2009-06-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Yes, I know it will not affect g++ or gcc users, I was asking that to make sure Sridhar do not intend to make it work on a system where gcc or g++ are *also* used since they will be picked prior to this option. I'll include that patch then.

[issue6215] Backport the IO lib to trunk

2009-06-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Committed in r73461. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6215 ___ ___

[issue6295] curses doc : getch is blocking by default

2009-06-17 Thread nojhan
New submission from nojhan noj...@gmail.com: The documentation of the curses module is not clear on the fact that getch is blocking by default: http://docs.python.org/3.0/library/curses.html#curses.window.getch I suggest the following description instead of the current one: Get a character.

[issue6295] curses doc : getch is blocking by default

2009-06-17 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I've committed a similar change in r73462. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6295

[issue5641] Local variables not freed when Exception raises in function called from cycle

2009-06-17 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Well, it's the basic principle that an object is not destroyed until there are no more references to it. The documented semantics I referred to are that a variable assigned to in an except X, Y clause lives beyond the scope of that clause.

[issue6255] PyInt_FromSize_t is undocumented.

2009-06-17 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Documented in r73463. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6255 ___

[issue6294] Improve shutdown exception ignored message

2009-06-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, in that case then yes, the message bug can be fixed in 3.1.1 and 2.6.3. As for the message format, the format of messages is not considered part of the Python API, but changes to message formats can nonetheless cause compatibility

[issue6288] Update contextlib.nested docs in light of deprecation

2009-06-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: In light of Raymond's comments (which make sense to me), I'm just updating the documentation and leaving the full deprecation warning in place. The new docs are deliberately explicit about *why* trying to use the current form of nested is

[issue6288] Update contextlib.nested docs in light of deprecation

2009-06-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: And done for 3.1 in r73466 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6288 ___

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: setup.py should be able to generate tarfile distributions on Windows without requiring tar to be on the path. Ideally setup.py sdist should create the same type of archive (zip or tarball) by default independent of platform. At the

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Now that distutils uses tarfile (see #6048) we can propose a tar archive on all platform by default without requiring tar to be installed. Althoug, the gz compression requires the zlib module. I need to check what are the requirements of its

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Given that Windows can't handle tar files by default but all platforms support zip out of the box wouldn't (unfortunately) zip be a better default? For the MANIFEST I meant the file called MANIFEST that distutils creates (and includes in

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: As a developer I prefer .tar.gz, but I don't have a strong opinion on picking zip or tar, I think tar is fine as long as all installers out there (easy_install, pip, etc) are working with the archives on every platform too. Someone who wants

[issue5800] make wsgiref.headers.Headers accept empty constructor

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: Patch attached. While I was at it, I also removed stupid whitespace and generally made the module more PEP8-compliant. -- nosy: +ptn Added file: http://bugs.python.org/file14311/patch ___

[issue5800] make wsgiref.headers.Headers accept empty constructor

2009-06-17 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: I have added another issue for PEP 8 compliancy at #5801 -- versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5800

[issue5801] spurious empty lines in wsgiref code

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: The patch for issue #5800 solves this. -- nosy: +ptn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5801 ___

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: The point is not for developers who are happy handling .tar.gz but users of the distribution who don't have a way of handling them. I prefer .tar.gz myself as well but I don't think the default distribution format should be one that

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: What's superior about .tar.gz? (This is a genuine question). -- nosy: +tim.golden title: Native (and default) tarfile support for setup.py sdist in distutils on Windows - Native (and default) tarfile support for setup.py sdist in

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Better compression. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6296 ___ ___

[issue6296] Native (and default) tarfile support for setup.py sdist in distutils on Windows

2009-06-17 Thread Zooko O'Whielacronx
Zooko O'Whielacronx zo...@zooko.com added the comment: I strongly favor a common approach instead of doing it differently on different platforms. (Aside: check out the gratuitous differences for names and locations of distutils config files:

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: +1, but I can't apply the patch cleanly: $ patch -p0 threading.diff patching file Doc/library/threading.rst Hunk #1 succeeded at 198 (offset -17 lines). Hunk #2 succeeded at 211 (offset -17 lines). Hunk #3 succeeded at 230 (offset

[issue1685] linecache .updatecache fails on utf8 encoded files

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: Cannot reproduce on Ubuntu 9.04 with py3k at revision 73267: $ ./python Python 3.1rc1+ (py3k:73267, Jun 7 2009, 14:45:03) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. import pdb [49404 refs]

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Miki Tebeka
Miki Tebeka miki.teb...@gmail.com added the comment: I'm attaching a new diff (svn diff threading.diff), hope this one's OK. -- Added file: http://bugs.python.org/file14312/threading.diff ___ Python tracker rep...@bugs.python.org

[issue2824] zipfile to handle duplicate files in archive

2009-06-17 Thread Alexandru V. Mosoi
Alexandru V. Mosoi brtz...@gmail.com added the comment: a similar problem appears when the zip file contains two files as in: ['_test/tree.pl', '_test/']. for ZipFile.extractall() when _test/tree.pl is extracted _test/ is created and the the extraction of _test/ fails because OSError: [Errno

[issue6288] Update contextlib.nested docs in light of deprecation

2009-06-17 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Nice job on the new wording in the docs. Do you think the docstring should also be updated? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6288

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: Nope. Our working copies seem to be different. I'm uploading mine, which I just update to revision 73468. Please diff yours against that and against HEAD too, just in case. Hunk 2 on threading.py fails because your attributes use

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Miki Tebeka
Miki Tebeka miki.teb...@gmail.com added the comment: I'm diffing against the 2.7 branch, I guess your comes from the 3.2? Will checkout 3.2 and do it there as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6064

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Miki Tebeka
Miki Tebeka miki.teb...@gmail.com added the comment: Attaching a diff against the py3k branch on revision 73468 -- Added file: http://bugs.python.org/file14314/threading3k.diff ___ Python tracker rep...@bugs.python.org

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: I'm diffing against the 2.7 branch, I guess your comes from the 3.2? *forehead meets desktop* Patch applies cleanly and all tests pass. I used it for a while and everything seemed OK. After someone else tests, I say we go for it

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: +1 to the py3k diff. :) Hey, I think this daemon property should be set as a keyword argument of the Thread constructor. -- nosy: +conf ___ Python tracker rep...@bugs.python.org

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: +1 on making it a keyword-only argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6064 ___

[issue6297] Added Misc/python.pc to 'distclean' Rule

2009-06-17 Thread Jerry Chen
New submission from Jerry Chen je...@3rdengine.com: Added Misc/python.pc to 'distclean' rule Minor issue... After running ./configure, Misc/python.pc is generated from python.pc.in. Interesting to note in the python2.7 trunk, this file is added to the svn:ignore property of Misc/ so it doesn't

[issue6297] Added Misc/python.pc to 'distclean' Rule

2009-06-17 Thread Jerry Chen
Jerry Chen je...@3rdengine.com added the comment: Errata: the patch is for Makefile.pre.in, not Makefile. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6297 ___

[issue6298] http://python.org/download says Python 2.4.5, but I think it means Python 2.4.6.

2009-06-17 Thread Zooko O'Whielacronx
Changes by Zooko O'Whielacronx zo...@zooko.com: -- assignee: georg.brandl components: Documentation nosy: georg.brandl, zooko severity: normal status: open title: http://python.org/download says Python 2.4.5, but I think it means Python 2.4.6. ___

[issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2

2009-06-17 Thread Tim Mooney
New submission from Tim Mooney enchan...@users.sourceforge.net: I've built Python 2.6.1 and Python 2.6.2 on x86_64-sun-solaris2.10 using the Sun Workshop Express (200903) toolchain. I'm building in 64 bit mode. Most stuff builds just fine (even warnings are rare), but pyexpat fails to link

[issue6298] http://python.org/download says Python 2.4.5, but I think it means Python 2.4.6.

2009-06-17 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: Fixed in pydotorg r12342. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6298 ___

[issue6288] Update contextlib.nested docs in light of deprecation

2009-06-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Good point - I forgot about the docstring. Yes, I think that should be changed to use the new wording up to the new example (similar to the way the old docstring stopped at the example). Reopening until that is done (although reducing from

[issue6064] Add daemon argument to threading.Thread constructor

2009-06-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: +1 from me as well. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6064 ___ ___

[issue5801] spurious empty lines in wsgiref code

2009-06-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: +1 for making the source more readable. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5801 ___

[issue6215] Backport the IO lib to trunk

2009-06-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Everything looks ok, can you merge the commit to py3k so as to minimize conflicts when merging stuff? Thanks :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6215

[issue5800] make wsgiref.headers.Headers accept empty constructor

2009-06-17 Thread Pablo Torres Navarrete
Pablo Torres Navarrete tn.pa...@gmail.com added the comment: Added a pointer from #5801 to here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5800 ___

[issue5801] spurious empty lines in wsgiref code

2009-06-17 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - pje ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5801 ___ ___ Python-bugs-list

[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-06-17 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: I repeatedly find myself typing things like mybytestring.decode('ASCII', errors='replace'). This seems like the natural (I'm tempted to say Pythonic) thing to do, and is more readable (IMO) than mybytestring.decode('ASCII', 'replace').

[issue6215] Backport the IO lib to trunk

2009-06-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Done in r73169. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6215 ___ ___

[issue6301] Error in tutorial section 7.2

2009-06-17 Thread david
New submission from david da...@plasmatronics.com.au: http://docs.python.org/tutorial/inputoutput.html#reading-and-writing- files Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written.

[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented

2009-06-17 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: decode_header only accepts str as input. If the input contains no encoded words, the output is str (ie: the input string) and None. If it does contain encoded words, the output is pairs of bytes plus str charset identifiers (or None).

[issue1685453] email package should work better with unicode

2009-06-17 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- dependencies: +email.header.decode_header data types are inconsistent and incorrectly documented versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org

[issue6301] Error in tutorial section 7.2

2009-06-17 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6301 ___ ___ Python-bugs-list

[issue6303] print does not appear in the 3.x documentation index

2009-06-17 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: Since print is now a built in function, it should appear in the library reference index, but it does not. -- assignee: georg.brandl components: Documentation messages: 89489 nosy: georg.brandl, r.david.murray priority: low

<    1   2   3   >