Re: Python and Lisp : car and cdr

2011-06-19 Thread Lie Ryan
On 06/18/11 00:45, Franck Ditter wrote: Hi, I'm just wondering about the complexity of some Python operations to mimic Lisp car and cdr in Python... def length(L) : if not L : return 0 return 1 + length(L[1:]) Should I think of the slice L[1:] as (cdr L) ? I mean, is the slice a

Re: print header for output

2011-06-19 Thread Chris Rebert
On Sat, Jun 18, 2011 at 9:57 PM, Cathy James nambo...@gmail.com wrote: I managed to get output for my function, thanks much  for your direction. I really appreciate the hints. Now I have tried to place the statement print (Length \t + Count\n) in different places in my code so that the

Re: print header for output

2011-06-19 Thread Ben Finney
Chris Rebert c...@rebertia.com writes: Also, in the future, avoid replying to the mailinglist digest, or at the very least please trim off the irrelevant quoted posts in your reply. Right. It will help communication greatly if you reply inline with specific quoted material (what Wikipedia

Re: NEED HELP-process words in a text file

2011-06-19 Thread Stefan Behnel
Cathy James, 19.06.2011 01:21: def fileProcess(filename): Call the program with an argument, it should treat the argument as a filename, splitting it up into words, and computes the length of each word. print a table showing the word count for each of the word lengths that

Re: New member intro and question

2011-06-19 Thread Anthony Papillion
Just wanted to thank you guys for taking the time to respond. Looks like my 'limited resources' aren't so limited after all! Cheers, Anthony -- http://mail.python.org/mailman/listinfo/python-list

Re: Strategy to Verify Python Program is POST'ing to a web server.

2011-06-19 Thread Steven D'Aprano
On Sun, 19 Jun 2011 05:47:30 +0100, Nobody wrote: On Sat, 18 Jun 2011 04:34:55 -0700, mzagu...@gmail.com wrote: I am wondering what your strategies are for ensuring that data transmitted to a website via a python program is indeed from that program, and not from someone submitting POST data

Re: Strategy to Verify Python Program is POST'ing to a web server.

2011-06-19 Thread Paul Rubin
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Supply the client with tamper-proof hardware containing a private key. Is that resistant to man-in-the-middle attacks by somebody with a packet sniffer watching the traffic between the device and the website? Sure, why not? As

Re: Python and Lisp : car and cdr

2011-06-19 Thread Ethan Furman
Lie Ryan wrote: On 06/18/11 00:45, Franck Ditter wrote: Hi, I'm just wondering about the complexity of some Python operations to mimic Lisp car and cdr in Python... def length(L) : if not L : return 0 return 1 + length(L[1:]) Should I think of the slice L[1:] as (cdr L) ? I mean, is the

Re: HTTPConncetion - HEAD request

2011-06-19 Thread Elias Fotinis
On Fri, 17 Jun 2011 20:53:39 +0300, gervaz ger...@gmail.com wrote: I decided to implement this solution: class HeadRequest(urllib.request.Request): def get_method(self): return HEAD Now I download the url using: r = HeadRequest(url, None, self.headers) c =

Re: Python and Lisp : car and cdr

2011-06-19 Thread Chris Angelico
On Sun, Jun 19, 2011 at 10:56 PM, Ethan Furman et...@stoneleaf.us wrote: Lie Ryan wrote: def cdr(L):    return L[1] IANAL (I am not a Lisper), but shouldn't that be 'return L[1:]' ? In LISP, a list is a series of two-item units (conses). L = (a, (b, (c, (d, None This represents the

Re: Python and Lisp : car and cdr

2011-06-19 Thread Steven D'Aprano
On Sun, 19 Jun 2011 05:56:27 -0700, Ethan Furman wrote: Lie Ryan wrote: On 06/18/11 00:45, Franck Ditter wrote: Hi, I'm just wondering about the complexity of some Python operations to mimic Lisp car and cdr in Python... def length(L) : if not L : return 0 return 1 + length(L[1:])

Re: Python and Lisp : car and cdr

2011-06-19 Thread Elias Fotinis
On Sun, 19 Jun 2011 15:56:27 +0300, Ethan Furman et...@stoneleaf.us wrote: Lie Ryan wrote: def length(L): if not L: return 0 return 1 + length(cdr(L)) How is this different from regular ol' 'len' ? It's better, because len() can't overflow the stack. ;) --

What is this syntax ?

2011-06-19 Thread candide
With Python 2.7 : x=foo print ''+x+'' foo What is this curious syntax on line 2 ? Where is it documented ? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is this syntax ?

2011-06-19 Thread Laurent Claessens
Le 19/06/2011 15:41, candide a écrit : With Python 2.7 : x=foo print ''+x+'' foo What is this curious syntax on line 2 ? Where is it documented ? When you want to have an explicit double quote in a string, you put in between single quote '. (and vice versa) So here you have

Re: What is this syntax ?

2011-06-19 Thread Noah Hall
On Sun, Jun 19, 2011 at 2:41 PM, candide candide@free.invalid wrote: With Python 2.7 : x=foo print ''+x+'' foo What is this curious syntax on line 2 ? Where is it documented ? Just to make it clear to you what is happening - x = foo print ' ' + x + ' ' foo Anyway, it's documented

Re: What is this syntax ?

2011-06-19 Thread Chris Angelico
On Sun, Jun 19, 2011 at 11:41 PM, candide candide@free.invalid wrote: With Python 2.7 : x=foo print ''+x+'' foo As Laurent posted, it's simply a literal double-quote character, enclosed in single quotes. But for making a quoted string, this isn't reliable (what if there's a double quote in

Re: Python and Lisp : car and cdr

2011-06-19 Thread Hrvoje Niksic
Ethan Furman et...@stoneleaf.us writes: def car(L): return L[0] def cdr(L): return L[1] IANAL (I am not a Lisper), but shouldn't that be 'return L[1:]' ? Not for the linked list implementation he presented. def length(L): if not L: return 0 return 1 + length(cdr(L))

Re: Improper creating of logger instances or a Memory Leak?

2011-06-19 Thread Vinay Sajip
foobar wjshipman at gmail.com writes: I've run across a memory leak in a long running process which I can't determine if its my issue or if its the logger. As Chris Torek said, it's not a good idea to create a logger for each thread. A logger name represents a place in your application;

Re: Best way to insert sorted in a list

2011-06-19 Thread Vito De Tullio
SherjilOzair wrote: There are basically two ways to go about this. [...] What has the community to say about this ? What is the best (fastest) way to insert sorted in a list ? a third way maybe using a SkipList instead of a list on

How to iterate on a changing dictionary

2011-06-19 Thread TheSaint
Hello Trying to pop some key from a dict while is iterating over it will cause an exception. How I can remove items when the search result is true. Example: while len(dict): for key in dict.keys(): if dict[key] is not my_result: dict.pop(key) else:

Re: What would you like to see in a File Organizer ?

2011-06-19 Thread TheSaint
zainul franciscus wrote: we are looking for some ideas for good functionality for the application. T I was looking for a file cataloger. this program may go into same category as far as handling file names ad file system's structures. It also manage to store unused files into zipped archives

Re: Improper creating of logger instances or a Memory Leak?

2011-06-19 Thread Vinay Sajip
foobar wjshipman at gmail.com writes: I've run across a memory leak in a long running process which I can't determine if its my issue or if its the logger. BTW did you also ask this question on Stack Overflow? I've answered there, too. http://stackoverflow.com/questions/6388514/ Regards,

Re: threading : make stop the caller

2011-06-19 Thread Chris Angelico
On Mon, Jun 20, 2011 at 1:39 AM, Laurent Claessens moky.m...@gmail.com wrote: My problem is that when FileToCopyTask raises an error, the program does not stop. In fact when the error is Disk Full, I want to stop the whole program because I know that the next task will fail too. If you're

Re: How to iterate on a changing dictionary

2011-06-19 Thread Chris Angelico
On Mon, Jun 20, 2011 at 12:32 AM, TheSaint nob...@nowhere.net.no wrote: Hello Trying to pop some key from a dict while is iterating over it will cause an exception. How I can remove items when the search result is true. Example: while len(dict):   for key in dict.keys():      if

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
Le 19/06/2011 17:19, Chris Angelico a écrit : On Mon, Jun 20, 2011 at 12:42 AM, Laurent Claessensmoky.m...@gmail.com wrote: Hello I've a list of tasks to perform. Each of them is a threading.Thread. Basically I have : while task_list : task = task_list[0] task.run()

Re: Python 2.7.2 for Windows reports version as 2.7.0?

2011-06-19 Thread python
Hi Mark, The version info comes from the DLL - I wonder if the DLL being found is somehow old? Make sure: import sys win32api.GetModuleFileName(sys.dllhandle) Is the DLL you expect. After uninstalling and reinstalling for the current user only (vs. all users), Python now reports the

Re: What is this syntax ?

2011-06-19 Thread candide
OK, thanks for your explanation, it was just stringisation ! I erroneously focused on +x+ as a kind of placeholder unknown to me, instead of left and right concatenations ;) It would be more readable for me if it were edited print '' + x + '' # better spacing foo or with string

Re: Python and Lisp : car and cdr

2011-06-19 Thread Ethan Furman
Ethan Furman wrote: IANAL (I am not a Lisper), but shouldn't that be 'return L[1:]' ? Ah, thanks all for the clarification. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Lisp : car and cdr

2011-06-19 Thread Terry Reedy
On 6/19/2011 9:24 AM, Steven D'Aprano wrote: No. Each cell in a Lisp-style linked list has exactly two elements, and in Python are usually implemented as nested tuples: (head, tail) # Annoyingly, this is also known as (car, cdr). where head is the data value and tail is either another

Re: threading : make stop the caller

2011-06-19 Thread Terry Reedy
On 6/19/2011 11:39 AM, Laurent Claessens wrote: In the same time I've a thread that read the list and perform the operations: def run(): while task_list : task = task_list[0] task_list.remove(task) task.start() Popping task off the end of the list is more efficient: while task_list:

Re: Python and Lisp : car and cdr

2011-06-19 Thread Teemu Likonen
* 2011-06-19T12:20:32-04:00 * Terry Reedy wrote: On 6/19/2011 9:24 AM, Steven D'Aprano wrote: No. Each cell in a Lisp-style linked list has exactly two elements, and in Python are usually implemented as nested tuples: (head, tail) # Annoyingly, this is also known as (car, cdr). where head

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
Le 19/06/2011 18:03, Chris Angelico a écrit : On Mon, Jun 20, 2011 at 1:39 AM, Laurent Claessensmoky.m...@gmail.com wrote: My problem is that when FileToCopyTask raises an error, the program does not stop. In fact when the error is Disk Full, I want to stop the whole program because I know

Re: How to iterate on a changing dictionary

2011-06-19 Thread Terry Reedy
On 6/19/2011 11:53 AM, Roy Smith wrote: Yet another variation which makes sense if you want to delete most of the keys would be to copy them to a new dictionary. I'm not sure how Python handles memory management on dictionaries which shrink. 'Python' does not handle memory management; each

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
Popping task off the end of the list is more efficient: while task_list: task_list.pop().start() That's cool. In my case it's better to do task_list.pop(0).start in order to pop the first element. or if the list is static No, my list is dynamic and is feeded by an other thread

Re: What is this syntax ?

2011-06-19 Thread Roy Smith
In article 4dfe10d1$0$28053$426a3...@news.free.fr, candide candide@free.invalid wrote: OK, thanks for your explanation, it was just stringisation ! I erroneously focused on +x+ as a kind of placeholder unknown to me, instead of left and right concatenations ;) It would be more

threading : make stop the caller

2011-06-19 Thread Laurent Claessens
Hello I've a list of tasks to perform. Each of them is a threading.Thread. Basically I have : while task_list : task = task_list[0] task.run() task_list.remove(task) Now I want, in some circumstance to raise errors that make the loop stop. In order IOError to make stop the

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
I read the library documentation. I think that if I get a trick to kill a thread, then I'm done. Is there a way ? Laurent Le 19/06/2011 17:39, Laurent Claessens a écrit : Le 19/06/2011 17:19, Chris Angelico a écrit : On Mon, Jun 20, 2011 at 12:42 AM, Laurent Claessensmoky.m...@gmail.com

Re: How to iterate on a changing dictionary

2011-06-19 Thread Roy Smith
In article mailman.154.1308496441.1164.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Mon, Jun 20, 2011 at 12:32 AM, TheSaint nob...@nowhere.net.no wrote: Hello Trying to pop some key from a dict while is iterating over it will cause an exception. How I can remove

Re: How to iterate on a changing dictionary

2011-06-19 Thread Terry Reedy
On 6/19/2011 11:13 AM, Chris Angelico wrote: On Mon, Jun 20, 2011 at 12:32 AM, TheSaintnob...@nowhere.net.no wrote: Hello Trying to pop some key from a dict while is iterating over it will cause an exception. How I can remove items when the search result is true. Example: while len(dict):

Re: threading : make stop the caller

2011-06-19 Thread Chris Angelico
On Mon, Jun 20, 2011 at 12:42 AM, Laurent Claessens moky.m...@gmail.com wrote:   Hello I've a list of tasks to perform. Each of them is a threading.Thread. Basically I have : while task_list :   task = task_list[0]   task.run()   task_list.remove(task) I'm not understanding what you're

Re: threading : make stop the caller

2011-06-19 Thread Terry Reedy
On 6/19/2011 12:03 PM, Chris Angelico wrote: On Mon, Jun 20, 2011 at 1:39 AM, Laurent Claessensmoky.m...@gmail.com wrote: My problem is that when FileToCopyTask raises an error, the program does not stop. In fact when the error is Disk Full, I want to stop the whole program because I know that

Re: What is this syntax ?

2011-06-19 Thread rusi
On Jun 19, 8:39 pm, Roy Smith r...@panix.com wrote: This is one of the (very) few places PHP wins over Python.  In PHP, I would write this as print '$x' You dont find print '%s' % x readable? Why? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to iterate on a changing dictionary

2011-06-19 Thread Lie Ryan
On 06/20/11 00:32, TheSaint wrote: Hello Trying to pop some key from a dict while is iterating over it will cause an exception. How I can remove items when the search result is true. Example: while len(dict): for key in dict.keys(): if dict[key] is not my_result:

Re: threading : make stop the caller

2011-06-19 Thread Lie Ryan
On 06/20/11 02:52, Laurent Claessens wrote: Popping task off the end of the list is more efficient: while task_list: task_list.pop().start() That's cool. In my case it's better to do task_list.pop(0).start in order to pop the first element. then you really wanted a queue instead

Re: What is this syntax ?

2011-06-19 Thread Roy Smith
In article e724fc3e-8198-4fb7-b1d3-96834f3fa...@34g2000pru.googlegroups.com, rusi rustompm...@gmail.com wrote: On Jun 19, 8:39 pm, Roy Smith r...@panix.com wrote: This is one of the (very) few places PHP wins over Python.  In PHP, I would write this as print '$x' You dont find

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile toImprovethe Dvorak Layout?

2011-06-19 Thread rusi
On Jun 19, 10:50 am, Lie Ryan lie.1...@gmail.com wrote: On 06/19/11 15:14, rusi wrote: On Jun 19, 9:21 am, Lie Ryan lie.1...@gmail.com wrote: On 06/18/11 03:53, Xah Lee wrote: On Jun 15, 5:43 am, rusi rustompm...@gmail.com wrote: On Jun 15, 5:32 pm, Dotan Cohen dotanco...@gmail.com

Re: What is this syntax ?

2011-06-19 Thread Vito 'ZeD' De Tullio
Roy Smith wrote: There's something nice about building up strings in-line, as opposed to having to look somewhere to see what's being interpolated. To give a more complex example, consider: print $scheme://$host:$port/$route#$fragment That certainly seems easier to me to read than:

Re: What is this syntax ?

2011-06-19 Thread Benjamin Kaplan
On Sun, Jun 19, 2011 at 2:06 PM, Vito 'ZeD' De Tullio zak.mc.kra...@libero.it wrote: Roy Smith wrote: There's something nice about building up strings in-line, as opposed to having to look somewhere to see what's being interpolated. To give a more complex example, consider: print

Re: What is this syntax ?

2011-06-19 Thread Steven D'Aprano
On Sun, 19 Jun 2011 23:06:36 +0200, Vito 'ZeD' De Tullio wrote: well, in python3 you can use dict to format strings print(%(a)s % {'a':'b'}) b It's not just Python 3. That bit of functionality goes back all the way to Python 1.5, which is the oldest version I have installed. In Python 2.6

Re: What's the best way to write this base class?

2011-06-19 Thread Chris Kaynor
On Jun 18, 2011, at 9:26, John Salerno johnj...@gmail.com wrote: Whew, thanks for all the responses! I will think about it carefully and decide on a way. I was leaning toward simply assigning the health, resource, etc. variables in the __init__ method, like this: def __init__(self, name):

Re: What's the best way to write this base class?

2011-06-19 Thread John Salerno
On Jun 19, 8:52 pm, Chris Kaynor ckay...@zindagigames.com wrote: Having a character class (along with possibly player character, non-player character, etc), make sense; however you probably want to make stuff like health, resources, damage, and any other attributes not be handles by any

running multiple scripts -- which way is more elegant?

2011-06-19 Thread Stephen Bunn
List, First I'm very new to Python. I usually do this kind of thing with shell scripts, however, I'm trying to move to using python primarily so I can learn the language. I'm attempting to write a script that will check a server for various configuration settings and report and/or change based

Re: running multiple scripts -- which way is more elegant?

2011-06-19 Thread Chris Angelico
On Mon, Jun 20, 2011 at 2:13 PM, Stephen Bunn scb...@sbunn.org wrote: List,   First I'm very new to Python. I usually do this kind of thing with shell scripts, however, I'm trying to move to using python primarily so I can learn the language. A worthy cause :) ...  I have come up with two

Re: What is this syntax ?

2011-06-19 Thread Vito 'ZeD' De Tullio
Steven D'Aprano wrote: and you can achieve php interpolation via locals() a = 'b' print(%(a)s % locals()) b You can do that, but when reading code I consider any direct use of locals() (and globals() for that matter) to be a code smell: well you're right, me neither like very much to

[issue12361] Memory Leak in File Logging

2011-06-19 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12361 ___ ___

[issue12278] Core mentorship mention in the devguide

2011-06-19 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12278 ___ ___ Python-bugs-list

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The problem with calling fileno() and fdopen() is that you bypass the buffering information held in BufferedIOReader. The first call works, but the FILE * pointer is now positioned at 4K, rather than just past the end of the object just

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread CrouZ
New submission from CrouZ alfred.theo...@gmail.com: Steps to repeat: * Create the script foo.py consisting of the line: print(foo) * Run: foo.py bar Behavior: 2.7.2: The file bar is created but empty. Prints the following message on exit: close failed in file object destructor:

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread CrouZ
Changes by CrouZ alfred.theo...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12362 ___ ___ Python-bugs-list

[issue12361] Memory Leak in File Logging

2011-06-19 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Thanks for the report, but more information from the failing system may be needed to find the problem. Although 2.6 does not contain full unit test coverage, the default branch does - and I tested there with resource leak checking turned

[issue12358] validate server certificate when uploading packages to PyPI

2011-06-19 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I agree with Éric: This is a duplicate. -- nosy: +skrah resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12358

[issue12278] Core mentorship mention in the devguide

2011-06-19 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 144b12d7bb28 by Nick Coghlan in branch 'default': ACKS update for devguide patch (closes #12278) http://hg.python.org/cpython/rev/144b12d7bb28 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status:

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The file association for .py is pythonw, which does exactly as you say, intentionally, so as to avoid problems with windows when running a GUI application. My understanding is that this caters to the most common use case on Windows:

[issue12346] Python source code build fails with old mercurial

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: So, it seems the problem is not actually that the build depends on mercurial, it's that it fails with ancient mercurials. -- title: Python source code build (release) depends on mercurial - Python source code build fails with

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- dependencies: -Error in sys.excepthook on windows when redirecting output of the script superseder: - Error in sys.excepthook on windows when redirecting output of the script ___ Python tracker

[issue10454] Clarify compileall command-line options

2011-06-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Looks fine except for your changes to the parenthesized defaults. Those should be '0' and 'False' for 2.7 and 3.x, respectively, since that's what they areally are. -- ___ Python tracker

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: IMO the cause is actually the same as the one for issue9390, i.e. a bug in the Windows console. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12362

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: This seems a bit hacky, and I'm not sure how reliable it is. I added this after the read_object call: if (is_file) { PyObject * newpos; int cp, np; cp = ftell(rf.fp); newpos = PyObject_CallMethod(f,

[issue11637] Add cwd to sys.path for hooks

2011-06-19 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11637 ___ ___ Python-bugs-list

[issue11795] Better core dev guidelines for committing submitted patches

2011-06-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Note that the older tradition was to *not* mention the contributor in NEWS (NEWS was just technical notes), but to mention them in the checkin message (and What's New, for things that make the What's New cut). However, since we can't

[issue12346] Python source code build fails with old mercurial

2011-06-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Yes, it was committed to default. I think we can assume they used a new enough hg to check it out...and if they didn't, that *is* a bug in their setup they should fix. Agreed. -- nosy: +eric.araujo

[issue11690] Devguide: Add communication FAQ

2011-06-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Comms FAQ: http://hg.python.org/devguide/rev/f1ebfb53437f Devguide note: http://hg.python.org/devguide/rev/5ab42baba771 -- resolution: - fixed stage: - committed/rejected ___ Python tracker

[issue11795] Better core dev guidelines for committing submitted patches

2011-06-19 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11795 ___

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, I should have known better than to rely on a memory instead of checking, since I don't use Windows much. My apologies. -- dependencies: +Error in sys.excepthook on windows when redirecting output of the script resolution:

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2011/6/19 Vinay Sajip rep...@bugs.python.org: Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: This seems a bit hacky, and I'm not sure how reliable it is. I added this after the read_object call:    if (is_file) {        

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-19 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2011/6/19 Vinay Sajip rep...@bugs.python.org: Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The problem with calling fileno() and fdopen() is that you bypass the buffering information held in BufferedIOReader. The first call

[issue12346] Python source code build fails with old mercurial

2011-06-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Only if Ralf's patch is applied to all branches. Otherwise the make step reports abort: repository . not found!, which most users will ignore but a few will report here. It looks from Ralf's quoted changeset like it was only applied

[issue11690] Devguide: Add communication FAQ

2011-06-19 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11690 ___ ___ Python-bugs-list

[issue11637] Add cwd to sys.path for hooks

2011-06-19 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- hgrepos: +32 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11637 ___ ___ Python-bugs-list

[issue11795] Better core dev guidelines for committing submitted patches

2011-06-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Enhanced committer guidelines: http://hg.python.org/devguide/rev/774fb024b152 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11795 ___

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The file association for .py is pythonw Really? http://docs.python.org/using/windows.html#executing-scripts -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue12255] A few changes to .*ignore

2011-06-19 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: +libpython*.so* is fine, but please don't remove the rej and orig. By convention and practice, those files are meant to be in .ignore files to prevent accidental checkins. Usually when the conflict occurs you are notified immediately

[issue12255] A few changes to .*ignore

2011-06-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: As I've said before, I would vote to not have .rej and .orig in .hgignore. You can always add them to your personal .hgignore, but I know of no way to tell mercurial I *don't* want to ignore these files that are in the repo .hgignore.

[issue12255] A few changes to .*ignore

2011-06-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: By convention and practice, those files are meant to be in .ignore files to prevent accidental checkins. Maybe with other tools. Mercurial will tell you what new files are to be added in the next commit once to four times, depending on your

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-19 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: == FAIL: test_siginterrupt_on (test.test_signal.SiginterruptTest) -- Traceback (most recent

[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x

2011-06-19 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: [271/356/1] test_concurrent_futures Traceback (most recent call last): File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/multiprocessing/queues.py, line 268, in _feed send(obj) File

[issue12365] URLopener should support context manager protocol

2011-06-19 Thread Jeff McNeil
New submission from Jeff McNeil j...@jmcneil.net: Per discussion within Issue10050, URLopener ought to support the context manager protocol. That allows more idiomatic usage and doesn't require calls to contextlib.closing for use with the 'with' statement. If agreed, I'll create a patch.

[issue12365] URLopener should support context manager protocol

2011-06-19 Thread Jeff McNeil
Changes by Jeff McNeil j...@jmcneil.net: -- type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12365 ___ ___ Python-bugs-list

[issue12365] URLopener should support context manager protocol

2011-06-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: +1. -- nosy: +eric.araujo stage: - needs patch versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12365 ___

[issue11637] Add cwd to sys.path for hooks

2011-06-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks, I made slight editions, now I’m improving the docs and will commit shortly. -- assignee: tarek - eric.araujo stage: needs patch - commit review versions: +Python 3.3 -3rd party ___ Python

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Seen also on OpenSolaris: test test_signal failed -- Traceback (most recent call last): File /export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_signal.py, line 399, in test_siginterrupt_on

[issue12321] documentation of ElementTree.find

2011-06-19 Thread patrick vrijlandt
patrick vrijlandt patrick.vrijla...@gmail.com added the comment: [...] Same as getroot().find(match). [...] - [...] For a relative path, this is equivalent to getroot().find(match). Additionally, this form accepts an absolute path. [...] This is easy, but might not be a very good solution.

[issue11610] Improved support for abstract base classes with descriptors

2011-06-19 Thread Darren Dale
Darren Dale dsdal...@gmail.com added the comment: Here is attempt #4. This patch extends the property, classmethod and staticmethod builtins with an __isabstractmethod__ descriptor. Docs and tests are updated as well. make test runs without failures. This is my first real attempt with the

[issue11610] Improved support for abstract base classes with descriptors

2011-06-19 Thread Darren Dale
Changes by Darren Dale dsdal...@gmail.com: Removed file: http://bugs.python.org/file21307/issue11610.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___

[issue11610] Improved support for abstract base classes with descriptors

2011-06-19 Thread Darren Dale
Changes by Darren Dale dsdal...@gmail.com: Removed file: http://bugs.python.org/file21375/issue11610_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___

[issue11610] Improved support for abstract base classes with descriptors

2011-06-19 Thread Darren Dale
Changes by Darren Dale dsdal...@gmail.com: Removed file: http://bugs.python.org/file22323/abc_descriptors.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___

[issue11637] Add cwd to sys.path for hooks

2011-06-19 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset b732b02bd0ba by Éric Araujo in branch 'default': packaging: Add the project directory to sys.path to support local setup hooks. http://hg.python.org/cpython/rev/b732b02bd0ba -- nosy: +python-dev

[issue11637] Add cwd to sys.path for hooks

2011-06-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11637

[issue2983] Ttk support for Tkinter

2011-06-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The 2.7 docs are missing a versionadded directive. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2983 ___

[issue11637] Add cwd to sys.path for hooks

2011-06-19 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- keywords: +patch Added file: http://bugs.python.org/file22408/8b9da1557ad2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11637 ___

  1   2   >