[Tutor] How to "refresh" the interactive prompt?

2011-10-01 Thread Richard D. Moores
Python 3.2.2, Win 7 When using the Python 3 interactive prompt, is there a way to quickly "refresh" the prompt? By "refresh" I mean get a new interactive prompt with nothing imported and all things like a = "qwerty", n = 123, etc. no longer in effect. Not sure what the wording should be for tha

[Tutor] How to give input to a list

2011-10-01 Thread surya kasturi
Hi, How give input to a list all at once. I mean if we declared a array and like to take input for it for (i=0;i<5;i++) scanf("%d",&array[i]); here we can give input of 5 numbers with a space in command prompt. Similarly in python if i create a list and do similar process list = [ [ ],

Re: [Tutor] guess age programme (please help)

2011-10-01 Thread Walter Prins
Hi, On 1 October 2011 05:13, Steven D'Aprano wrote: > Hi all, can anyone help me with the attached programme. >> > > ADRIAN KELLY wrote: > I'd love to, but I can't open it :( > > If the truth be known, I could open it if I spent the time and effort. But > that actually is significant time and ef

Re: [Tutor] Input

2011-10-01 Thread Ed Hughes
Have a look at the Windows/Unix/Linux solution posted in the ActiveState Python Recipes, (a fantastic resource), here - a bit long winded maybe but it works fine under Linux and Windows for me. It's pretty much based on the standard docs solution as alre

Re: [Tutor] fake defrag revisited

2011-10-01 Thread Dave Angel
On 10/01/2011 11:53 AM, R. Alan Monroe wrote: achieve the cosmetic randomness, until I realized the real problem is magically determining the correct sequence in which to perform the moves without ruining a future move inadverently. If I move 0-to-1 first, I've now ruined the future 1-to-22 whic

Re: [Tutor] fake defrag revisited

2011-10-01 Thread R. Alan Monroe
>> achieve the cosmetic randomness, until I realized the real problem is >> magically determining the correct sequence in which to perform the >> moves without ruining a future move inadverently. >> >> If I move 0-to-1 first, I've now ruined the future 1-to-22 which ought >> to have taken place in

Re: [Tutor] fake defrag revisited

2011-10-01 Thread Dave Angel
On 10/01/2011 02:06 AM, R. Alan Monroe wrote: I'm revisiting the fake defrag program I posted about a few months ago. The concept is basically a screensaver or light show where you can enjoy watching entropy being reversed as colored blocks order themselves visually. I set it aside for a while b

Re: [Tutor] guess age programme (please help)

2011-10-01 Thread Alan Gauld
On 01/10/11 05:13, Steven D'Aprano wrote: (2) For larger amounts, say, more than 50 lines, attach it as a file. Or put it on one of the several public web pastebins. That will give us all syntax colouring and no ambiguity about indentation levels etc that often seems to occur via email. htt