Re: urllib2 performance on windows, usb connection

2009-02-06 Thread dq
MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing* to do with

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
On Feb 6, 2:34 pm, Robocop btha...@physics.ucsd.edu wrote: On Feb 6, 2:20 pm, Robocop btha...@physics.ucsd.edu wrote: On Feb 6, 2:17 pm, Robocop btha...@physics.ucsd.edu wrote: On Feb 6, 1:03 pm, bearophileh...@lycos.com wrote: Robocop: then within each department block of the

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Stephen Hansen
I think there may have been a misunderstanding. I was already using attrgetter, my problem is that it doesn't appear to be sorting by the argument i give it. How does sort work with strings? How about with datetime.time or datetime.date? You were using the attrgetter, but it looks like you

Module unloading resulting from SystemExit exception

2009-02-06 Thread Patrick Hartling
I am trying to understand how the SystemExit exception influences module unloading. The situation that I am facing is that a Python application behaves just fine upon exiting when executed using the standard Python interpreter, but when run as a frozen executable, modules are unloaded unexpectedly

Re: Ordered dict by default

2009-02-06 Thread bearophileHUGS
Cameron Simpson: increases the unrealised assumptions about mappings in general which a newbie may acquire, causing them pain/complaint later with other mappings This is wrong in several different ways. I would much rather keep dictionaries as performant as possible, as a bare mapping, and

Re: Ordered dict by default

2009-02-06 Thread bearophileHUGS
bearophile: In Python 3 strings are all unicode, integral numbers are all multiprecision, chars in Python 2.x+ are strings, lists are arrays that can grow dynamically, and so on because the Purpose of Python isn't to be as fast as possible, but to be first of all flexible, safe, easy, not

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread MRAB
dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing* to do with

Re: Ordered dict by default

2009-02-06 Thread MRAB
bearophileh...@lycos.com wrote: Cameron Simpson: increases the unrealised assumptions about mappings in general which a newbie may acquire, causing them pain/complaint later with other mappings This is wrong in several different ways. I would much rather keep dictionaries as performant as

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread dq
dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing* to

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread dq
MRAB wrote: dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing*

Re: Flattening lists

2009-02-06 Thread Mensanator
On Feb 6, 3:23 pm, Rhamphoryncus rha...@gmail.com wrote: On Feb 5, 1:16 pm, Michele Simionato michele.simion...@gmail.com wrote: On Feb 5, 7:24 pm, a...@pythoncraft.com (Aahz) wrote: In article a22c77c4-a812-4e42-8972-6f3eedf72...@l33g2000pri.googlegroups.com, Michele Simionato  

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread MRAB
dq wrote: dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has *nothing*

Why doesn't this RE match?

2009-02-06 Thread Just Another Victim of the Ambient Morality
I'm confused by this behaviour: import re regex = re.compile('foo') match = regex.match('whatfooever') In my experience with regular expressions, regex should have found a match. However, in this case regex.match() returns None. Why is that? What am I missing? Thank you...

Re: Why doesn't this RE match?

2009-02-06 Thread Vlastimil Brom
2009/2/7 Just Another Victim of the Ambient Morality ihates...@hotmail.com:    I'm confused by this behaviour: import re regex = re.compile('foo') match = regex.match('whatfooever')    In my experience with regular expressions, regex should have found a match.  However, in this case

Re: Why doesn't this RE match?

2009-02-06 Thread MRAB
Just Another Victim of the Ambient Morality wrote: I'm confused by this behaviour: import re regex = re.compile('foo') match = regex.match('whatfooever') In my experience with regular expressions, regex should have found a match. However, in this case regex.match() returns None.

Re: Why doesn't this RE match?

2009-02-06 Thread Stephen Hansen
In my experience with regular expressions, regex should have found a match. However, in this case regex.match() returns None. Why is that? What am I missing? You want regex.search(). match specifically looks for the pattern from the start of the screen, search anywhere. --S --

Re: Why doesn't this RE match?

2009-02-06 Thread Robert Kern
On 2009-02-06 18:23, Just Another Victim of the Ambient Morality wrote: I'm confused by this behaviour: import re regex = re.compile('foo') match = regex.match('whatfooever') In my experience with regular expressions, regex should have found a match. However, in this case

Re: Trouble sorting a list of objects by attributes

2009-02-06 Thread Robocop
On Feb 6, 2:41 pm, Stephen Hansen apt.shan...@gmail.com wrote: I think there may have been a misunderstanding.  I was already using attrgetter, my problem is that it doesn't appear to be sorting by the argument i give it.  How does sort work with strings?  How about with datetime.time or

Re: Why doesn't this RE match?

2009-02-06 Thread John Machin
On Feb 7, 11:23 am, Just Another Victim of the Ambient Morality ihates...@hotmail.com wrote:     I'm confused by this behaviour: import re regex = re.compile('foo') match = regex.match('whatfooever')     In my experience with regular expressions, regex should have found a match.  However,

Possible to access MS Access 2007 password-protected database from Python?

2009-02-06 Thread Kenneth McDonald
Googling has shown me various ways of connecting to a non-password- protected Access database, but I was wondering if someone could point to code illustrating how to use an Access db that's password- protected. I haven't been able to find anything on this. Thanks, Ken --

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread dq
MRAB wrote: dq wrote: dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It certainly has

Running all unit tests

2009-02-06 Thread Jason Voegele
I'm working on my first substantial Python project, and I'm following a fully test-first approach. I'd like to know how Pythonistas typically go about running all of their tests to ensure that my application stays green. In Ruby, I would have a Rake task so that I could say rake test and all

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread MRAB
dq wrote: MRAB wrote: dq wrote: dq wrote: MRAB wrote: dq wrote: Martin v. Löwis wrote: So does anyone know what the deal is with this? Why is the same code so much slower on Windows? Hope someone can tell me before a holy war erupts :-) Only the holy war can give an answer here. It

sys.exc_info() different between python 2.5.4 and 2.6.1?

2009-02-06 Thread Vlastimil Brom
Hi all, I just noticed a changed behaviour of sys.exc_info() between python 2.5.4 and 2.6.1 and wanted to ask, wheter it was intended, and how to deal with the new state. Some code triggers an error while opening a text file (windows 1250 - with non-ascii characters) wrongly as utf-8, this gets

Re: Using while loop and if statement to tell if a binary has an odd or even number of 1's.

2009-02-06 Thread Mark Wooding
Duncan Booth duncan.bo...@invalid.invalid writes: Mark Dickinson dicki...@gmail.com wrote: [snip] while n: count += 1 n = n-1 return count is_even = count_set_bits(the_int) % 2 == 0 ...but anyone submitting this as a homework solution had better be prepared to

Re: Running all unit tests

2009-02-06 Thread Darcy Mason
On Feb 6, 9:11 pm, Jason Voegele ja...@jvoegele.com wrote: I'm working on my first substantial Python project, and I'm following a fully test-first approach.  I'd like to know how Pythonistas typically go about running all of their tests to ensure that my application stays green. In Ruby, I

Re: Running all unit tests

2009-02-06 Thread D'Arcy J.M. Cain
On Fri, 06 Feb 2009 21:11:15 -0500 Jason Voegele ja...@jvoegele.com wrote: I'm working on my first substantial Python project, and I'm following a fully test-first approach. I'd like to know how Pythonistas typically go about running all of their tests to ensure that my application stays

Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread er
Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he said that someone else told him this, I piped up and said that I thought that wasn't true. I looked at the source code for lists in python, and I

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread er
Correction, the first sentence should read, lists are just dictionaries keyed with integers. On Fri, Feb 6, 2009 at 10:18 PM, er eroberer...@gmail.com wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 7:18 PM, er eroberer...@gmail.com wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he said that someone else told him this, I piped up and said that I thought that

Re: Running all unit tests

2009-02-06 Thread Ben Finney
Jason Voegele ja...@jvoegele.com writes: What's the recommended approach for Python programs? I'm sure I could write a shell script (or a Python script even) that scans my test directory for test cases and runs them, but I'm wondering if there's something already built in that could do this

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread er
Thanks Chris. Lua tables are one of my favorite linguistic traits, which was actually part of the discussion that brought up this nugget. Nevertheless, any details you care to provide about the details. I'm going to dive into the source code in more depth tomorrow, just so I can get a better

Portable way to refer to the null device?

2009-02-06 Thread Roy Smith
I need to run a command using subprocess.Popen() and have stdin connected to the null device. On unix, I would do: self.process = subprocess.Popen(argv, env=new_env, stdout=open(outfile, 'w'),

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Chris Rebert
On Fri, Feb 6, 2009 at 10:25 PM, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 6, 2009 at 7:18 PM, er eroberer...@gmail.com wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Since he

Re: Portable way to refer to the null device?

2009-02-06 Thread skip
Roy I need to run a command using subprocess.Popen() and have stdin Roy connected to the null device. os.path.devnull should do what you want: os.path.devnull '/dev/null' import ntpath ntpath.devnull 'nul' -- Skip Montanaro - s...@pobox.com -

Re: Portable way to refer to the null device?

2009-02-06 Thread Ben Finney
Roy Smith r...@panix.com writes: I need to run a command using subprocess.Popen() and have stdin connected to the null device. On unix, I would do: self.process = subprocess.Popen(argv, env=new_env,

Re: Is c.l.py becoming less friendly?

2009-02-06 Thread Albert Hopkins
Probably that [c.l.]python is becoming more popular and, like most things as they become popular, it loses its purity... much like the Internet in the early 1990s. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to host a (Python) project?

2009-02-06 Thread Aahz
In article 6dcb8ce5-c93e-458c-9047-e5db60f27...@v18g2000pro.googlegroups.com, andrew cooke and...@acooke.org wrote: On Feb 1, 8:45=A0pm, a...@pythoncraft.com (Aahz) wrote: [...]=A0I for one won't participate in any list hosted on Google because of the need for a Google login. hi, just fyi, i

GOZERBOT 0.9 RELEASED

2009-02-06 Thread Bart Thate
Finally gozerbot 0.9 has been released. This is a huge step forward to version 1.0 and contains a number of changes: * use json as the format to save data in instead of pickles * let config files also use json, this makes them more readable and human editable * remove popen usage

What is difference between ADO and RDO

2009-02-06 Thread Agile Consulting
Explain ADO and RDO -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 performance on windows, usb connection

2009-02-06 Thread Grant Edwards
On 2009-02-06, Martin v. L?wis mar...@v.loewis.de wrote: To investigate further, you might drop the write operating, and measure only source.read(). If that is slower, then, for some reason, the network speed is bad on Windows. Maybe you have the network interfaces misconfigured? Maybe you

WebError documentation?

2009-02-06 Thread Ron Garret
Is there any? Where is it? Extensive Googling has proven fruitless. Thanks, rg -- http://mail.python.org/mailman/listinfo/python-list

simple web app, where to start

2009-02-06 Thread Vincent Davis
I have a simple script that takes a few input values and returns a csv file and a few stats. If I wanted to host this on the web how would I. I have no idea where to begin. If someone could point me in the right direction like maybe a tutorial, tools I will need, functions. I would appreciate

Re: Returning a variable number of things...

2009-02-06 Thread r0g
Chris Rebert wrote: On Fri, Feb 6, 2009 at 10:50 AM, r0g aioe@technicalbloke.com wrote: Hi There, I have a function that uses *args to accept a variable number of parameters and I would like it to return a variable number of objects. I could return a list but I would like to take

Re: WebError documentation?

2009-02-06 Thread Chris Rebert
On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret rnospa...@flownet.com wrote: Is there any? Where is it? Extensive Googling has proven fruitless. It's not a standard Python exception. A third-party library you're using must be raising it. Check the exception traceback. Cheers, Chris -- Follow

Re: Flattening lists

2009-02-06 Thread Michele Simionato
On Feb 6, 10:23 pm, Rhamphoryncus rha...@gmail.com wrote: On Feb 5, 1:16 pm, Michele Simionato michele.simion...@gmail.com wrote: On Feb 5, 7:24 pm, a...@pythoncraft.com (Aahz) wrote: In article a22c77c4-a812-4e42-8972-6f3eedf72...@l33g2000pri.googlegroups.com, Michele Simionato  

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Stephen Hansen
On Fri, Feb 6, 2009 at 7:32 PM, er eroberer...@gmail.com wrote: Thanks Chris. Lua tables are one of my favorite linguistic traits, which was actually part of the discussion that brought up this nugget. Nevertheless, any details you care to provide about the details. I'm going to dive into

Re: Running all unit tests

2009-02-06 Thread Jean-Paul Calderone
On Fri, 06 Feb 2009 21:11:15 -0500, Jason Voegele ja...@jvoegele.com wrote: I'm working on my first substantial Python project, and I'm following a fully test-first approach. I'd like to know how Pythonistas typically go about running all of their tests to ensure that my application stays

Re: Flattening lists

2009-02-06 Thread rdmurray
Quoth Mensanator mensana...@aol.com: On Feb 6, 3:23=A0pm, Rhamphoryncus rha...@gmail.com wrote: On Feb 5, 1:16=A0pm, Michele Simionato michele.simion...@gmail.com wrote: On Feb 5, 7:24=A0pm, a...@pythoncraft.com (Aahz) wrote: In article

Re: simple web app, where to start

2009-02-06 Thread Matthew Sacks
have a loo at the django framework http://www.djangoproject.com/ On Fri, Feb 6, 2009 at 8:16 PM, Vincent Davis vinc...@vincentdavis.net wrote: I have a simple script that takes a few input values and returns a csv file and a few stats. If I wanted to host this on the web how would I. I have no

Python3.0 has more duplication in source code than Python2.5

2009-02-06 Thread Terry
I used a CPD (copy/paste detector) in PMD to analyze the code duplication in Python source code. I found that Python3.0 contains more duplicated code than the previous versions. The CPD tool is far from perfect, but I still feel the analysis makes some sense. |Source Code | NLOC | Dup60

Re: Lists implemented as integer-hashed Dictionaries?

2009-02-06 Thread Terry Reedy
er wrote: Somebody much more intelligent than I said today that someone told him that Python lists are just dictionaries with lists hashed by integers. Abstractly, which is to say, behaviorally, a Python list is a sequence class as defined under Built-in Types in the Library manual.

Re: Is c.l.py becoming less friendly?

2009-02-06 Thread Terry Reedy
Albert Hopkins wrote: Probably that [c.l.]python is becoming more popular and, like most things as they become popular, it loses its purity... much like the Internet in the early 1990s. Several years ago when I proposed the addition of list.pop(), a couple of people accused me of trying to

Re: Python3.0 has more duplication in source code than Python2.5

2009-02-06 Thread Martin v. Löwis
Does that say something about the code quality of Python3.0? Not necessarily. IIUC, copying a single file with 2000 lines completely could already account for that increase. It would be interesting to see what specific files have gained large numbers of additional files, compared to 2.5.

[issue3031] distutils package_dir/package_data failure

2009-02-06 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: works, and even tested in test_build_py.test_empty_package_dir -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3031

[issue3987] removed types from distutils.core [patch]

2009-02-06 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done in r69356 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3987 ___

[issue3386] [PATCH] distutils.sysconfig.get_python_lib prefix argument broken

2009-02-06 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: The patch looks fine to me. I'll send a mail to Andrew to ask him for a demonstration, and wait a week to commit it. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3386

[issue3986] removed string and type usage from distutils.cmd [patch]

2009-02-06 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: worked started in r3986 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3986 ___ ___ Python-bugs-list

[issue5164] backport distutils 3.x changes into 2.7 when appliabl

2009-02-06 Thread Tarek Ziadé
New submission from Tarek Ziadé ziade.ta...@gmail.com: It's annoying to get conflicts on changes in distutils in the trunk, when forward-porting to 3.x, because other changes where made there and only there. Things like PEP8-ification and modern syntax changes needs to be backported to 2.7 when

[issue2445] Use The CygwinCCompiler Under Cygwin

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2445

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2279

[issue2624] swig support in distutils should use the build and temp dirs

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2624 ___

[issue2943] Distutils should generate a better error message when the SDK is not installed

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek type: - behavior versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2943 ___

[issue2945] bdist_rpm does not list dist files (should effect upload)

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2945 ___

[issue3621] it would be nice if installers made by bdist_wininst stored an EstimatedSize property in the Windows registry

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3621 ___

[issue3902] distutils does not correctly create packages for compiled extensions

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3902

[issue4032] distutils cannot recognize .dll.a as library on cygwin

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4032 ___ ___

[issue4359] at runtime, distutils uses buildtime files

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4359

[issue5134] Compiler warnings in sqlite module

2009-02-06 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: Technically, both changes (or neither of them) generate the same output binaries, so I Don't Care(tm). My approach for disabling the warnings in the code has (to me) two advantages: 1. You immediately see that warnings are disabled. I

[issue5160] Intermittant segmentation fault with ctrl-c (threads and queues)

2009-02-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is stack trace. PyEval_EvalFrameEx(_frame * 0x00a62060, int 83) line 2841 + 6 bytes fast_function(_object * 0x, _object * * * 0x00fbfa98, int 1, int 1, int 9870576) line 3946 call_function(_object * * * 0x00fbfa98, int

[issue5157] os.stat('foo') succeds if 'foo.exe' exists on cygwin

2009-02-06 Thread Antoine Calando
Antoine Calando acala...@free.fr added the comment: Hi Martin, Actually, I just investigated the problem in the libs and did not check the python exe source code. I guess you are right, this looks more like an issue from cygwin. I was a bit irritated by hours of debugging when entering the

[issue5165] os.rename and other raise WindowsError

2009-02-06 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson krist...@ccpgames.com: in lib/test/test_os.py, there is a test class, Win32ErrorTests, that tests that certain functions return a WindowsError on failure. And indeed they do that, but that is in contradiction with the documentation. From the 2.6

[issue1835] Update version number in __init__.py

2009-02-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-02-05 14:23, Thomas Heller wrote: Thomas Heller thel...@ctypes.org added the comment: The distutils version number is now updated automatically by the Python release process, so the comment in that file can be removed. How

[issue5167] distutils/test_customize_compiler fails on windows

2009-02-06 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: test_customize_compiler fails on windows with following error message. ERROR: test_customize_compiler (distutils.tests.test_sysconfig.SysconfigTestCase ) --

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Sorry, I don't have VS2005. By the way, _PyVerify_fd seems to be required to VC6 too. Because fdopen(fd = _NHANDLE_) crashes on debug build and fdopen(bad fd _NHANDLE_) won't set errno to EBADF.

[issue5168] shutil.copystat does not copy the hidden flag on windows

2009-02-06 Thread Horváth István Róbert
New submission from Horváth István Róbert thr...@gmail.com: Hi! While copying hidden files on windows, the hidden flag is lost (surprisingly the read-only flag is copied). Is this a bug or a feature? The documentation only says that flags are also copied by shutil.copystat, but no details.

[issue5165] os.rename and other raise WindowsError

2009-02-06 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: WindowsError is a subclass of OSError, so it's not entirely contradictory, just a little misleading... :-) -- nosy: +mrabarnett ___ Python tracker rep...@bugs.python.org

[issue5165] os.rename and other raise WindowsError

2009-02-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: ah, well, silly me. then I'll just close this as Invalid. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5165

[issue2527] Pass a namespace to timeit

2009-02-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I'm sorry, this should have been another issue. Reassigning to you. -- assignee: pitrou - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527

[issue5066] IDLE documentation for Unix obsolete/incorrect

2009-02-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I don't know any. But since rst is so lightweight, it is usually not too much of a pain to just copy the text from the browser and reintroduce formatting because you're likely to have to go over and edit the whole content anyway.

[issue5158] Document distutils 'depends' option for extensions

2009-02-06 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: georg.brandl - tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5158 ___ ___

[issue5169] Default hash not equal to id on AMD Sempron

2009-02-06 Thread Chema Cortés
New submission from Chema Cortés dev.xt...@gmail.com: Sometimes, the default hash for user-defined object is not equal to the id of the object: In [1]: class A: ...: pass In [2]: a=A() In [3]: id(a),hash(a) Out[3]: (3082955212L, -1212012084) The test box has an AMD Sempron, a 64bit CPU

[issue5169] Default hash not equal to id on AMD Sempron

2009-02-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I wouldn't qualify this as a bug. hash() doesn't need to be equal to the id() even in the default case. Actually, it may be better for hash() to be equal to id()/4 or id()/8, depending on the standard alignment of the memory allocator. --

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: I see. I had thought your code was for VS2005 (VC8) I have changed the patch to work with VS2005 as well. I don't think we need to worry about VS2003 so much, as I don't think it is an officially supported compiler for the current

[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-06 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Eric, I noticed you said Fedora 6, so I checked which tcl/tk it includes and apparently it is 8.4.13, is that correct ? I tried using tcl/tk 8.4.13 and I managed to hang it too :) Try running test_tcl followed by test_ttk_guionly with regrtest.

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2009-02-06 Thread Denis S. Otkidach
New submission from Denis S. Otkidach denis.otkid...@gmail.com: ElementTree and minidom allow creation of not well-formed XML, that can't be parsed: from xml.etree import ElementTree element = ElementTree.Element('element') element.text = u'\0' xml = ElementTree.tostring(element,

[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-06 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Yes, I have these installed: tcl-8.4.13-3.fc6 tcl-devel-8.4.13-3.fc6 tk-8.4.13-3.fc6 tk-devel-8.4.13-3.fc6 When I run ./python Lib/test/regrtest.py test_tcl test_ttk_guionly, it hangs. ___ Python tracker

[issue5170] logging to file + encoding

2009-02-06 Thread shamilbi
New submission from shamilbi shami...@gmail.com: if i configure logging into a file with encoding = 'cp1251' and do logger.debug(u'...') then i get crash with UnicodeError i suggest reimplementing method FileHandler.emit(): ... if isinstance(msg, unicode): stream.write(f % msg)# it

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-06 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I agree. Please focus on _MSC_VER = 1400. I'll post new issue about VC6 after this issue will be solved. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4804

[issue5170] logging to file + encoding

2009-02-06 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - vsajip nosy: +vsajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5170 ___ ___

[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-06 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: When I run ./python Lib/test/regrtest.py test_tcl test_ttk_guionly, it hangs. I have isolated it now: Traceback (most recent call last): File stdin, line 1, in module File /home/gpolo/python-dev/python-trunk/Lib/lib-tk/Tkinter.py, line

[issue5169] Default hash not equal to id on AMD Sempron

2009-02-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It looks like this is a platform with sizeof(long) == 4 and sizeof(void *) == 8. Is that right? As Antoine says, I can't see any problem here. Why do you think that hash(a) should be equal to id(a) in this case? Antoine, in what way

[issue4010] configure options don't trickle down to distutils

2009-02-06 Thread Akira Kitada
Changes by Akira Kitada akit...@gmail.com: Removed file: http://bugs.python.org/file12868/issue4010.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___

[issue4010] configure options don't trickle down to distutils

2009-02-06 Thread Akira Kitada
Akira Kitada akit...@gmail.com added the comment: s/get_config_vars/get_config_var/ -- versions: +Python 3.1 Added file: http://bugs.python.org/file12954/issue4010.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: I've taken the patch from Hirokazu and enhanced it: 1) it needed work to function with Visual Studio 2008 2) It now exposes a function so that _fileio.c can make use of it too. 3) Turned off the CRT manipulation in exceptions.c 4)

[issue5167] distutils/test_customize_compiler fails on windows

2009-02-06 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: fixed in r69366 thanks for the patch -- assignee: - tarek status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5167 ___

[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-06 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: After I have isolated it now:, there should be this interactive session (but gmail ate it apparently): import os del os.environ['DISPLAY'] import Tkinter t = Tkinter.Tcl() t.loadtk() Traceback (most recent call last): File stdin, line 1,

[issue5122] test_tcl and test_ttk_guionly don't like each other

2009-02-06 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Ok, I've found the cause of the problem and the patch attached should solve it but shouldn't be applied! This was just a quick fix I did to confirm what I expected, I will add something more correct later. _tkinter is aware of this deadlock

[issue5171] itertools.product docstring missing 'repeat' argument

2009-02-06 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: The docstring for itertools.product seems to be missing any mention of the repeat keyword argument, in both the trunk and py3k, and the maintenance branches. (The itertools.rst docs are fine, though.) -- assignee: rhettinger

[issue5169] Default hash not equal to id on AMD Sempron

2009-02-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Because with hash() == id() == address of the PyObject, the hash is always a multiple of 4 or 8 (I think it's 8), so (hash() % dict_or_set_table_size) is non-uniformly distributed in most cases. ___ Python

<    1   2   3   >