Re: [Tutor] Changes to dbm module/file format

2015-10-15 Thread Steven D'Aprano
On Fri, Oct 16, 2015 at 12:26:28AM +0100, Alan Gauld wrote: > Has anyone noticed a change to the DBM file format or is it an OS > specific thing? Last time I used dbm it was on a Windoze box with > Python 3.3 and it generated sets of 3 files for each 'database' > created. (I think this is what it

[Tutor] Changes to dbm module/file format

2015-10-15 Thread Alan Gauld
Has anyone noticed a change to the DBM file format or is it an OS specific thing? Last time I used dbm it was on a Windoze box with Python 3.3 and it generated sets of 3 files for each 'database' created. (I think this is what it did under v2 as well?) I just used it on my Linux box in 3.4 and i

Re: [Tutor] how to unittest cli input

2015-10-15 Thread Alex Kleider
On 2015-10-14 11:29, Danny Yoo wrote: ## def make_ask(f, l, p): d = {'Enter your first name: ' : f, 'Enter your last name: ' : l, 'Your mobile phone #: ' : p} return d.get ## This is an example of a 'closure' is it not? Y

Re: [Tutor] File operation query

2015-10-15 Thread Alan Gauld
On 15/10/15 17:00, Reuben wrote: I need some clarification for below code. In line 2 of below code snippet, I have provided read and write permission. Thios is nearly always a bad idea and leads to all sorts of complications, as you are discovering! string input as requested in line 1 - wh

Re: [Tutor] File operation query

2015-10-15 Thread Emile van Sebille
On 10/15/2015 9:00 AM, Reuben wrote: Hi All, I need some clarification for below code. In line 2 of below code snippet, I have provided read and write permission. Assuming I have provided some string input as requested in line 1 - when I try to open "check.txt" file after running the script, it

Re: [Tutor] File operation query

2015-10-15 Thread Emile van Sebille
On 10/15/2015 9:00 AM, Reuben wrote: Hi All, I need some clarification for below code. In line 2 of below code snippet, I have provided read and write permission. Assuming I have provided some string input as requested in line 1 - when I try to open "check.txt" file after running the script, it

Re: [Tutor] File operation query

2015-10-15 Thread Joel Goldstick
On Thu, Oct 15, 2015 at 12:00 PM, Reuben wrote: > Hi All, > > I need some clarification for below code. In line 2 of below code snippet, > I have provided read and write permission. Assuming I have provided some > string input as requested in line 1 - when I try to open "check.txt" file > after r

Re: [Tutor] File operation query

2015-10-15 Thread Peter Otten
Reuben wrote: > I need some clarification for below code. In line 2 of below code snippet, > I have provided read and write permission. Assuming I have provided some > string input as requested in line 1 - when I try to open "check.txt" file > after running the script, it is always empty - it does

[Tutor] File operation query

2015-10-15 Thread Reuben
Hi All, I need some clarification for below code. In line 2 of below code snippet, I have provided read and write permission. Assuming I have provided some string input as requested in line 1 - when I try to open "check.txt" file after running the script, it is always empty - it does not display t

Re: [Tutor] how to unittest cli input

2015-10-15 Thread Peter Otten
Alex Kleider wrote: > On 2015-10-14 12:27, Peter Otten wrote: >> Alex Kleider wrote: >> >>> On 2015-10-13 14:44, Alex Kleider wrote: On 2015-10-13 12:11, Danny Yoo wrote: > ## > def make_ask(f, l, p): > d = {'Enter your first name: ' : f, >