Thonny 2.0 released (Python IDE for beginners)
Hi! Thonny is Python IDE for learning and teaching programming. It is developed in University of Tartu, Estonia. It has an easy to use debugger which shows clearly how Python executes your programs. Unlike most debuggers, it can even show the steps of evaluating an expression, visually explain references, function calls, exceptions etc. For more info and downloads see http://thonny.cs.ut.ee/ [1] best regards, Aivar Annamaa University of Tartu Institute of Computer Science http://thonny.cs.ut.ee";>Thonny 2.0 - Python IDE for beginners (01-Oct-16) Links: -- [1] http://thonny.cs.ut.ee/ -- https://mail.python.org/mailman/listinfo/python-list
Is it possible to create C-style "main" function in Python? (for teaching purposes)
Hi! I'm looking for a trick or hidden feature to make Python 3 automatically call a "main" function but without programmers writing `if __name__ == "__main__": ...` I found rejected PEP 299, but i thought that maybe there's something new already. Here's why I want such a thing: I'm teaching introductory programming course with Python. I've seen that global variables attract beginners like honey attracts bees and this makes teaching function parameters harder. When students learn functions, they usually write their function definitions and function applications in the same scope -- in top-level of the module (don't know the correct term for it). This has the downside, that any variable introduced in top-level is automatically visible in function definitions and I have hard time convincing students not to use those variables in functions directly. I've been thinking that it might be better for teaching if all program code would be in functions. This would make "Hello World" a bit more difficult, but would help teaching the "real thing" ie. functions. best regards, Aivar -- http://mail.python.org/mailman/listinfo/python-list
Re: Is it possible to create C-style "main" function in Python? (for teaching purposes)
Thanks for all the comments! It seems that the best way is still just to teach students self discipline. And hope that they (for now) believe some things (eg. dangers of global variables) without seeing. Aivar -- http://mail.python.org/mailman/listinfo/python-list
Problem with -3 switch
Hi I'm getting started with Python and in order to get good habits for Python 3, i'd like to run my Python 2.6.1 with Python 3 warning mode. When i run python -3 and execute statement >>> print 4 then i expect to see a warning because i've understood that this statement is not valid in Python 3 however no warning appears. Have is misunderstood something? I'm running Python on Windows Vista. thanks in advance! Aivar -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem with -3 switch
As was recently pointed out in a nearly identical thread, the -3 switch only points out problems that the 2to3 converter tool can't automatically fix. Changing print to print() on the other hand is easily fixed by 2to3. Cheers, Chris I see. So i gotta keep my own discipline with print() then :) thanks! A -- http://mail.python.org/mailman/listinfo/python-list