Re: pls help me with this prog

2012-10-21 Thread 88888 Dihedral
On Friday, October 19, 2012 4:40:42 PM UTC+8, inshu chauhan wrote: in this prog I have written a code to calculate teh centre of a given 3D data.. but i want to calculate it for every 3 points not the whole data, but instead of giving me centre for every 3 data the prog is printing

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Steven D'Aprano
On Sat, 20 Oct 2012 14:18:47 +, Grant Edwards wrote: On 2012-10-20, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Strangely, we've gone from 80-character fixed width displays to who-knows-what (if I drop my font size I can probably get nearly 200 characters across in full-screen

Re: change the first letter into uppercase (ask)

2012-10-21 Thread Zero Piraeus
: On 20 October 2012 20:22, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Based on the documentation, most of that pattern is fluff: (?#...) is considered a comment. The comment isn't entirely fluff ... it provides a Google target for whoever's marking OP's assignment, should they

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Chris Angelico
On Sun, Oct 21, 2012 at 7:07 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 20 Oct 2012 14:18:47 +, Grant Edwards wrote: True, but nobody prints source code out on paper do they? I do. There's nothing better than spreading out a dozen sheets of source code over

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Steven D'Aprano
On Sun, 21 Oct 2012 20:20:41 +1100, Chris Angelico wrote: On Sun, Oct 21, 2012 at 7:07 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 20 Oct 2012 14:18:47 +, Grant Edwards wrote: True, but nobody prints source code out on paper do they? I do. There's nothing

a prob.. error in prog ..dont knw how to correct

2012-10-21 Thread inshu chauhan
I am new to python and have a little problem to solve .. i have an array with x, y, z co-ordinates in it as a tuple. I am trying to find the distance between each point and sorting the points according to the min distance.. i have tried a prog but m stuck bcoz of this error which I am unable to

Re: printing (was: A desperate lunge for on-topic-ness)

2012-10-21 Thread Tim Chase
On 10/21/12 05:00, Steven D'Aprano wrote: I seriously do print out source code. When I'm having trouble seeing how the parts of a module fit together, reading print-outs is a good way around the problem. I don't print my personal code--both in light of the fact that I know it much more

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Gene Heskett
On Sunday 21 October 2012 07:02:26 Steven D'Aprano did opine: On Sat, 20 Oct 2012 14:18:47 +, Grant Edwards wrote: On 2012-10-20, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Strangely, we've gone from 80-character fixed width displays to who-knows-what (if I drop my font size

Python 3.3 can't sort memoryviews as they're unorderable

2012-10-21 Thread Mark Lawrence
http://docs.python.org/dev/whatsnew/3.3.html states memoryview comparisons now use the logical structure of the operands and compare all array elements by value. So I'd have thought that you should be able to compare them and hence sort them, but this is the state of play. Python 3.3.0

Re: a prob.. error in prog ..dont knw how to correct

2012-10-21 Thread Zero Piraeus
: On 21 October 2012 06:09, inshu chauhan insidesh...@gmail.com wrote: I am new to python and have a little problem to solve .. import cv This module is not used in your code [and isn't part of the standard library]. from math import floor, sqrt, ceil You're only using one of these

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Chris Angelico
On Sun, Oct 21, 2012 at 9:00 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Er, no. Note spelling of source code vs souce code. Hence the grin. Ahh. I totally didn't see that, I'm way too used to reading past typos. Sure. Printing out *source* code, that's altogether different.

Re: a prob.. error in prog ..dont knw how to correct

2012-10-21 Thread Jussi Piitulainen
inshu chauhan writes: I am new to python and have a little problem to solve .. i have an array with x, y, z co-ordinates in it as a tuple. I am trying to find the distance between each point and sorting the points according to the min distance.. i have tried a prog but m stuck bcoz of this

Re: Interest in seeing sh.py in the stdlib

2012-10-21 Thread Jason Friedman
I'm interested in making sh.py more accessible to help bring Python forward in the area of shell scripting, so I'm interested in seeing if sh would be suitable for the standard library. Is there any other interest in something like this? Pretty slick. My only concern is portability, are

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread DJC
On 20/10/12 15:18, Grant Edwards wrote: On 2012-10-20, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Strangely, we've gone from 80-character fixed width displays to who-knows-what (if I drop my font size I can probably get nearly 200 characters across in full-screen mode)...

RE: Python does not take up available physical memory

2012-10-21 Thread Pradipto Banerjee
I tried this on a different PC with 12 GB RAM. As expected, this time, reading the data was no issue. I noticed that for large files, Python takes up 2.5x size in memory compared to size on disk, for the case when each line in the file is retained as a string within a Python list. As an

get each pair from a string.

2012-10-21 Thread Vincent Davis
I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without multiple for loops, but maybe there is not :-) In the end I am going to what to get triples, quads... also. Thanks Vincent

Re: get each pair from a string.

2012-10-21 Thread Emile van Sebille
On 10/21/2012 11:33 AM, Vincent Davis wrote: I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without multiple for loops, but maybe there is not :-) In the end I am going to what to

Re: get each pair from a string.

2012-10-21 Thread Ian Kelly
On Sun, Oct 21, 2012 at 12:33 PM, Vincent Davis vinc...@vincentdavis.net wrote: I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without multiple for loops, but maybe there is

Re: get each pair from a string.

2012-10-21 Thread Vincent Davis
@Emile, I feel a little stupid, in my mind it was more difficult than in reality. x = 'apple' for f in range(len(x)-1): print(x[f:f+2]) @Ian, Thanks for that I was just looking in to that. I wonder which is faster I have a large set of strings to process. I'll try some timings if I get a

Re: get each pair from a string.

2012-10-21 Thread Mark Lawrence
On 21/10/2012 19:33, Vincent Davis wrote: I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without multiple for loops, but maybe there is not :-) In the end I am going to what to get

Re: get each pair from a string.

2012-10-21 Thread Emile van Sebille
On 10/21/2012 11:51 AM, Ian Kelly wrote: On Sun, Oct 21, 2012 at 12:33 PM, Vincent Davis vinc...@vincentdavis.net wrote: I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without

Re: get each pair from a string.

2012-10-21 Thread Ian Kelly
On Sun, Oct 21, 2012 at 12:58 PM, Vincent Davis vinc...@vincentdavis.net wrote: x = 'apple' for f in range(len(x)-1): print(x[f:f+2]) @Ian, Thanks for that I was just looking in to that. I wonder which is faster I have a large set of strings to process. I'll try some timings if I get a

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Steven D'Aprano
On Sun, 21 Oct 2012 22:43:07 +1100, Chris Angelico wrote: On Sun, Oct 21, 2012 at 9:00 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Er, no. Note spelling of source code vs souce code. Hence the grin. Ahh. I totally didn't see that, I'm way too used to reading past typos.

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Grant Edwards
On 2012-10-21, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 21 Oct 2012 22:43:07 +1100, Chris Angelico wrote: On Sun, Oct 21, 2012 at 9:00 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Er, no. Note spelling of source code vs souce code. Hence the grin.

Re: get each pair from a string.

2012-10-21 Thread Emile van Sebille
On 10/21/2012 12:06 PM, Ian Kelly wrote: On Sun, Oct 21, 2012 at 12:58 PM, Vincent Davis vinc...@vincentdavis.net wrote: x = 'apple' for f in range(len(x)-1): print(x[f:f+2]) @Ian, Thanks for that I was just looking in to that. I wonder which is faster I have a large set of strings to

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Roy Smith
In article k61i2o$63u$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: On 2012-10-21, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 21 Oct 2012 22:43:07 +1100, Chris Angelico wrote: On Sun, Oct 21, 2012 at 9:00 PM, Steven D'Aprano

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Chris Angelico
On Mon, Oct 22, 2012 at 6:11 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 21 Oct 2012 22:43:07 +1100, Chris Angelico wrote: On Sun, Oct 21, 2012 at 9:00 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Er, no. Note spelling of source code vs souce

Re: Python does not take up available physical memory

2012-10-21 Thread Tim Delaney
On 22 October 2012 01:14, Pradipto Banerjee pradipto.baner...@adainvestments.com wrote: I tried this on a different PC with 12 GB RAM. As expected, this time, reading the data was no issue. I noticed that for large files, Python takes up 2.5x size in memory compared to size on disk, for the

Re: Interest in seeing sh.py in the stdlib

2012-10-21 Thread Alex Clark
On 2012-10-21 16:59:16 +, Dennis Lee Bieber said: On Sun, 21 Oct 2012 07:41:52 -0600, Jason Friedman ja...@powerpull.net declaimed the following in gmane.comp.python.general: Pretty slick. My only concern is portability, are there other examples of modules (excepting Win32) that work on

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Chris Angelico
On Mon, Oct 22, 2012 at 7:19 AM, Roy Smith r...@panix.com wrote: Of course, the same can happen in Python. I could do: foo = default value if blah == 47: fooo = some other value print foo No syntax error, no NameError, just the wrong thing printing. Yeah, that's the worst kind of bug.

Re: get each pair from a string.

2012-10-21 Thread Joshua Landau
On 21 October 2012 19:33, Vincent Davis vinc...@vincentdavis.net wrote: I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without multiple for loops, but maybe there is not

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Joshua Landau
On 21 October 2012 21:38, Chris Angelico ros...@gmail.com wrote: On Mon, Oct 22, 2012 at 7:19 AM, Roy Smith r...@panix.com wrote: Of course, the same can happen in Python. I could do: foo = default value if blah == 47: fooo = some other value print foo No syntax error, no

Re: get each pair from a string.

2012-10-21 Thread Vlastimil Brom
2012/10/21 Vincent Davis vinc...@vincentdavis.net: I am looking for a good way to get every pair from a string. For example, input: x = 'apple' output 'ap' 'pp' 'pl' 'le' I am not seeing a obvious way to do this without multiple for loops, but maybe there is not :-) In the end I am

Re: A desperate lunge for on-topic-ness

2012-10-21 Thread Walter Hurry
On Sat, 20 Oct 2012 16:37:23 -0400, Roy Smith wrote: sys.stderr.write(Error: Can't find the file 'settings.py' in the directory containing %r.\nYou'll have to run django-profile.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an

Recursive Generator Error?

2012-10-21 Thread David
I have a tree-like data structure, the basic elements are hash tables, and they are grouped into lists, like [[{'a':1},[{'b':2}]]]. And I want to flat the lists and visit hash table one by one, like {'a':1}, {'b':2}. But my program didn't work as I wish. When it entered the 2nd flat_yield, it

Re: Recursive Generator Error?

2012-10-21 Thread Terry Reedy
On 10/21/2012 7:29 PM, David wrote: I have a tree-like data structure, the basic elements are hash tables, and they are grouped into lists, like [[{'a':1},[{'b':2}]]]. And I want to flat the lists and visit hash table one by one, like {'a':1}, {'b':2}. But my program didn't work as I wish. When

program loaded in memory

2012-10-21 Thread Anatoli Hristov
Hello, I need an advice about a small script I run 24/24 7/7. It's a script converted to EXE using py2exe and this script takes - grows 30kb RAM on each loop which means that for 10hours it grows up with 180mb memory. is there something I can do ? From the ini file I'm loading only the URL and

Re: program loaded in memory

2012-10-21 Thread Dave Angel
On 10/21/2012 08:02 PM, Anatoli Hristov wrote: Hello, I need an advice about a small script I run 24/24 7/7. It's a script converted to EXE using py2exe and this script takes - grows 30kb RAM on each loop which means that for 10hours it grows up with 180mb memory. is there something I can

Re: get each pair from a string.

2012-10-21 Thread Vincent Davis
@vbr Thats interesting. I would never have come up with that. Vincent On Sun, Oct 21, 2012 at 3:48 PM, Vlastimil Brom vlastimil.b...@gmail.comwrote: vbr -- http://mail.python.org/mailman/listinfo/python-list

Re: program loaded in memory

2012-10-21 Thread Anatoli Hristov
Yes sorry, the name var(interval) is loaded from the ini file and also the Url. The reason is that the ini file will be configured from someone else. Example of the file URL = www # define your url interval = 1 # minutes for sync I see in the task manager each time it downloads the file that it

Re: get each pair from a string.

2012-10-21 Thread Vincent Davis
To All, I appreciate the range of answers and the time each of you take to think about and answer my question. Whether or not I use them I find them all educational. Thanks again. Vincent On Mon, Oct 22, 2012 at 2:03 AM, Emile van Sebille em...@fenx.com wrote: On 10/21/2012 12:06 PM, Ian

Re: Recursive Generator Error?

2012-10-21 Thread David
On Monday, October 22, 2012 7:59:53 AM UTC+8, Terry Reedy wrote: On 10/21/2012 7:29 PM, David wrote: I have a tree-like data structure, the basic elements are hash tables, and they are grouped into lists, like [[{'a':1},[{'b':2}]]]. And I want to flat the lists and visit hash table

Re: program loaded in memory

2012-10-21 Thread Dave Angel
On 10/21/2012 08:31 PM, Anatoli Hristov wrote: Yes sorry, the name var(interval) is loaded from the ini file and also the Url. The reason is that the ini file will be configured from someone else. Example of the file URL = www # define your url interval = 1 # minutes for sync I see in

Re: Recursive Generator Error?

2012-10-21 Thread Steven D'Aprano
On Sun, 21 Oct 2012 17:40:41 -0700, David wrote: If I have one yield in function, the function will become generator, Almost correct. The function becomes a *generator function*, that is, a function that returns a generator object. Sometimes people abbreviate that to generator, but that is

Re: Preventing crap email from google?

2012-10-21 Thread Ben Finney
Grant Edwards invalid@invalid.invalid writes: Posts made via the google-groups web site are a problem, and I plonked them all years and years ago... Walter Hurry walterhu...@lavabit.com writes: It is Google bloody Groups which is the problem. I should have plonked posts from there ages

Re: get each pair from a string.

2012-10-21 Thread Ian Foote
On 22/10/12 09:03, Emile van Sebille wrote: So, as OP's a self confessed newbie asking about slicing, why provide an example requiring knowledge of tee, enumerate, next and izip? Because not only the newbie will read the thread? I for one was interested to see all the different possible

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-21 Thread Pedro Meirelles
Pedro Meirelles added the comment: Hello, I am biologist I am just starting to learn Python. I have a mac and I am using OS X 10.8.2. I have installed Python 2.7.3 and when I try to copy and paste (use command) or go to preferences IDLE crashes. I did what Ned Deily said in msg169739: sudo

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-21 Thread Ned Deily
Ned Deily added the comment: Pedro, try installing the older ActiveTcl 8.5.11.1 from here: http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ It is not perfect but does not have the Preferences regression and does have fixes for crashes when typing composite input characters.

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-21 Thread Pedro Meirelles
Pedro Meirelles added the comment: Thank you very much, Ned! It worked, awesome! All the best 2012/10/20 Ned Deily rep...@bugs.python.org Ned Deily added the comment: Pedro, try installing the older ActiveTcl 8.5.11.1 from here:

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here is the patch which captures both HTTPError and URLError at the open_file and thus preventing multiple exceptions to be raised ( URLError and next IOError). This can go in 3.4 and since this is bug, where correct exception is not being caught and wrong

[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-21 Thread Brian Quinlan
Brian Quinlan added the comment: The concurrent.futures stuff looks good to me. Could you add a comment explaining why the delete is necessary? And, as Antoine said, the test should be CPython only. -- ___ Python tracker rep...@bugs.python.org

[issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self')

2012-10-21 Thread Brian Quinlan
Brian Quinlan added the comment: This has come up before. Did you actually bang into this? Because the fix seems pretty ugly to me and the work-around (using functools.partial) is pretty easy. But, if people are actually hitting this, then your is probably the best that we can do. --

[issue13785] Make concurrent.futures.Future state public

2012-10-21 Thread Brian Quinlan
Changes by Brian Quinlan br...@sweetapp.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13785 ___ ___ Python-bugs-list

[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2012-10-21 Thread Brian Quinlan
Brian Quinlan added the comment: I'm closing this since the filer hasn't specified exactly what they want. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8792 ___

[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2012-10-21 Thread Brian Quinlan
Changes by Brian Quinlan br...@sweetapp.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11271 ___ ___ Python-bugs-list

[issue15772] Unresolved symbols in Windows 64-bit python

2012-10-21 Thread Silverback Networks
Silverback Networks added the comment: Boy, do I feel like an idiot now. An update to VC 2010 Express SP1 had clobbered by x64 build capabilities completely, and even reinstalling the SDK did nothing. It turns out that there's a specific hotfix you have to install to get x64 builds working

[issue15522] improve 27 percent performance on stringpbject.c (by prefetch and loop optimization)

2012-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm closing this issue, since the OP since to have lost interest in his/her proposal. Abael, if you want to propose an actual patch, please open a new issue. -- resolution: - rejected status: open - closed ___

[issue16293] curses.ungetch raises OverflowError when given -1

2012-10-21 Thread STINNER Victor
STINNER Victor added the comment: Do you consider this behaviour as a bug? What is the behaviour in C? Le 21 oct. 2012 03:25, Julian Berman rep...@bugs.python.org a écrit : New submission from Julian Berman: The following code now raises an OverflowError on 3.3: import curses def

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-21 Thread Kevin Chen
Kevin Chen added the comment: Okay just tried it. This is under Windows 7 x64. I created a .py file with read-only permission. When I import the .py module, the created .pyc doesn't have read-only permission. So it works as intended under Windows OS. As long as under posix system the

[issue16220] wsgiref does not call close() on iterable response

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5af1b235dab by Antoine Pitrou in branch '2.7': Issue #16220: wsgiref now always calls close() on an iterable response. http://hg.python.org/cpython/rev/d5af1b235dab -- nosy: +python-dev ___ Python

[issue16294] 8 space indent in tutorial

2012-10-21 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/stdlib2.html#weak-references In the code example, the two class funtions' bodies have indents of 8 spaces. All other indents in the docs are 4 spaces. I suggest here we use 4 spaces also. -- assignee: docs@python

[issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin

2012-10-21 Thread Ray Donnelly
Changes by Ray Donnelly mingw.andr...@gmail.com: Removed file: http://bugs.python.org/file27641/0010-DARWIN-CROSS.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16291 ___

[issue16291] Enable darwin-host cross compilation. Tested with build=linux, host=darwin

2012-10-21 Thread Ray Donnelly
Ray Donnelly added the comment: Here's the darwin cross enabling portion. I've also removed the warnings fixes from it as they're not relevant. -- title: Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin - Enable darwin-host

[issue16220] wsgiref does not call close() on iterable response

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset eef470032457 by Antoine Pitrou in branch '3.2': Issue #16220: wsgiref now always calls close() on an iterable response. http://hg.python.org/cpython/rev/eef470032457 New changeset 2530acc092d8 by Antoine Pitrou in branch '3.3': Issue #16220:

[issue16220] wsgiref does not call close() on iterable response

2012-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch is now committed, Brent, thank you! -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16220

[issue1598083] Top-level exception handler writes to stdout unsafely

2012-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is certainly a low-priority issue, as it will almost never happen in practice. -- nosy: +pitrou priority: high - low stage: test needed - needs patch versions: +Python 3.4 ___ Python tracker

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-21 Thread desolat
Changes by desolat nuabara...@web.de: -- nosy: -desolat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6074 ___ ___ Python-bugs-list mailing list

[issue16292] Cross compilation fixes (general)

2012-10-21 Thread Roumen Petrov
Roumen Petrov added the comment: duplicate with 15483 and 15484 -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16292 ___ ___

[issue16293] curses.ungetch raises OverflowError when given -1

2012-10-21 Thread Julian Berman
Julian Berman added the comment: Hi, sorry for being terse :). After checking a bit, man 3 getch says that it returns ERR (-1) in non-blocking mode if no input is available. I think you're right though -- calling ungetch without checking for the error value seems like it should be a bug in

[issue5128] compileall: consider ctime

2012-10-21 Thread Brett Cannon
Brett Cannon added the comment: There is no patch, Djoume, but honestly that's fine since if you want to submit a change to something it should go in a new issue. But honestly compileall needs to be rewritten in Python 3.4 to use importlib and have it control when source code should be

[issue12034] check_GetFinalPathNameByHandle() suboptimal

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8afa3ce5ff3e by Antoine Pitrou in branch 'default': Issue #12034: Fix bogus caching of result in check_GetFinalPathNameByHandle. http://hg.python.org/cpython/rev/8afa3ce5ff3e -- nosy: +python-dev ___

[issue12034] check_GetFinalPathNameByHandle() suboptimal

2012-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed, thank you! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12034

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc02eca14526 by Nadeem Vawda in branch 'default': Issue #16034 follow-up: Apply optimizations to the lzma module. http://hg.python.org/cpython/rev/cc02eca14526 -- ___ Python tracker

[issue16264] test_logging failure on Windows 7 buildbot

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0fb2267897ba by Antoine Pitrou in branch 'default': Try to fix issue #16264 (test_logging failure on some buildbots). http://hg.python.org/cpython/rev/0fb2267897ba -- ___ Python tracker

[issue14621] Hash function is not randomized properly

2012-10-21 Thread Armin Rigo
Armin Rigo added the comment: Just to make it extra clear: Vlado showed that the -R switch of Python can easily be made fully pointless, with only a bit of extra work. Here is how: * Assume you have an algo that gives you as many strings with colliding hashes as you want, provided you know

[issue16264] test_logging failure on Windows 7 buildbot

2012-10-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks ok now. It's a timing glitch because both SocketHandler's built-in timeout and its default retry delay are one second, so when connect times out once the next retry time is a bit behind time.time(). (note: SocketHandler's implementation looks grotesque.

[issue14621] Hash function is not randomized properly

2012-10-21 Thread Armin Rigo
Armin Rigo added the comment: For reference, the above means that we can implement -R support for PyPy as a dummy ignored flag, and get security that is very close to CPython's. :-) -- keywords: +easy ___ Python tracker rep...@bugs.python.org

[issue14621] Hash function is not randomized properly

2012-10-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: That doesn't make it any easy CPython issue. :) -- keywords: -easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___

[issue12692] test_urllib2net is triggering a ResourceWarning

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92656b5df2f2 by Nadeem Vawda in branch 'default': Issue #12692: Fix resource leak in urllib.request. http://hg.python.org/cpython/rev/92656b5df2f2 -- nosy: +python-dev ___ Python tracker

[issue12692] test_urllib2net is triggering a ResourceWarning

2012-10-21 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12692 ___

[issue5148] gzip.open breaks with 'U' flag

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset e647229c422b by Nadeem Vawda in branch '2.7': Issue #5148: Ignore 'U' in mode given to gzip.open() and gzip.GzipFile(). http://hg.python.org/cpython/rev/e647229c422b -- nosy: +python-dev ___ Python

[issue14621] Hash function is not randomized properly

2012-10-21 Thread Christian Heimes
Christian Heimes added the comment: As far as my understanding goes the issue can't be solved with our current hash algorithm. We'd have to use a crypto hash function or at least a hash algorithm that has an increased avalanche effect on the outcome. The current hash algorithm is designed and

[issue5148] gzip.open breaks with 'U' flag

2012-10-21 Thread Nadeem Vawda
Nadeem Vawda added the comment: The data corruption issue is now fixed in the 2.7 branch. In 3.x, using a mode containing 'U' results in an exception rather than silent data corruption. Additionally, gzip.open() has supported text modes (rt/wt/at) and newline translation since 3.3 [issue

[issue16230] select.select crashes on resized lists

2012-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16230 ___ ___

[issue16228] JSON crashes during encoding resized lists

2012-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16228 ___ ___

[issue16295] With VS2010 the select extension links against wsock32 instead of ws2_32

2012-10-21 Thread Richard Oudkerk
New submission from Richard Oudkerk: Using VS2010 _socket links against ws2_32.lib but select links against wsock32.lib. Using VS2008 both extensions link against ws2_32.lib. It appears that the conversion to VS2010 caused the regression. (Compare #10295 and #11750.) -- messages:

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-21 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16288 ___ ___

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-10-21 Thread Silverback Networks
New submission from Silverback Networks: Once I got my broken environment fixed, this was the only thing that didn't work. The bug is that VS 2010 no longer creates a manifest by default, despite the documentation, and there are confirmation posts around the internet. /Manifest has to be

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-10-21 Thread Silverback Networks
Silverback Networks added the comment: oops, add _debug on the second part of the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16296 ___

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-10-21 Thread Christian Heimes
Christian Heimes added the comment: Can you please upload a proper patch files? It makes code review and applying the patch easier for us. -- components: +Windows keywords: +3.3regression nosy: +christian.heimes stage: - patch review versions: -Python 3.1

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-21 Thread Robert Collins
Robert Collins added the comment: testscenarios copies the tests, it doesn't call the constructor for the class; this makes things a lot simpler than trying to reconstruct whatever state the object may have from scratch again. As for str(test) and test.id() being different - well sure they

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-21 Thread Mike Hoy
Changes by Mike Hoy mho...@gmail.com: -- nosy: -mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16288 ___ ___ Python-bugs-list mailing list

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-21 Thread Michael Foord
Michael Foord added the comment: So three including str sounds sufficient to me: short description, long description and repr (with str == repr) for debugging. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16288

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-10-21 Thread Silverback Networks
Silverback Networks added the comment: Sure. I got this patch from Mercurial, just in case, but it looks the same. -- keywords: +patch Added file: http://bugs.python.org/file27648/msvc9manifest.diff ___ Python tracker rep...@bugs.python.org

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-10-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brian.curtin, loewis, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16296 ___ ___

[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha
Changes by Ravi Sinha rss1...@gmail.com: Added file: http://bugs.python.org/file27649/27.doc_lib_Oct21_2012.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16154 ___

[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha
Changes by Ravi Sinha rss1...@gmail.com: Added file: http://bugs.python.org/file27650/32.doc_lib_Oct21_2012.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16154 ___

[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha
Changes by Ravi Sinha rss1...@gmail.com: Added file: http://bugs.python.org/file27651/33.doc_lib_Oct21_2012.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16154 ___

[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha
Ravi Sinha added the comment: Based on what I saw on some other issues, I think there is just a separate patch for each version (coming from separate working repositories), but all attached to the same issue. So I am doing the same. All the changes have been made to files under Doc/library/ -

[issue14398] bz2.BZ2DEcompressor.decompress fail on large files

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebb8c7d79f52 by Nadeem Vawda in branch '3.2': Issue #14398: Fix size truncation and overflow bugs in bz2 module. http://hg.python.org/cpython/rev/ebb8c7d79f52 New changeset 25fdf297c077 by Nadeem Vawda in branch '3.3': Merge #14398: Fix size

  1   2   >