Re: [Tutor] writing effective unittests

2013-01-04 Thread Alan Gauld
On 04/01/13 07:10, Brian van den Broek wrote: ... confirm that the code works as intended when written, but that it continues to work several moths later moths? They'll be the bugs I guess? Sorry I couldn't resist :-) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/

Re: [Tutor] writing effective unittests

2013-01-04 Thread Brian van den Broek
On 4 January 2013 03:34, Alan Gauld wrote: > On 04/01/13 07:10, Brian van den Broek wrote: > ... > >> confirm that the code works as intended when written, but that it >> continues to work several moths later > > > moths? They'll be the bugs I guess? > > Sorry I couldn't resist :-) :-) I shouldn

[Tutor] help about to how many times the function called

2013-01-04 Thread lei yang
Hi experts I have a function will print PASS status def print_pass(t_elapsed): """ Print PASS to stdout with PASS (green) color. """ print_stdout(bcolors.PASS + "PASS" + bcolors.ENDC + " (%.2f s)" % t_elapsed) I want to calculate the pass number, so I want to get " how many tim

Re: [Tutor] help about to how many times the function called

2013-01-04 Thread Steven D'Aprano
On 04/01/13 20:17, lei yang wrote: Hi experts I have a function will print PASS status def print_pass(t_elapsed): """ Print PASS to stdout with PASS (green) color. """ print_stdout(bcolors.PASS + "PASS" + bcolors.ENDC + " (%.2f s)" % t_elapsed) I want to calculate the pa

[Tutor] Vending machine program

2013-01-04 Thread Ghadir Ghasemi
H I wanted to create a program called vending machine and I wondered if you could do it so I can find out how to do it. Here is how it should work like: A food vending machine accepts 10p, 20p, 50p and £1 coins. One or more coins are inserted and the current credit is calculated and displayed. A

Re: [Tutor] Vending machine program

2013-01-04 Thread Hugo Arts
On Fri, Jan 4, 2013 at 12:34 PM, Ghadir Ghasemi < ghasemm...@leedslearning.net> wrote: > H I wanted to create a program called vending machine and I wondered if > you could do it so I can find out how to do it. > No. This list is meant to help people with specific questions about their python pro

Re: [Tutor] Trouble importing Paramiko

2013-01-04 Thread Ufuk Eskici
Hello Hugo, I removed all related softwares from my PC and tried to re-install everyting. At the last step, this command fails (instructions: http://vijaymurthy.blogspot.com/2011/03/installing-paramiko-for-windows.html ) C:\paramiko-1.7.4>python setup.py build --compiler=mingw32 bdist_winin

Re: [Tutor] Trouble importing Paramiko

2013-01-04 Thread Walter Prins
Hi Ufuk, On 4 January 2013 13:03, Ufuk Eskici wrote: > Hello Hugo, > > I removed all related softwares from my PC and tried to re-install > everyting. > > At the last step, this command fails (instructions: > http://vijaymurthy.blogspot.com/2011/03/installing-paramiko-for-windows.html > ) > > **

Re: [Tutor] help about to how many times the function called

2013-01-04 Thread bob gailer
On 1/4/2013 4:25 AM, Steven D'Aprano wrote: On 04/01/13 20:17, lei yang wrote: Hi experts I have a function will print PASS status def print_pass(t_elapsed): """ Print PASS to stdout with PASS (green) color. """ print_stdout(bcolors.PASS + "PASS" + bcolors.ENDC + " (%.2f

Re: [Tutor] Vending machine program

2013-01-04 Thread bob gailer
On 1/4/2013 6:34 AM, Ghadir Ghasemi wrote: H I wanted to create a program called vending machine and I wondered if you could do it so I can find out how to do it. Here is how it should work like: A food vending machine accepts 10p, 20p, 50p and £1 coins. One or more coins are inserted and the c

Re: [Tutor] Vending machine program

2013-01-04 Thread Mitya Sirenef
On 01/04/2013 06:34 AM, Ghadir Ghasemi wrote: H I wanted to create a program called vending machine and I wondered if you could do it so I can find out how to do it. > Here is how it should work like: > > A food vending machine accepts 10p, 20p, 50p and £1 coins. > One or more coins are inserte

Re: [Tutor] invalid literal for int error in Game loop

2013-01-04 Thread Francesco Loffredo
Ciaran Mooney wrote: Thanks for the feedback. Steve, If I set the FPS to a default of say 30, the game seems to run at this default FPS=30 regardless of the key pressed in the function. Dave, If I remove the the default value at the start of the function and add it to elif in the loop I get

Re: [Tutor] Trouble importing Paramiko

2013-01-04 Thread Ufuk Eskici
Hi Walter, Adding Python location to sytem path works. :-) Thanks a lot! Ufuk 2013/1/4 Walter Prins > Hi Ufuk, > > On 4 January 2013 13:03, Ufuk Eskici wrote: > >> Hello Hugo, >> >> I removed all related softwares from my PC and tried to re-install >> everyting. >> >> At the last step, this

[Tutor] stuck on a new program

2013-01-04 Thread Ghadir Ghasemi
Hi guys I recently created a binary to denary and denary to binary convertor program. It is pretty much finished but I can't get it to work. Can you spot the fault in it please and tell me how it coul be fixed? print("==") print("1 = binary to denary") print("2 = denary to binary

Re: [Tutor] stuck on a new program

2013-01-04 Thread Hugo Arts
On Fri, Jan 4, 2013 at 11:15 PM, Ghadir Ghasemi < ghasemm...@leedslearning.net> wrote: > Hi guys I recently created a binary to denary and denary to binary > convertor program. It is pretty much finished but I can't get it to work. > Can you spot the fault in it please and tell me how it coul be f

Re: [Tutor] Vending machine program

2013-01-04 Thread Alan Gauld
On 04/01/13 17:47, bob gailer wrote: > Further selections can be made if there is enough credit. This is confusing. You could drop that line with no ill effect. I am not sure what it even means. It seemed straightforward enough to me Bob. If you put in $10 and buy a candy bar for $6 you have