Re: keyrings.cryptfile released on github

2017-03-13 Thread Hans-Peter Jansen
On Dienstag, 14. März 2017 00:33:34 Hans-Peter Jansen wrote: > > I plan to add authenticated service and username support via associated data > as well (that protects against tampering with these values). Done. > Cheers, > Pete -- https://mail.python.org/mailman/listinfo/python-list

Re: keyrings.cryptfile released on github

2017-03-13 Thread Hans-Peter Jansen
On Freitag, 10. März 2017 13:31:41 Paul Rubin wrote: > Hans-Peter Jansen writes: > > [1] http://web.cs.ucdavis.edu/~rogaway/ocb/license.htm > > Oh that's interesting, he's expanded the free licenses. Still though, > while OCB is very clever and it was important as the first satisfactory > AEAD m

Re: Substitute a mock object for the metaclass of a class

2017-03-13 Thread Matt Wheeler
A small correction... On Mon, 13 Mar 2017 at 22:36 Matt Wheeler wrote: > ``` > from unittest.mock import patch > > import lorem > > > @patch('lorem.type') > def test_things(mocktype): > lorem.quux(metameta.Foo()) > > lorem.return_value.assert_called_with() > this line should of course re

Re: Substitute a mock object for the metaclass of a class

2017-03-13 Thread Matt Wheeler
On Mon, 13 Mar 2017 at 00:52 Ben Finney wrote: > How can I override the metaclass of a Python class, with a > `unittest.mock.MagicMock` instance instead? > At first I misunderstood what you were looking for, and was about to reply to the effect of "you're too late, the metaclass has already been

Re: [External] Unsubscribe to Python email list

2017-03-13 Thread Terry Reedy
On 3/13/2017 9:24 AM, Falter, Donald [USA] wrote: Yeah, I think I'm going to bail on this list too. Thanks Then follow MRAB's explaination of how. You'll have to do it yourself. Read this: https://mail.python.org/mailman/listinfo/python-list The relevant bit is in the section titled "Pyth

Re: Issues with in try except and excel spreadsheet

2017-03-13 Thread padawanwebdev
On Monday, March 13, 2017 at 11:10:36 AM UTC-7, Rhodri James wrote: > On 13/03/17 17:40, padawanweb...@gmail.com wrote: > > Hello, I'm having a problem with a try except inside a while loop. The > > problem I see occuring has to do with an excel file the script tries to > > write to while the exc

Re: Issues with in try except and excel spreadsheet

2017-03-13 Thread Rhodri James
On 13/03/17 17:40, padawanweb...@gmail.com wrote: Hello, I'm having a problem with a try except inside a while loop. The problem I see occuring has to do with an excel file the script tries to write to while the excel file is open. The exception captures and gives an error: OError: [Errno 13]

Re: What's the neatest way of getting dictionary entries in a specified order?

2017-03-13 Thread John Gordon
In Michael Torrie writes: > The order of the displayed fields is usually something set by the GUI > API when you create the table widget. At least in most toolkits I'm > familiar with. As well, when you add the row to the widget, you > normally specify the fields (the data) individually, so I

How to set initial size of gtk.TextView window?

2017-03-13 Thread Chris Green
I have a series of data fields laid out in a Vbox, the size needs to vary, some need to be two lines high, others four lines or more. The code creating the fields is:- def __init__(self, multiline=0): self.multiline = multiline if (self.multiline): self.buffer = gt

Re: i got error while writing data to file

2017-03-13 Thread Ben Iannitelli
Hello again, It seems I was a little too quick to hit "send". Option #2 of the two possible solutions I offered is not right. Here's what it should be (unless the formatting gets garbled): with open('E:/amadown2py-master/reviews1.csv', 'r',encoding='UTF8') as csvfile: with open('E:/amadown2

Issues with in try except and excel spreadsheet

2017-03-13 Thread padawanwebdev
Hello, I'm having a problem with a try except inside a while loop. The problem I see occuring has to do with an excel file the script tries to write to while the excel file is open. The exception captures and gives an error: OError: [Errno 13] Permission denied:'C:\\Users\\Administrator\\Deskto

Re: i got error while writing data to file

2017-03-13 Thread Ben Iannitelli
Hi Madhu, I don't know much about web scraping but I can explain why your output is so much smaller than your input: you keep writing over your output file. The way I see it you have two options: 1. Where you wrote "mode='wt'", change "wt" to "at". The replacement "at" appends your output text

Re: i got error while writing data to file

2017-03-13 Thread Amit Yaron
You open the file more than once for which row with score greater than 3. Every time you open a file for writing it truncates an existing one with the same name. On 13/03/17 13:25, Madhusudhanan Sambath wrote: hi to all, this is madhu...i am new to python this is my python code, where i label

Re: Does one create an event to notify parent window/GUI of something?

2017-03-13 Thread Michael Torrie
On 03/13/2017 02:37 AM, Chris Green wrote: > Michael Torrie wrote: >> On 03/12/2017 06:14 AM, Chris Green wrote: >>> There are (of course) event handlers for the 'Save' and 'Cancel' >>> button click events in abookeditgui, what I need is hooks from these >>> to run some code in abookgui after the

RE: [External] Unsubscribe to Python email list

2017-03-13 Thread Falter, Donald [USA]
Yeah, I think I'm going to bail on this list too. Thanks -Original Message- From: Python-list [mailto:python-list-bounces+falter_donald=bah@python.org] On Behalf Of Pablo Lozano Sent: Thursday, March 9, 2017 9:38 PM To: python-list@python.org Subject: [External] Unsubscribe to Python

i got error while writing data to file

2017-03-13 Thread Madhusudhanan Sambath
hi to all, this is madhu...i am new to python this is my python code, where i labeled the reviews taken from amazon as positive, negative and neutral based on review score i have collected reviews and scores from amazon scrap prg, but i have problem while doing labelling.kindly help me import

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-13 Thread Peter Otten
Chris Green wrote: > MRAB wrote: >> On 2017-03-12 22:44, Chris Green wrote: >> > This should be simple but I can't manage it at the moment! :-) >> > >> > I have opened a database connection and have set the row_factory to >> > sqlite3.Row. >> > >> > So how do I actually iterate through a row of

Re: When will os.remove fail?

2017-03-13 Thread Marko Rauhamaa
eryk sun : > On Sun, Mar 12, 2017 at 5:48 PM, Steve D'Aprano > wrote: >> >> Does os.remove work like this under Windows too? > > os.remove calls DeleteFile on Windows. [...] Fascinating info, Eryk. The difference between file removal in Linux and Windows is a bit like the difference between obj

Re: When will os.remove fail?

2017-03-13 Thread eryk sun
On Sun, Mar 12, 2017 at 5:48 PM, Steve D'Aprano wrote: > > Does os.remove work like this under Windows too? os.remove calls DeleteFile on Windows. This in turn calls NtOpenFile to instantiate a kernel File object that has delete access and return a handle to it. Next it calls NtSetInformationFile

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-13 Thread Chris Green
Paul Rubin wrote: > Chris Green writes: > > self.conn = sqlite3.connect(dbname) > > self.conn.row_factory = sqlite3.Row > > self.cursor = self.conn.cursor() > > self.table = table > > ... > > ... > > sql = "SELECT * FROM " + self.table + " W

Re: Does one create an event to notify parent window/GUI of something?

2017-03-13 Thread Chris Green
Michael Torrie wrote: > On 03/12/2017 06:14 AM, Chris Green wrote: > > There are (of course) event handlers for the 'Save' and 'Cancel' > > button click events in abookeditgui, what I need is hooks from these > > to run some code in abookgui after the abookeditgui has completed. How > > should one

Re: How to iterate through the columns in a row using sqlite3.Row

2017-03-13 Thread Chris Green
MRAB wrote: > On 2017-03-12 22:44, Chris Green wrote: > > This should be simple but I can't manage it at the moment! :-) > > > > I have opened a database connection and have set the row_factory to > > sqlite3.Row. > > > > So how do I actually iterate through a row of data having used > > fetchone