Re: [Tutor] My code works but it is a little bit broken.

2011-09-26 Thread brandon w
The fields take the initial value and multiply it to get the amount. The problem in in the callback function. It uses the event to clear a field, but when the mouse enters a second time it adds a numeric value. This is a semantic error. It is not doing what I want it to do. On Mon, Sep 26, 2011 a

Re: [Tutor] Funtions, modules & global variables

2011-09-26 Thread Dave Angel
(Don't top-post. Put your new remarks after whatever you're quoting) On 09/26/2011 08:26 PM, questions anon wrote: Thanks for your feedback. I might be asking the wrong questions. I have written a number of scripts that do various things for each step: 1. get data (e.g. Dec-jan-feb, only januar

Re: [Tutor] Funtions, modules & global variables

2011-09-26 Thread questions anon
Thanks for your feedback. I might be asking the wrong questions. I have written a number of scripts that do various things for each step: 1. get data (e.g. Dec-jan-feb, only januarys, all data) 2. summary stats(e.g. max, min, frequency) 3. plot data (e.g. plot with time, plots subplots, plot with p

Re: [Tutor] Review my code

2011-09-26 Thread Chanakya Mitra
Hi Steve, >Some brief comments: > >When you send code by HTML email, you mess up the formatting of the >code. Please don't do that in the future. Noted and sorry about that. Someone also pointed out I should have said 'please' in my original email, so apologies if I came across as rude and dema

Re: [Tutor] Review my code

2011-09-26 Thread Steven D'Aprano
Chanakya Mitra wrote: I wrote a short script that tries to check if an email address exists or not. Some brief comments: When you send code by HTML email, you mess up the formatting of the code. Please don't do that in the future. def mailxch(hname): mxhosts = DNS.mxlookup(hname)

Re: [Tutor] taking input for a list in a list

2011-09-26 Thread Peter Otten
surya k wrote: > Actually my programming language is C.. learning python. > > I'm trying to write sudoku program for which I need to take input. > This is what I did merely > > *list = [] > for i in range (0,4) : > for j in range (0,4) : >list[i][j].append (" int (raw_input("En

Re: [Tutor] taking input for a list in a list

2011-09-26 Thread Joel Goldstick
On Mon, Sep 26, 2011 at 8:46 AM, surya k wrote: > Hi, > > Actually my programming language is C.. learning python. > > I'm trying to write sudoku program for which I need to take input. > This is what I did merely > > *list = [] > for i in range (0,4) : > for j in range (0,4) : >

[Tutor] taking input for a list in a list

2011-09-26 Thread surya k
Hi, Actually my programming language is C.. learning python. I'm trying to write sudoku program for which I need to take input. This is what I did merely *list = [] for i in range (0,4) : for j in range (0,4) : list[i][j].append (" int (raw_input("Enter") ) ) * This is complete

[Tutor] Review my code

2011-09-26 Thread Chanakya Mitra
I wrote a short script that tries to check if an email address exists or not. It takes the domain of the inputted email and looks up the registered mail exchange. It then connects via smtp and attempts the "RCPT TO:" command and based on the response decides if the email exists or not.

Re: [Tutor] execute a function

2011-09-26 Thread Dave Angel
On 09/26/2011 06:53 AM, Sajjad wrote: Hello forum, It has been two days that i have started with python and i am stuck with the following simple issue: i have created a python file and inside the file i have defined a function as follows: //

Re: [Tutor] execute a function

2011-09-26 Thread Steven D'Aprano
Sajjad wrote: Hello forum, It has been two days that i have started with python and i am stuck with the following simple issue: i have created a python file and inside the file i have defined a function as follows: def greeting():

[Tutor] execute a function

2011-09-26 Thread Sajjad
Hello forum, It has been two days that i have started with python and i am stuck with the following simple issue: i have created a python file and inside the file i have defined a function as follows: def greeting(): print "Welc

Re: [Tutor] My code works but it is a little bit broken.

2011-09-26 Thread Alan Gauld
On 26/09/11 03:25, brandon w wrote: This code calculates money. The problem is that in the first field after the mouse enters a second time updates itself with the value from the last field. I don't want it to do that. I think that the problem is in the "callback" method. I haven't gone throug