Re: little emacs lisp tutorial on turning a url into a link

2010-12-10 Thread Steve Holden
On 12/10/2010 4:52 AM, small Pox wrote: [... irrelevant stuff...] I advocate neither anti semitism nor pro semitism. just the rule of law that treats people equally and fairly and where money does not count. this cannot be achieved without demolishing fractional reserve lending, and not

Re: printing error message from an Exception

2010-12-10 Thread mark jason
On Dec 10, 11:55 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote:     # By the way, IOError is not the only exception you could see. thanks for the help Steven. Is it OK to catch Exception instead of IOError ? In some operation which can cause many errors ,can I use the

Re: printing error message from an Exception

2010-12-10 Thread Peter Otten
mark jason wrote: hi I was trying out some file operations and was trying to open a non existing file as below def do_work(filename): try: f = open(filename,r); print 'opened' except IOError, e: print 'failed',e.message finally: f.close()

Re: Proposed changes to logging defaults

2010-12-10 Thread Jean-Michel Pichavant
Vinay Sajip wrote: Some changes are being proposed to how logging works in default configurations. Briefly - when a logging event occurs which needs to be output to some log, the behaviour of the logging package when no explicit logging configuration is provided will change, most likely to log

instance has no __call__ method

2010-12-10 Thread frank cui
Hi all, I'm a novice learner of python and get caught in the following trouble and hope experienced users can help me solve it:) Code: --- $ cat Muffle_ZeroDivision.py #!/usr/bin/env python class MuffledCalculator: muffled

Re: printing error message from an Exception

2010-12-10 Thread Jean-Michel Pichavant
mark jason wrote: On Dec 10, 11:55 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: # By the way, IOError is not the only exception you could see. thanks for the help Steven. Is it OK to catch Exception instead of IOError ? In some operation which can cause many

Python critique

2010-12-10 Thread kolo 32
Hi, all, Python critique from strchr.com: http://www.strchr.com/python_critique -- http://mail.python.org/mailman/listinfo/python-list

Re: instance has no __call__ method

2010-12-10 Thread Dave Angel
On 01/-10/-28163 02:59 PM, frank cui wrote: Hi all, I'm a novice learner of python and get caught in the following trouble and hope experienced users can help me solve it:) Code: --- $ cat Muffle_ZeroDivision.py #!/usr/bin/env

Re: Proposed changes to logging defaults

2010-12-10 Thread Antoine Pitrou
On Fri, 10 Dec 2010 11:17:33 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Why would you log informative messages to stderr ? (debug, info, warning) How stderr is a better choice than stdout ? By construction really. stderr is initially for errors, but it is generally used for out

Re: run a function in another processor in python

2010-12-10 Thread Astan Chee
Thanks for that. I'll try and see if it makes any difference but I'm using python 2.6 not 3 Are the multiprocessing modules different? That code (or whatever is using the multiprocessing module) seems to cause infinite python processes on my machine and eventually kills it. I'm running python 2.6

Re: run a function in another processor in python

2010-12-10 Thread Astan Chee
I just saw this: http://bugs.python.org/issue8094 which seem to be similar to what I'm having. Does anyone know if there is a fix for it? Thanks again On Fri, Dec 10, 2010 at 11:02 PM, Astan Chee astan.c...@gmail.com wrote: Thanks for that. I'll try and see if it makes any difference but I'm

Re: run a function in another processor in python

2010-12-10 Thread Astan Chee
On Fri, Dec 10, 2010 at 1:37 AM, Peter Otten __pete...@web.de wrote: I can't replicate the crash. However, your problem looks like there is a ready-to-use solution: http://docs.python.org/library/multiprocessing.html#using-a-pool-of-workers --

Re: Python critique

2010-12-10 Thread Octavian Rasnita
It is true that Python doesn't use scope limitations for variables? Octavian - Original Message - From: kolo 32 kala32k...@gmail.com Newsgroups: comp.lang.python To: python-list@python.org Sent: Friday, December 10, 2010 12:31 PM Subject: Python critique Hi, all, Python critique

decouple copy of a list

2010-12-10 Thread Dirk Nachbar
I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? Dirk -- http://mail.python.org/mailman/listinfo/python-list

Re: 64 bit memory usage

2010-12-10 Thread Rob Randall
You guys are right. If I disable the gc it will use all the virtual RAM in my test. The application I have been running these tests for is a port of a program written in a LISP-based tool running on Unix. It does a mass of stress calculations. The port has been written using a python-based

Re: decouple copy of a list

2010-12-10 Thread Kushal Kumaran
On Fri, Dec 10, 2010 at 7:18 PM, Dirk Nachbar dirk...@gmail.com wrote: I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? b = a[:] will create a copy of the list. If the elements of the list are references to mutable objects (objects

Re: decouple copy of a list

2010-12-10 Thread Daniel Urban
b = list(a) or b = a[:] -- http://mail.python.org/mailman/listinfo/python-list

Re: decouple copy of a list

2010-12-10 Thread Wolfgang Rohdewald
On Freitag 10 Dezember 2010, Dirk Nachbar wrote: I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? Dirk b=a[:] -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Python critique

2010-12-10 Thread Jean-Michel Pichavant
Octavian Rasnita wrote: It is true that Python doesn't use scope limitations for variables? Octavian Python does have scope. The problem is not the lack of scope, to problem is the shadow declaration of some python construct in the current scope. print x # raise NameError [x for x in

Re: Comparisons of incompatible types

2010-12-10 Thread Mark Wooding
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: On Thu, 09 Dec 2010 12:21:45 +, Mark Wooding wrote: John Nagle na...@animats.com writes: sort has failed because it assumes that a b and b c implies a c. But that's not a valid assumption here. It's not good to break

Re: decouple copy of a list

2010-12-10 Thread Jean-Michel Pichavant
Dirk Nachbar wrote: I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? Dirk In [1]: a = [1,2,3] In [2]: b = a[:] In [3]: b[0] = 5 In [4]: a Out[4]: [1, 2, 3] In [5]: b Out[5]: [5, 2, 3] Alternatively, you can write import copy

Re: decouple copy of a list

2010-12-10 Thread Dirk Nachbar
On Dec 10, 1:56 pm, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Freitag 10 Dezember 2010, Dirk Nachbar wrote: I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? Dirk b=a[:] -- Wolfgang I did that but then some

Re: Python critique

2010-12-10 Thread Stefan Behnel
Jean-Michel Pichavant, 10.12.2010 15:02: the shadow declaration of some python construct in the current scope. print x # raise NameError [x for x in range(10)] # shadow declaration of x print x # will print 9 Note that this is rarely a problem in practice, and that this has been fixed in

Re: decouple copy of a list

2010-12-10 Thread Wolfgang Rohdewald
On Freitag 10 Dezember 2010, Dirk Nachbar wrote: b=a[:] -- Wolfgang I did that but then some things I do with b happen to a as well. as others said, this is no deep copy. So if you do something to an element in b, and if the same element is in a, both are changed as they are still

about module import ..

2010-12-10 Thread Teratux
Hello ... I'm using buildbot to build some of my projects. I'm having problems when I configure it and I think it might be with the python configuration on my pc: I'm getting this error: Traceback (most recent call last): File /usr/bin/buildbot, line 3, in from buildbot.scripts import

Re: Python critique

2010-12-10 Thread Octavian Rasnita
From: Jean-Michel Pichavant jeanmic...@sequans.com Octavian Rasnita wrote: It is true that Python doesn't use scope limitations for variables? Octavian Python does have scope. The problem is not the lack of scope, to problem is the shadow declaration of some python construct in the

Re: Deprecation warnings (2.7 - 3 )

2010-12-10 Thread nn
On Dec 9, 10:15 pm, rusi rustompm...@gmail.com wrote: In trying to get from 2.x to 3 Terry suggested I use 2.7 with deprecation warnings Heres the (first) set DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x DeprecationWarning: callable() not supported in 3.x;

Re: decouple copy of a list

2010-12-10 Thread cassiope
On Dec 10, 6:06 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Dirk Nachbar wrote: I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? Dirk In [1]: a = [1,2,3] In [2]: b = a[:] In [3]: b[0] = 5 In [4]: a Out[4]:

Re: Deprecation warnings (2.7 - 3 )

2010-12-10 Thread nn
On Dec 10, 11:17 am, nn prueba...@latinmail.com wrote: On Dec 9, 10:15 pm, rusi rustompm...@gmail.com wrote: In trying to get from 2.x to 3 Terry suggested I use 2.7 with deprecation warnings Heres the (first) set DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__

Re: Deprecation warnings (2.7 - 3 )

2010-12-10 Thread Tim Golden
On 10/12/2010 16:17, nn wrote: On Dec 9, 10:15 pm, rusirustompm...@gmail.com wrote: In trying to get from 2.x to 3 Terry suggested I use 2.7 with deprecation warnings Heres the (first) set DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x DeprecationWarning:

Re: Deprecation warnings (2.7 - 3 )

2010-12-10 Thread rusi
On Dec 10, 9:17 pm, nn prueba...@latinmail.com wrote: On Dec 9, 10:15 pm, rusi rustompm...@gmail.com wrote: In trying to get from 2.x to 3 Terry suggested I use 2.7 with deprecation warnings Heres the (first) set DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in

Re: trace cmd line args in 2.7

2010-12-10 Thread rusi
On Dec 10, 10:53 am, rusi rustompm...@gmail.com wrote: Ive installed python 2.7 And trace still ignores my ignore-module etc requests Is this a know bug with the trace module? I find it hard to believe that as traces naturally tend to get huge unless carefully trimmed --

Re: decouple copy of a list

2010-12-10 Thread nn
On Dec 10, 8:48 am, Dirk Nachbar dirk...@gmail.com wrote: I want to take a copy of a list a b=a and then do things with b which don't affect a. How can I do this? Dirk Not knowing the particulars, you may have to use: import copy b=copy.deepcopy(a) --

optparse/argparse for cgi/wsgi?

2010-12-10 Thread samwyse
Has anyone ever built some sort of optparse/argparse module for cgi/ wsgi programs? I can see why a straight port wouldn't work, but a module that can organize parameter handling for web pages seems like a good idea, especially if it provided a standard collection of both client- and server-side

continuing development on modules after they're installed

2010-12-10 Thread hoesley
I just started using distutils to install the modules I'm working on to site-packages. Now, however, if I make changes in my development directory, then import the modules into python, it always loads up the installed version. Thus, I can't continue development without first uninstalling the

Sage's Python

2010-12-10 Thread Akand Islam
In my system (Ubuntu 10.04) there are sage-4.6, python 2.6.5, tk8.5- dev installed. When I give command from terminal sage -f python-2.6.5.p8 to get sage's python it shows following message: No command 'sage' found, did you mean: Command 'save' from package 'atfs' (universe) Command 'page'

Re: continuing development on modules after they're installed

2010-12-10 Thread Ian
On Dec 10, 9:57 am, hoesley hoes...@gmail.com wrote: I just started using distutils to install the modules I'm working on to site-packages. Now, however, if I make changes in my development directory, then import the modules into python, it always loads up the installed version. Thus, I can't

Re: decouple copy of a list

2010-12-10 Thread Jean-Michel Pichavant
cassiope wrote: Alternatively, you can write import copy a = [1,2,3] b = a.copy() JM I'm not a pyguru, but... you didn't use copy quite right. Try instead: b= copy.copy(a) You're right, you're not a python guru so don't even try to contradict me ever again. ... :D of course I

Re: Proposed changes to logging defaults

2010-12-10 Thread Vinay Sajip
On Dec 10, 10:17 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Hi Jean-Michel, I think Antoine answered your other points, so I'll address the last one: Last question, if no handler is found, why not simply drop the log event, doing nothing ? It sounds pretty reasonable and less

Interview Programming puzzles

2010-12-10 Thread aviral gupta
For Programming puzzles visit the blog http://coders-stop.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: 64 bit memory usage

2010-12-10 Thread Rob Randall
I manged to get my python app past 3GB on a smaller 64 bit machine. On a test to check memory usage with gc disabled only an extra 6MB was used. The figures were 1693MB to 1687MB. This is great. Thanks again for the help. On 10 December 2010 13:54, Rob Randall rob.randa...@gmail.com wrote:

Re: continuing development on modules after they're installed

2010-12-10 Thread Jonathan Gardner
On Fri, Dec 10, 2010 at 9:32 AM, Ian ian.g.ke...@gmail.com wrote: On Dec 10, 9:57 am, hoesley hoes...@gmail.com wrote: I just started using distutils to install the modules I'm working on to site-packages. Now, however, if I make changes in my development directory, then import the modules

Re: run a function in another processor in python

2010-12-10 Thread MRAB
On 10/12/2010 17:52, Dennis Lee Bieber wrote: On Fri, 10 Dec 2010 23:02:24 +1100, Astan Cheeastan.c...@gmail.com declaimed the following in gmane.comp.python.general: for thread in threads: if not thread.is_alive(): threads.remove(thread) I can

unicode compare errors

2010-12-10 Thread Ross
I've a character encoding issue that has stumped me (not that hard to do). I am parsing a small text file with some possibility of various currencies being involved, and want to handle them without messing up. Initially I was simply doing: currs = [u'$', u'£', u'€', u'¥'] aFile =

Re: Python creates locked temp dir

2010-12-10 Thread Alex Willmer
On Dec 8, 6:26 pm, Christian Heimes li...@cheimes.de wrote: There isn't a way to limit access to a single process. mkdtemp creates the directory with mode 0700 and thus limits it to the (effective) user of the current process. Any process of the same user is able to access the directory.

Biography, Dr Michel Chossudovsky, Dr.Evgeny Chossudovsky: Writer with a distinguished UN career

2010-12-10 Thread small Pox
http://www.globalresearch.ca/index.php?context=viewArticlecode=20060212articleId=1955 Evgeny Chossudovsky: Writer with a distinguished UN career Global Research, February 12, 2006 The Irish Times - 2006-01-18 Throughout his UN career and until his death, Evgeny Chossudovsky expressed his firm

Re: Python critique

2010-12-10 Thread John Nagle
On 12/10/2010 2:31 AM, kolo 32 wrote: Hi, all, Python critique from strchr.com: http://www.strchr.com/python_critique I have criticisms of Python, but those aren't them. Probably the biggest practical problem with CPython is that C modules have to be closely matched to the version of

Re: unicode compare errors

2010-12-10 Thread Ross
On Dec 10, 2:51 pm, Ross ros...@gmail.com wrote: Initially I was simply doing:   currs = [u'$', u'£', u'€', u'¥']   aFile = open(thisFile, 'r')   for mline in aFile:              # mline might be £5.50      if item[0] in currs:           item = item[1:] Don't you love it when someone

Re: decouple copy of a list

2010-12-10 Thread Ben Finney
Dirk Nachbar dirk...@gmail.com writes: I want to take a copy of a list a b=a In addition to the other good replies you've received: To take a copy of an object, the answer is never ‘b = a’. That binds a reference ‘b’ to the same object referenced by ‘a’. The assignment operator ‘=’ never

Re: unicode compare errors

2010-12-10 Thread Nobody
On Fri, 10 Dec 2010 11:51:44 -0800, Ross wrote: Since I can't control the encoding of the input file that users submit, how to I get past this? How do I make such comparisons be True? On Fri, 10 Dec 2010 12:07:19 -0800, Ross wrote: I found I could import codecs that allow me to read the

Re: run a function in another processor in python

2010-12-10 Thread geremy condra
On Fri, Dec 10, 2010 at 4:42 AM, Astan Chee astan.c...@gmail.com wrote: On Fri, Dec 10, 2010 at 1:37 AM, Peter Otten __pete...@web.de wrote: I can't replicate the crash. However, your problem looks like there is a ready-to-use solution:

surprised by import in python 2.6

2010-12-10 Thread Stefaan Himpe
Hello list, Recently someone asked me this question, to which I could not give an answer. I'm hoping for some insight, or a manual page. What follows is python 2.6. The problem is with the difference between from test import * and import test First things first. Here's the code to

Re: surprised by import in python 2.6

2010-12-10 Thread Ian
On Dec 10, 3:06 pm, Stefaan Himpe stefaan.hi...@gmail.com wrote: Somehow, in the first session I cannot modify the global variable a returned from f, but in the second session I can. To my eye, the only difference seems to be a namespace. Can anyone shine some light on this matter? It's not

Re: surprised by import in python 2.6

2010-12-10 Thread Emile van Sebille
On 12/10/2010 2:22 PM Ian said... On Dec 10, 3:06 pm, Stefaan Himpestefaan.hi...@gmail.com wrote: Somehow, in the first session I cannot modify the global variable a returned from f, but in the second session I can. To my eye, the only difference seems to be a namespace. Can anyone shine some

ANN: ActivePython 3.1.3.5 is now available

2010-12-10 Thread Sridhar Ratnakumar
ActiveState is pleased to announce ActivePython 3.1.3.5, a complete, ready-to-install binary distribution of Python 3.1. http://www.activestate.com/activepython/downloads What's New in ActivePython-3.1.3.5 == *Release date: 6-Dec-2010* New Features

Re: Python critique

2010-12-10 Thread Octavian Rasnita
From: John Nagle na...@animats.com On 12/10/2010 2:31 AM, kolo 32 wrote: Hi, all, Python critique from strchr.com: http://www.strchr.com/python_critique I have criticisms of Python, but those aren't them. Probably the biggest practical problem with CPython is that C modules have

Re: Python critique

2010-12-10 Thread Antoine Pitrou
On Fri, 10 Dec 2010 12:02:21 -0800 John Nagle na...@animats.com wrote: Probably the biggest practical problem with CPython is that C modules have to be closely matched to the version of CPython. There's no well-defined API that doesn't change. Please stop spreading FUD:

Re: Python critique

2010-12-10 Thread Benjamin Kaplan
On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita orasn...@gmail.com wrote: From: John Nagle na...@animats.com On 12/10/2010 2:31 AM, kolo 32 wrote: Hi, all, Python critique from strchr.com: http://www.strchr.com/python_critique    I have criticisms of Python, but those aren't them.    

Re: Python critique

2010-12-10 Thread Stefan Behnel
John Nagle, 10.12.2010 21:02: Probably the biggest practical problem with CPython is that C modules have to be closely matched to the version of CPython. There's no well-defined API that doesn't change. Well, there are no huge differences between CPython versions (apart from the Py_ssize_t

Re: Python critique

2010-12-10 Thread Steven D'Aprano
On Sat, 11 Dec 2010 00:46:41 +0200, Octavian Rasnita wrote: How narrow are the scopes in Python? Is each block (each level of indentation) a scope? Thankfully, no. If it is, then I think it is very enough because the other cases can be detected easier or it might not appear at all in a

Re: Python critique

2010-12-10 Thread Stefan Behnel
Benjamin Kaplan, 11.12.2010 00:13: On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote: How narrow are the scopes in Python? Is each block (each level of indentation) a scope? If it is, then I think it is very enough because the other cases can be detected easier or it might not appear at

ctypes question

2010-12-10 Thread News Wombat
Hi everyone, I've been experimenting with the ctypes module and think it's great. I'm hitting a few snags though with seg faults. I attached two links that holds the code. The line i'm having problems with is this, sn=clibsmi.smiGetNextNode(pointer(sno),SMI_NODEKIND_ANY) It will work one

Re: Python critique

2010-12-10 Thread John Nagle
On 12/10/2010 3:25 PM, Stefan Behnel wrote: Benjamin Kaplan, 11.12.2010 00:13: On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote: The only scopes Python has are module and function. There's more. Both a lambda, and in Python 3.x, list comprehensions, introduce a new scope.

Re: Python critique

2010-12-10 Thread Dan Stromberg
On Fri, Dec 10, 2010 at 3:51 PM, John Nagle na...@animats.com wrote: On 12/10/2010 3:25 PM, Stefan Behnel wrote: Benjamin Kaplan, 11.12.2010 00:13: On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote: The only scopes Python has are module and function.   There's more.  Both a lambda,

Re: Python critique

2010-12-10 Thread Stefan Behnel
John Nagle, 11.12.2010 00:51: On 12/10/2010 3:25 PM, Stefan Behnel wrote: Benjamin Kaplan, 11.12.2010 00:13: On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote: The only scopes Python has are module and function. There's more. Both a lambda, and in Python 3.x, list comprehensions,

Re: run a function in another processor in python

2010-12-10 Thread Peter Otten
geremy condra wrote: On Fri, Dec 10, 2010 at 4:42 AM, Astan Chee astan.c...@gmail.com wrote: On Fri, Dec 10, 2010 at 1:37 AM, Peter Otten __pete...@web.de wrote: I can't replicate the crash. However, your problem looks like there is a ready-to-use solution:

stuck with Pexpect script need help!!

2010-12-10 Thread Darshak Bavishi
Hi Experts, got ready made code for ssh to unix using python host machine is windows now when i run this its gives following error : * Traceback (most recent call last): File C:\Python26\pexpect-2.1\pexpect-2.1\pxssh.py, line 1, in module from pexpect import * File

Re: ctypes question

2010-12-10 Thread Mark Tolonen
News Wombat newswom...@gmail.com wrote in message news:2abdd9b3-66ec-4125-a5f8-41315008c...@l17g2000yqe.googlegroups.com... Hi everyone, I've been experimenting with the ctypes module and think it's great. I'm hitting a few snags though with seg faults. I attached two links that holds the

Re: run a function in another processor in python

2010-12-10 Thread Astan Chee
Sorry about that, here is a summary of my complete code. I haven't cleaned it up much or anything, but this is what it does: import time import multiprocessing test_constx =0 test_consty =0 def functionTester(x): global test_constx global test_consty print constx + str(test_constx)

[issue10670] Provide search scope limits

2010-12-10 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: When searching docs (e.g. for http://docs.python.org/dev/search.html?q=unicodecheck_keywords=yesarea=default) I'd like to filter out C API. -- assignee: d...@python components: Documentation messages: 123719 nosy: d...@python,

[issue10660] format() to lower and uppercase

2010-12-10 Thread Hervé Cauwelier
Hervé Cauwelier he...@itaapy.com added the comment: Thanks for the example. The Python 2.7 documentation about the mini-language doesn't clearly state that it is extensible and how. we see examples of formatting but not of extending. Your example would be welcome in the documentation.

[issue10667] collections.Counter object in C

2010-12-10 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10667 ___ ___ Python-bugs-list

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Are the warnings originating in your code, or in the standard library, or elsewhere? If in the standard library, please provide specific details. -- nosy: +eric.smith ___ Python tracker

[issue10668] Array tests have nonsense in them

2010-12-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r87156. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10668 ___

[issue10516] Add list.clear() and list.copy()

2010-12-10 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: That's good if it's so... can you explain why list_clear doesn't guarantee that the list is empty? Why would XDECREF populate the list? I don't quite understand it. Does this mean that durning the Py_DECREF progress the list may be populated

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Rusi
Rusi rustompm...@gmail.com added the comment: Hi Eric Sorry for not being clear. This is more of a feature request than a bug report as suggested by Terry Reedy on the python mailing list (see here http://mail.python.org/pipermail/python-list/2010-December/1262149.html The warnings are in my

[issue985064] plistlib crashes too easily on bad files

2010-12-10 Thread Mher Movsisyan
Mher Movsisyan mher.movsis...@gmail.com added the comment: The attached patch fixes crashes on bad input. The patch implements validation for dict and array elements as well as some resource cleanup. The tests are included as well. -- keywords: +patch nosy: +mher Added file:

[issue10611] sys.exit() in a test causes a test run to die

2010-12-10 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: At the moment exception handling for setUp / tearDown / testMethod and cleanUp functions are all handled separately. They all have to call addError and as a result we have inconsistent handling of skips, expected failures (etc). There

[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I've added the logging code to implement and use a logger of last resort as discussed on the thread for http://bit.ly/last-resort-handler into the py3k branch, r87157. Gist of differences is available at https://gist.github.com/736120 -

[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: s/logger of last resort/handler of last resort/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10626 ___

[issue10671] urllib2 redirect to another host doesn't work

2010-12-10 Thread Kirill Subbotin
New submission from Kirill Subbotin kir...@gmail.com: When you open url which redirects to another host (either with 301 or 302), HTTPRedirectHandler keeps Host header from the previous request, which leads to a error. Instead a host should be taken from a new location url. Attached patch is

[issue10671] urllib2 redirect to another host doesn't work

2010-12-10 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Can you point me to your code and error traceback that was observed and some details about server which gave 301/302 Redirect as what was the hostname and where did it redirect to? I don't see the code changes that you provided in the

[issue10672] [with] new in version 2.6 instead of 2.5

2010-12-10 Thread Mayweed
New submission from Mayweed norman.dena...@atosorigin.com: In the documentation, the statement with is marked as: New in version 2.5. (http://docs.python.org/reference/compound_stmts.html#the-with-statement) This new statement is new in version 2.6 ! -- assignee: d...@python

[issue10672] [with] new in version 2.6 instead of 2.5

2010-12-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: It is in fact new in 2.5, but only available when using from __future__ import with_statement, which the note near the end of the section details. -- nosy: +georg.brandl resolution: - invalid status: open - closed

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2010-12-10 Thread Brian Cain
New submission from Brian Cain brian.c...@gmail.com: When calling Process' join([timeout]) method, the timeout expiration case is indistinguishable from the successful join. I suppose the 'exitcode' attribute can deliver the necessary information, but perhaps join could stand on its own. If

[issue3992] remove custom log module from distutils2

2010-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: distutils2.log has been removed in f6ef30a22a24. I’m leaving this open to remind us we want to remove the warn and announce methods. Logging all the way! -- ___ Python tracker rep...@bugs.python.org

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: My guess is it shouldn't, and yes, but I've added the multiprocessing maintainers as nosy and they can answer definitively. -- nosy: +asksol, jnoller, r.david.murray ___ Python tracker

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2010-12-10 Thread Ask Solem
Ask Solem a...@opera.com added the comment: While it makes sense for `join` to raise an error on timeout, that could possibly break existing code, so I don't think that is an option. Adding a note in the documentation would be great. -- ___ Python

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo giovannib...@gmail.com added the comment: Hi Gregory, I saw your commit here: http://code.activestate.com/lists/python-checkins/91914/ This basically means that in 3.2 it is mandatory to specify close_fds to avoid a DeprecationWarning. *BUT* there is no good value that works both

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Ori Avtalion
New submission from Ori Avtalion o...@avtalion.name: Using trunk r87157 The Grammar/Grammar file defines a dictmaker symbol that is no longer referenced in any other symbol. It should be removed. -- components: Interpreter Core messages: 123738 nosy: salty-horse priority: normal

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - d...@python components: +Documentation nosy: +d...@python, ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10669

[issue10644] socket loses data, calling send()/sendall() on invalid socket does not report error and returns all bytes as written

2010-12-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, closing as invalid. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10644 ___

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Dec 9, 2010 at 6:10 PM, Martin v. Löwis rep...@bugs.python.org wrote: .. Please, one issue per report and checkin, The s/5.2/6.0/ issue is hardly worth a tracker ticket. I've committed these changes in r87159.

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +ezio.melotti, haypo, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10665 ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: I'd offer two ideas. 1. Add a constant DISREGARD_FDS to the subprocess module could help. It would allow the user to specify his intent, and let the implementation choose the best action. Popen(..., close_fds=subprocess.DISREGARD_FDS)

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: The cloexec approach still doesn't help with issue 2320. In fact, with threading and people calling subprocess from multiple threads, *this* issue wouldn't be fixed with my patch either unless mutexes are used. It's impossible to avoid

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10674 ___ ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo giovannib...@gmail.com added the comment: Setting CLOEXEC on the pipes seems like a very good fix for this bug. I'm +1 on it, but I think it should be the default; instead, your proposed patch adds a new argument to the public API. Why do you think it's necessary to do so? At

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Removed file: http://bugs.python.org/file1/subprocess-cloexec-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: I'm +1 on it, but I think it should be the default; instead, your proposed patch adds a new argument to the public API. Why do you think it's necessary to do so? I don't think it's necessary. I put it there because when I was

  1   2   >