Re: [Tutor] 12 year old starting to code

2016-01-11 Thread Alan Gauld
CCd to list for info On 11/01/16 22:55, Steven Molter wrote: > I'm running Python 3.5.1 on windows 10. OK, It should be in C:\Python35\Lib\idelib Look for a file called idle.bat and create a shortcut to that from your menu or desktop. If you aren't sure where the start menu items are, open the

Re: [Tutor] Question about the memory manager

2016-01-11 Thread Alan Gauld
On 10/01/16 16:16, Steven D'Aprano wrote: >> rainydayfund = [[] for x in xrange(16*1024)] # or however much you need >> def handle_exception(e): >> global rainydayfund >> del rainydayfund >> ... etc, etc ... > > I was going to write a scornful email about how useless this would be. Me too. >

Re: [Tutor] Question about the memory manager

2016-01-11 Thread James Chapman
If you read the comment that goes with the code snippet pasted in the original email it makes far more sense as the author is talking specifically about out of memory errors... "You already got excellent answers, I just wanted to add one more tip that's served me well over the years in a variety

Re: [Tutor] Question about the memory manager

2016-01-11 Thread Oscar Benjamin
On 11 January 2016 at 12:15, Alan Gauld wrote: > > But I think that it definitely is heavily OS dependent. > It should work in most *nix environments the first time > you call the function. But on second call I'd expect > all bets to be off. And in most real-time OS's

Re: [Tutor] Question about the memory manager

2016-01-11 Thread Oscar Benjamin
On 11 January 2016 at 15:40, Peter Otten <__pete...@web.de> wrote: >> I can't even work out how you trigger a MemoryError on Linux (apart >> from just raising one). I've tried a few ways to make the system run >> out of memory and it just borks the system rather than raise any error >> - I can

Re: [Tutor] Question about the memory manager

2016-01-11 Thread Peter Otten
Oscar Benjamin wrote: > On 11 January 2016 at 12:15, Alan Gauld wrote: >> >> But I think that it definitely is heavily OS dependent. >> It should work in most *nix environments the first time >> you call the function. But on second call I'd expect >> all bets to be

[Tutor] Thread output to GUI Text Field

2016-01-11 Thread Patrycja Niewosz
Hi All, I use commands, server_address = ('134.32.45.9', 1) print ('starting up on port '% server_address) sock.bind(server_address) the message pop ups in the window command when I run full code, however I would like to print this message in the main GUI, where I

Re: [Tutor] Thread output to GUI Text Field

2016-01-11 Thread Alan Gauld
On 11/01/16 16:12, Patrycja Niewosz wrote: > Hi All, > > I use commands, > > server_address = ('134.32.45.9', 1) > print ('starting up on port '% server_address) > sock.bind(server_address) > > the message pop ups in the window command when I run full code, however I

[Tutor] 12 year old starting to code

2016-01-11 Thread Steven Molter
I am homeschooling my son Spencer, and he is interested in learning how to write code. We purchased a book by DK called "Help Your Kids With Computer Coding". We have done the section on scratch, and now have started the Python section. The book was written using IDLE, but with the newest

[Tutor] Organizing files

2016-01-11 Thread Rene Werner
Hello list, right now I am working on a couple of programming-related challenges. The challenges are sorted into problem sets, where each set contains a number of problems. Because a lot of these problems rely on code that is often the same, I have put these parts into a seperate file, util.py,

Re: [Tutor] 12 year old starting to code

2016-01-11 Thread Alan Gauld
On 11/01/16 16:40, Steven Molter wrote: > Python section. The book was written using IDLE, but with the newest > version of Python, I am unable to get the IDLE shell running. Which OS do you use? (and which specific Python version?) If it's Windows you may prefer the ActiveState.com

Re: [Tutor] Organizing files

2016-01-11 Thread Cameron Simpson
On 11Jan2016 13:51, Rene Werner wrote: right now I am working on a couple of programming-related challenges. The challenges are sorted into problem sets, where each set contains a number of problems. Because a lot of these problems rely on code that is often the same,

Re: [Tutor] Organizing files

2016-01-11 Thread Alex Kleider
On 2016-01-11 04:51, Rene Werner wrote: Hello list, right now I am working on a couple of programming-related challenges. The challenges are sorted into problem sets, where each set contains a number of problems. Because a lot of these problems rely on code that is often the same, I have