Re: how to implement a queue-like container with sort function

2013-11-28 Thread Cameron Simpson
On 28Nov2013 18:04, iMath wrote: > All in all,I want to first fill the container, then sort it and process all > the contents in it Automatically? It sounds like an I/O buffer, in the sense that a block buffered output stream does a write on buffer full. Something like this: class Chunkifi

Re: how to implement a queue-like container with sort function

2013-11-28 Thread Gregory Ewing
iMath wrote: the container is similar to queue ,but queue doesn't have a sort function You can use a list as a queue. If you have a list l, then l.append(x) will add an item to the end, and l.pop(0) will remove the first item and return it. Then you just need to check the length of the list b

Re: Cannot print greek letters in Python 2.6

2013-11-28 Thread Steven D'Aprano
On Thu, 28 Nov 2013 14:22:01 -0800, mefistofelis wrote: > I have the following script however when the clipboard contents are > greek letters it fails to print them right. I have used all posible > encoding for greek letters including utf8 but to no avail so i just stay > with latin1. > > Can you

Re: how to implement a queue-like container with sort function

2013-11-28 Thread Steven D'Aprano
On Fri, 29 Nov 2013 13:03:00 +1100, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 12:54 PM, iMath wrote: >> the container is similar to queue ,but queue doesn't have a sort >> function > > It's either a queue that can be sorted, or a list with a length limit. > You could fairly easily impleme

Re: For-each behavior while modifying a collection

2013-11-28 Thread Steven D'Aprano
On Thu, 28 Nov 2013 16:49:21 +0100, Valentin Zahnd wrote: > It is clear why it behaves on that way. Every time one removes an > element, the length of the colleciton decreases by one while the counter > of the for each statement is not. The questions are: > 1. Why does the interprete not uses a co

Re: how to implement a queue-like container with sort function

2013-11-28 Thread iMath
hey , you used >>> sorted(a.queue) this means the queue.Queue() has an attribute queue ,but I cannot find it described in the DOC ,where you find it ? -- https://mail.python.org/mailman/listinfo/python-list

Re: how to implement a queue-like container with sort function

2013-11-28 Thread Terry Reedy
On 11/28/2013 8:54 PM, iMath wrote: I want to a fixed length list-like container, it should have a sorted()-like function that I can use to sort it,I think there should also a function I can use it to detect whether the numbers of items in it reaches the length of the container , because if th

Re: how to implement a queue-like container with sort function

2013-11-28 Thread MRAB
On 29/11/2013 01:54, iMath wrote: I want to a fixed length list-like container, it should have a sorted()-like function that I can use to sort it,I think there should also a function I can use it to detect whether the numbers of items in it reaches the length of the container , because if the num

Re: how to implement a queue-like container with sort function

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 1:04 PM, iMath wrote: > All in all,I want to first fill the container, then sort it and process all > the contents in it Where does the length limit come in? By the way, a little context helps a lot with following a thread. ChrisA -- https://mail.python.org/mailman/lis

Re: how to implement a queue-like container with sort function

2013-11-28 Thread iMath
All in all,I want to first fill the container, then sort it and process all the contents in it -- https://mail.python.org/mailman/listinfo/python-list

Re: how to implement a queue-like container with sort function

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 12:54 PM, iMath wrote: > the container is similar to queue ,but queue doesn't have a sort function It's either a queue that can be sorted, or a list with a length limit. You could fairly easily implement either, because in Python, anything can be subclassed. But I think p

how to implement a queue-like container with sort function

2013-11-28 Thread iMath
I want to a fixed length list-like container, it should have a sorted()-like function that I can use to sort it,I think there should also a function I can use it to detect whether the numbers of items in it reaches the length of the container , because if the numbers of items in it reaches the l

Re: Cannot print greek letters in Python 2.6

2013-11-28 Thread Terry Reedy
On 11/28/2013 5:48 PM, Chris Angelico wrote: On Fri, Nov 29, 2013 at 9:22 AM, wrote: I have the following script however when the clipboard contents are greek letters it fails to print them right. I have used all posible encoding for greek letters including utf8 but to no avail so i just stay

Re: Managing Google Groups headaches

2013-11-28 Thread Arif Khokar
On 11/28/2013 1:50 PM, Michael Torrie wrote: On 11/28/2013 11:37 AM, rusi wrote: 2. All kinds of people hop onto the list. In addition to genuine ones there are spammers, trolls, dicks, nuts, philosophers, help-vampires etc etc. What they have in common is usenet. Ditching usenet would

Re: Python project

2013-11-28 Thread Joel Goldstick
On Thu, Nov 28, 2013 at 6:43 PM, ngangsia akumbo wrote: > On Wednesday, November 27, 2013 7:07:15 PM UTC-8, Johannes Findeisen wrote: > > On Wed, 27 Nov 2013 17:43:27 -0800 (PST) > > > > ngangsia akumbo wrote: > > > > > > > > > Hi everyone > > > > > > > > Hi, > > > > > > > > > I a beginner in pyt

Re: Python project

2013-11-28 Thread Johannes Findeisen
On Thu, 28 Nov 2013 15:43:43 -0800 (PST) ngangsia akumbo wrote: > > I wish to come up with a city guide that can give directions, locations like > business spots, cafe, restaurants, hospitals in English and the local > language spoken by the people. Thats a nice idea! :) > To be honest am not

Re: Python project

2013-11-28 Thread ngangsia akumbo
On Wednesday, November 27, 2013 7:07:15 PM UTC-8, Johannes Findeisen wrote: > On Wed, 27 Nov 2013 17:43:27 -0800 (PST) > > ngangsia akumbo wrote: > > > > > Hi everyone > > > > Hi, > > > > > I a beginner in python. The first project is to build an online city guide > > start with my own c

Re: Python project

2013-11-28 Thread ngangsia akumbo
On Wednesday, November 27, 2013 6:42:21 PM UTC-8, Dave Angel wrote: > On Wed, 27 Nov 2013 17:43:27 -0800 (PST), ngangsia akumbo > > wrote: > > > I a beginner in python. The first project is to build an online > > city guide start with my own city. I will need some support on where > > to ge

Re: Cannot print greek letters in Python 2.6

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 9:22 AM, wrote: > I have the following script however when the clipboard contents are greek > letters it fails to print them right. > I have used all posible encoding for greek letters including utf8 but to no > avail so i just stay with latin1. You need to know what en

Re: Managing Google Groups headaches

2013-11-28 Thread Terry Reedy
On 11/28/2013 1:29 PM, Michael Torrie wrote: Seems like 90% of the problems on this list come from the unchecked usenet side of things. Such as trolls or spam. ... Despite many calls to banish [such] ... with usenet it's just not possible. The usenet gateway has been changed recently to no

Re: Managing Google Groups headaches

2013-11-28 Thread Terry Reedy
On 11/28/2013 10:40 AM, Michael Torrie wrote: On 11/28/2013 08:08 AM, Chris Angelico wrote: Which is easier, fiddling around with your setup so you can post reasonably on Google Groups, or just getting a better client? With your setup, you have to drop out to another editor and press F9 for it t

Cannot print greek letters in Python 2.6

2013-11-28 Thread mefistofelis
I have the following script however when the clipboard contents are greek letters it fails to print them right. I have used all posible encoding for greek letters including utf8 but to no avail so i just stay with latin1. Can you suggest a solution? Here is the script: import win32clipboard wi

Re: Managing Google Groups headaches

2013-11-28 Thread Zero Piraeus
: On Thu, Nov 28, 2013 at 08:40:47AM -0700, Michael Torrie wrote: > My opinion is that the Python list should dump the Usenet tie-in and > just go straight e-mail. +1 Hell yes. -- Zero Piraeus: coram publico http://etiol.net/pubkey.asc -- https://mail.python.org/mailman/listinfo/python-list

webpy

2013-11-28 Thread Silvio Siefke
Hello, is here someone which has run webpy with nginx? I has follow the tutorial on webpy.org, but sometimes run sometimes not. It looks not staple. I try to start spawn-fcgi but it looks not so as really want start. It were nice someone can help. Wish good day/night. Thank you & Greetings Silv

Re: reporting proxy porting problem

2013-11-28 Thread Terry Reedy
On 11/28/2013 6:12 AM, Robin Becker wrote: I am in the process of porting reportlab to python3.3, one of the contributions is a module that implements a reporting proxy with a canvas that records all access calls and attribute settings etc etc. This fails under python3 because of differences betw

Re: Access database - GUI - Python - I need architectural advice

2013-11-28 Thread Christian Gollwitzer
Am 28.11.13 07:51, schrieb Ben Finney: Chris Angelico writes: On Thu, Nov 28, 2013 at 4:55 PM, jm.almeras wrote: 2) dimensionable and editable arrays of columns and rows like when you open a table under Access. I'm not aware of a widget in Tkinter which can do that. There is tablelist

Re: Jython - Can't access enumerations?

2013-11-28 Thread Tim Delaney
On 29 November 2013 04:22, Eamonn Rea wrote: > Hello! I'm using Jython to write a game with Python/Jython/LibGDX. I > wasn't having any trouble, and everything was going well, but sadly I can't > access items in enumerations. > > If you know about the LibGDX library and have used it, you'll proba

Re: Managing Google Groups headaches

2013-11-28 Thread Walter Hurry
On Thu, 28 Nov 2013 11:50:47 -0700, Michael Torrie wrote: > On 11/28/2013 11:37 AM, rusi wrote: >> Do you realize that that person was not using GG? > > I do but he was using usenet. > >> IOW we are unfortunately conflating two completely unrelated things: >> 1. GG has some technical problems wh

Re: Managing Google Groups headaches

2013-11-28 Thread Michael Torrie
My point was that the list problems in general seem to be related to usenet. GG formatting, spam, trolls. I guess I should have changed the subject line. Ditching usenet solves the GG problem and a number of other problems as well. >> IOW we are unfortunately conflating two completely unrelated

Re: Managing Google Groups headaches

2013-11-28 Thread Michael Torrie
On 11/28/2013 11:37 AM, rusi wrote: > Do you realize that that person was not using GG? I do but he was using usenet. > IOW we are unfortunately conflating two completely unrelated things: > 1. GG has some technical problems which are fairly easy to solve > 2. All kinds of people hop onto the lis

Re: Managing Google Groups headaches

2013-11-28 Thread Walter Hurry
On Thu, 28 Nov 2013 11:00:22 -0800, rusi wrote: > On Friday, November 29, 2013 12:07:29 AM UTC+5:30, rusi wrote: >> On Thursday, November 28, 2013 11:59:13 PM UTC+5:30, Michael Torrie >> wrote: >> > On 11/28/2013 10:23 AM, Ned Batchelder wrote: >> > > Funny, I thought the sentiment of many here wa

Re: Managing Google Groups headaches

2013-11-28 Thread rusi
On Friday, November 29, 2013 12:07:29 AM UTC+5:30, rusi wrote: > On Thursday, November 28, 2013 11:59:13 PM UTC+5:30, Michael Torrie wrote: > > On 11/28/2013 10:23 AM, Ned Batchelder wrote: > > > Funny, I thought the sentiment of many here was, "let's just keep this > > > as a newsgroup, why do we

Re: Managing Google Groups headaches

2013-11-28 Thread rusi
On Thursday, November 28, 2013 11:59:13 PM UTC+5:30, Michael Torrie wrote: > On 11/28/2013 10:23 AM, Ned Batchelder wrote: > > Funny, I thought the sentiment of many here was, "let's just keep this > > as a newsgroup, why do we need the mailing list also?" but I'll admit to > > being confused abo

Fwd: Re: Wrapping around a list

2013-11-28 Thread Ricardo Aráoz
El 27/11/13 07:46, amjad...@gmail.com escribió: Hello, I am working on a problem (Bioinformatics domain) where all possible combinations of input string needs to be printed as sublist For example: Input string : "LEQN" Output= "[L","E","Q","N"]["LE","EQ","QN","NL"] ["LEQ","EQN","QNE","NLE"] ["

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Roel Schroeven
Victor Hooi schreef: with open(self.full_path, 'r') as input, open(self.output_csv, 'ab') as output: I think I would write that as with open(self.full_path, 'r') as input: with open(self.output_csv, 'ab') as output: That introduces an extra indentation level, but that

Re: Getting the Appdata Directory with Python and PEP?

2013-11-28 Thread rusi
On Thursday, November 28, 2013 9:41:30 PM UTC+5:30, Eamonn Rea wrote: > Oh, sorry, I'm new to how Google Groups works. I wonder why it lays it out > like that. Can it not just show quotes like the way that PHPbb does? > > I never thought of reading the source code, thanks! :-) > > Oh, and the last

Re: Managing Google Groups headaches

2013-11-28 Thread Michael Torrie
On 11/28/2013 10:23 AM, Ned Batchelder wrote: > Funny, I thought the sentiment of many here was, "let's just keep this > as a newsgroup, why do we need the mailing list also?" but I'll admit to > being confused about what people have been proposing for alternate > topologies. That may well be t

Re: Managing Google Groups headaches

2013-11-28 Thread rusi
Here's a 1-click pure python solution. As I said I dont know how to manage errors! 1. Put it in a file say cleangg.py and make it executable 2. Install it as the 'editor' for the "Its all text" firefox addon 3. Click the edit and you should get a cleaned out post -- #

Re: Access database - GUI - Python - I need architectural advice

2013-11-28 Thread Wolfgang Keller
> I wish to develop a database application with a lot of specific > functionnalities dealing with sound files. > > I have developped an Access prototype and run into a first problem : Access is not a database, it's a data shredder. And for the GUI part; it only works on that pathologic non-opera

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Walter Hurry
On Thu, 28 Nov 2013 10:08:30 -0500, Roy Smith wrote: > In article <34479463-b8a8-4417-9989-cd2936946...@googlegroups.com>, > Victor Hooi wrote: > >> cur.executemany("INSERT INTO foobar_foobar_files VALUES (?)", >> [[os.path.relpath(filename, foobar_input_folder)] >>

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Ned Batchelder
On 11/28/13 9:04 AM, Tim Chase wrote: On 2013-11-28 03:58, Steven D'Aprano wrote: input = open(self.full_path) output = open(self.output_csv, 'ab') with input as input, output as output: ... That's really clever! Why didn't I think of that? Because if the 2nd outp

Re: Downloading/Saving to a Directory

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 2:19 AM, TheRandomPast . wrote: > I've created a script that allows me to see how many images are on a webpage > and their URL however now I want to download all .jpg images from this > website and save them onto my computer. Are you doing this because you want those .jpg

Re: Managing Google Groups headaches

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 3:43 AM, Roy Smith wrote: > The purpose of Google Groups is to generate traffic to their site, which > it does just fine. Making it behave better with newsgroups won't change > that, so there's no incentive for them to do so. Which is why the solution is to tell people to

Re: Managing Google Groups headaches

2013-11-28 Thread Ned Batchelder
On 11/28/13 11:23 AM, Travis Griggs wrote: Sent from my iPhone On Nov 28, 2013, at 7:40, Michael Torrie wrote: On 11/28/2013 08:08 AM, Chris Angelico wrote: Which is easier, fiddling around with your setup so you can post reasonably on Google Groups, or just getting a better client? With y

Re: Getting the Appdata Directory with Python and PEP?

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 3:11 AM, Eamonn Rea wrote: > Oh, sorry, I'm new to how Google Groups works. I wonder why it lays it out > like that. Can it not just show quotes like the way that PHPbb does? Google Groups is just a newsgroup client (and one of the worst in the world, imho). Ultimately, w

Jython - Can't access enumerations?

2013-11-28 Thread Eamonn Rea
Hello! I'm using Jython to write a game with Python/Jython/LibGDX. I wasn't having any trouble, and everything was going well, but sadly I can't access items in enumerations. If you know about the LibGDX library and have used it, you'll probably know about the BodyType enumeration for Box2D. I

Re: For-each behavior while modifying a collection

2013-11-28 Thread MRAB
On 28/11/2013 17:20, Ned Batchelder wrote: On 11/28/13 10:49 AM, Valentin Zahnd wrote: Hello For-each does not iterate ober all entries of collection, if one removes elements during the iteration. Example code: def keepByValue(self, key=None, value=[]): for row in self.flows: if

Re: For-each behavior while modifying a collection

2013-11-28 Thread Wolfgang Maier
Valentin Zahnd gmail.com> writes: > > Hello > > For-each does not iterate ober all entries of collection, if one > removes elements during the iteration. > > Example code: > > def keepByValue(self, key=None, value=[]): > for row in self.flows: > if not row[key] in value: >

Re: For-each behavior while modifying a collection

2013-11-28 Thread Ned Batchelder
On 11/28/13 10:49 AM, Valentin Zahnd wrote: Hello For-each does not iterate ober all entries of collection, if one removes elements during the iteration. Example code: def keepByValue(self, key=None, value=[]): for row in self.flows: if not row[key] in value: self.fl

Re: Downloading/Saving to a Directory

2013-11-28 Thread MRAB
On 28/11/2013 15:19, TheRandomPast . wrote: Hi, I've created a script that allows me to see how many images are on a webpage and their URL however now I want to download all .jpg images from this website and save them onto my computer. I've never done this before and I've become a little confuse

Re: Managing Google Groups headaches

2013-11-28 Thread Roy Smith
In article , Alister wrote: > Perhaps the best option is for everybody to bombard Google with bug > reports (preferably typed with extra long lines & double spaced as that > is clearly what they are used to & we would not want to upset them would > we? ) It's pretty clear Google doesn't care

Re: Managing Google Groups headaches

2013-11-28 Thread Alister
On Thu, 28 Nov 2013 08:22:27 -0800, rusi wrote: > On Thursday, November 28, 2013 9:20:39 PM UTC+5:30, Alister wrote: >> On Fri, 29 Nov 2013 02:08:17 +1100, Chris Angelico wrote: > >> > On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: >> >> Its really quite unclear to me why GG is a problem if all th

Re: Access database - GUI - Python - I need architectural advice

2013-11-28 Thread Sibylle Koczian
Am 28.11.2013 02:32, schrieb Mark Lawrence: On 28/11/2013 01:05, Dennis Lee Bieber wrote: Not quite as friendly, and sort of a moving target: Look at Dabo [the creators' goal was to create a Python equivalent of Visual FoxPro]. At http://www.dabodev.com/ and mailing list at gmane.comp.python.

Re: Managing Google Groups headaches

2013-11-28 Thread rusi
On Thursday, November 28, 2013 9:20:39 PM UTC+5:30, Alister wrote: > On Fri, 29 Nov 2013 02:08:17 +1100, Chris Angelico wrote: > > On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: > >> Its really quite unclear to me why GG is a problem if all the problems > >> of GG are obviated. > > Which is easier,

Re: Managing Google Groups headaches

2013-11-28 Thread Travis Griggs
Sent from my iPhone > On Nov 28, 2013, at 7:40, Michael Torrie wrote: > >> On 11/28/2013 08:08 AM, Chris Angelico wrote: >> Which is easier, fiddling around with your setup so you can post >> reasonably on Google Groups, or just getting a better client? With >> your setup, you have to drop out

Re: Getting the Appdata Directory with Python and PEP?

2013-11-28 Thread Eamonn Rea
Oh, sorry, I'm new to how Google Groups works. I wonder why it lays it out like that. Can it not just show quotes like the way that PHPbb does? I never thought of reading the source code, thanks! :-) Oh, and the last message is just spam :P -- https://mail.python.org/mailman/listinfo/python-lis

For-each behavior while modifying a collection

2013-11-28 Thread Valentin Zahnd
Hello For-each does not iterate ober all entries of collection, if one removes elements during the iteration. Example code: def keepByValue(self, key=None, value=[]): for row in self.flows: if not row[key] in value: self.flows.remove(row) It is clear why it behaves on th

Re: Managing Google Groups headaches

2013-11-28 Thread Alister
On Fri, 29 Nov 2013 02:08:17 +1100, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: >> Its really quite unclear to me why GG is a problem if all the problems >> of GG are obviated. > > Which is easier, fiddling around with your setup so you can post > reasonably on Google Gr

Re: Managing Google Groups headaches

2013-11-28 Thread Alister
On Fri, 29 Nov 2013 02:08:17 +1100, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: >> Its really quite unclear to me why GG is a problem if all the problems >> of GG are obviated. > > Which is easier, fiddling around with your setup so you can post > reasonably on Google Gr

Re: Managing Google Groups headaches

2013-11-28 Thread Alister
On Fri, 29 Nov 2013 02:08:17 +1100, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: >> Its really quite unclear to me why GG is a problem if all the problems >> of GG are obviated. > > Which is easier, fiddling around with your setup so you can post > reasonably on Google Gr

Re: Managing Google Groups headaches

2013-11-28 Thread Alister
On Fri, 29 Nov 2013 02:08:17 +1100, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: >> Its really quite unclear to me why GG is a problem if all the problems >> of GG are obviated. > > Which is easier, fiddling around with your setup so you can post > reasonably on Google Gr

Downloading/Saving to a Directory

2013-11-28 Thread TheRandomPast .
Hi, I've created a script that allows me to see how many images are on a webpage and their URL however now I want to download all .jpg images from this website and save them onto my computer. I've never done this before and I've become a little confused as to where I should go next. Can some kind

Re: Managing Google Groups headaches

2013-11-28 Thread Michael Torrie
On 11/28/2013 08:08 AM, Chris Angelico wrote: > Which is easier, fiddling around with your setup so you can post > reasonably on Google Groups, or just getting a better client? With > your setup, you have to drop out to another editor and press F9 for it > to work. With pretty much any other newsre

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Roy Smith
In article <34479463-b8a8-4417-9989-cd2936946...@googlegroups.com>, Victor Hooi wrote: > cur.executemany("INSERT INTO foobar_foobar_files VALUES (?)", > [[os.path.relpath(filename, foobar_input_folder)] for > filename in filenames]) I don't often wri

Re: Managing Google Groups headaches

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 2:04 AM, rusi wrote: > Its really quite unclear to me why GG is a problem if all the problems > of GG are obviated. Which is easier, fiddling around with your setup so you can post reasonably on Google Groups, or just getting a better client? With your setup, you have to d

Re: Managing Google Groups headaches

2013-11-28 Thread rusi
On Thursday, November 28, 2013 7:55:52 PM UTC+5:30, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 1:17 AM, rusi wrote: > > The problems with GG as I understand are > > 1. Double spacing > > 2. Long lines > > As far as I can see both are cured with the method outlined. > > If its not for others an

Re: Managing Google Groups headaches

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 1:17 AM, rusi wrote: > The problems with GG as I understand are > 1. Double spacing > 2. Long lines > > As far as I can see both are cured with the method outlined. > If its not for others and only for me, I'd like to know. > That 2 is a problem was only brought to my notic

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 1:04 AM, Tim Chase wrote: > You could work around this with: > > from functools import partial > in_ = partial(open, self.full_path) > out_ = partial(open, self.output_csv, 'ab') > with in_() as input, out_() as output: > do_stuff() Yeah, I think I'd prefer a b

Re: Managing Google Groups headaches

2013-11-28 Thread rusi
On Thursday, November 28, 2013 7:28:14 PM UTC+5:30, Chris Angelico wrote: > On Fri, Nov 29, 2013 at 12:52 AM, rusi wrote: > > Here's what I do to manage the GG-headaches: > Useful tips, I am sure, but they solve the problem only for you. > Everyone who reads python-list/c.l.p will have to impleme

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread Tim Chase
On 2013-11-28 03:58, Steven D'Aprano wrote: >> input = open(self.full_path) >> output = open(self.output_csv, 'ab') >> with input as input, output as output: >> ... > > That's really clever! Why didn't I think of that? Because if the 2nd output fails, the input doesn't get

Re: Managing Google Groups headaches

2013-11-28 Thread Chris Angelico
On Fri, Nov 29, 2013 at 12:52 AM, rusi wrote: > Here's what I do to manage the GG-headaches: Useful tips, I am sure, but they solve the problem only for you. Everyone who reads python-list/c.l.p will have to implement equivalent patches. Every archive of the newsgroup or mailing list suffers from

Managing Google Groups headaches

2013-11-28 Thread rusi
This silly google-groups does not reflect changed subject lines!! That means that GG users who may want to read this may not see it. So reposting as a new thread: -- Here's what I do to manage the GG-headaches: 1. Firefox needs to have the "Its all text" addon i

Curing google groups issues (was parsing nested unbounded XML…)

2013-11-28 Thread rusi
On Tuesday, November 26, 2013 4:55:55 AM UTC+5:30, larry@gmail.com wrote: > > Not sure what you mean by malformed. I don't really care for Google Groups, > > but I've been using it to post to this any other groups for years (since rn > > and deja news went away) and no one ever said my posts we

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-28 Thread MRAB
On 28/11/2013 03:06, Ben Finney wrote: Ned Batchelder writes: The important thing in a with statement is that the assigned name will be closed (or otherwise exited) automatically. The open call is just the expression used to assign the name. The expression there isn't really important. This

Re: '_[1]' in .co_names using builtin compile() in Python 2.6

2013-11-28 Thread magnus.ly...@gmail.com
On Wednesday, November 27, 2013 9:09:32 PM UTC+1, Ned Batchelder wrote: > I hope you aren't trying to prevent malice this way: you cannot examine > a piece of Python code to prove that it's safe to execute. No worry. Whoever has access to modifying those configuration files can cause a mess in a

reporting proxy porting problem

2013-11-28 Thread Robin Becker
I am in the process of porting reportlab to python3.3, one of the contributions is a module that implements a reporting proxy with a canvas that records all access calls and attribute settings etc etc. This fails under python3 because of differences between old and new style classes. I find t