[Tutor] Visual and audible system bell

2011-12-11 Thread David Smith
Dear list In a terminal window python3.2 at the command gives me Python 3.2 (r32:88452, Feb 20 2011, 11:12:31) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> then print ("\a") triggers a visual and aud

Re: [Tutor] best book for OOP

2011-12-11 Thread wesley chun
what do you think you are missing? is there something in the book that you don't/can't understand? those of us on the list may be able to help you out... sometimes humans are better at explaining things than just books. :-) best regards, --wesley On Sun, Dec 11, 2011 at 6:49 AM, surya k wrote:

Re: [Tutor] Running a script!

2011-12-11 Thread David Smith
If I have understood you correctly you are looking at the Python Shell. On this window choose File then New Window this will open a script window albeit without any code. This window will have a Run menu and within this menu there is a Run Module item which is what I think you are looking for.

[Tutor] Running a script!

2011-12-11 Thread Bulent Arikan
Dear List, I am an absolute beginner to programming and Python. I have Python 2.6.5 and 3.2 running on Mac OS 10.6.8 Snow Leopard. I have self-help books but the problem I am having is not described in any of them. The answer may be too obvious though. I am using IDLE: I figured that I could call

Re: [Tutor] (no subject)

2011-12-11 Thread Hugo Arts
On Mon, Dec 12, 2011 at 2:00 AM, shawn taylor wrote: > I find it rude and offensive that you would make the assumption that this is > my homework, this is not my homework but a study guide for my final tomorrow > that I have no idea how to do. I have been working on this all day and this > was my

Re: [Tutor] (no subject)

2011-12-11 Thread Alan Gauld
On 11/12/11 22:30, shawn taylor wrote: How do I do this Read the assignment, it tells you exacvtly what you need to do. Now which bit of it do you not understand? Can you do step 1 - read the name, id and birthday? Can you generate the user name? As a hint you might want to write some helper

Re: [Tutor] best book for OOP

2011-12-11 Thread Alan Gauld
On 11/12/11 18:48, xDog Walker wrote: Finally there is Bruce Eckel's ever popular pair: "Thinking In Java/C++" But frankly these are more likely to lead to bad habits for the Python programmerr because C++ and Java share a very narrow view of OOP which does not align well with Pythons more dynam

Re: [Tutor] (no subject)

2011-12-11 Thread Hugo Arts
On Sun, Dec 11, 2011 at 11:30 PM, shawn taylor wrote: > How do I do this > > > Password Generator > For this assignment, you will generate usernames and passwords for your > school. The passwords have to be secure and based on information provided by > the parents at registration. > 1) Write a pro

[Tutor] (no subject)

2011-12-11 Thread shawn taylor
How do I do this Password Generator For this assignment, you will generate usernames and passwords for your school. The passwords have to be secure and based on information provided by the parents at registration. 1) Write a program that will prompt the user for FirstName LastName IDNumber Birt

[Tutor] best book for OOP

2011-12-11 Thread Cranky Frankie
surya k wrote: <> This book: http://www.amazon.com/Python-Programming-Absolute-Beginner-3rd/dp/1435455002/ref=sr_1_1?ie=UTF8&qid=1323630959&sr=8-1 has a really gentle, easy to follow OOP section, and he includes lots of programs where you can see how the classes and methods make sense (simple

Re: [Tutor] return, why do I need it?

2011-12-11 Thread Robert Sjöblom
> On 12/12/2011 01:38 AM, Pete O'Connell wrote: >> Hi I have been writing python code for a while now and I never return >> anything within any of my functions, I just (eg.) print stuff or make >> directories or update a log or what have you. When I look at other >> people's code they are always r

Re: [Tutor] best book for OOP

2011-12-11 Thread xDog Walker
On Sunday 2011 December 11 08:45, Alan Gauld wrote: > On 11/12/11 14:49, surya k wrote: > > Finally there is Bruce Eckel's ever popular pair: "Thinking In Java/C++" > But frankly these are more likely to lead to bad habits for the Python > programmerr because C++ and Java share a very narrow view o

Re: [Tutor] return, why do I need it?

2011-12-11 Thread Wayne Werner
On Dec 11, 2011 8:41 AM, "Pete O'Connell" wrote: > > Hi I have been writing python code for a while now and I never return anything within any of my functions, I just (eg.) print stuff or make directories or update a log or what have you. When I look at other people's code they are always returnin

Re: [Tutor] Need Explanation...

2011-12-11 Thread Sunil Tech
*Thank you all...* *for your previous time. :) * On Sun, Dec 11, 2011 at 2:56 PM, Alan Gauld wrote: > On 11/12/11 03:23, Lie Ryan wrote: > > If returning 'self' is the default expected behavior, it would cause >> inconsistencies with respect to immutable types. For example, `5 >> .__add__(2)`, on

Re: [Tutor] how to return an object generated during a python threading code

2011-12-11 Thread Lie Ryan
On 12/11/2011 03:46 AM, Massimo Di Stefano wrote: Hi All, > Trying to read the documentation, i'm looking on how to use " threading.Lock() " and its methods "acquire() and release()" that seems to be the solution to my issue ... but i'm really far to understand how to implement it in my exampl

Re: [Tutor] return, why do I need it?

2011-12-11 Thread Lie Ryan
On 12/12/2011 01:38 AM, Pete O'Connell wrote: Hi I have been writing python code for a while now and I never return anything within any of my functions, I just (eg.) print stuff or make directories or update a log or what have you. When I look at other people's code they are always returning in t

Re: [Tutor] (no subject)

2011-12-11 Thread lina
On Mon, Dec 12, 2011 at 1:49 PM, Aswin Shan wrote: > Hi! > I need help in creating a GUI for my python code to program a Hangman. I > have programmed a working code of Hangman, but I need to make it to a proper > program with GUI. please help. > The code is given below: > > import random; > import

Re: [Tutor] best book for OOP

2011-12-11 Thread Alan Gauld
On 11/12/11 14:49, surya k wrote: I'm reading "Core Python Programming" - Chun.. Currently, I am studying OOP in it.. and I feel there is something I am missing in that while studying. > Actually I am from C.. so, no idea of OOP. Could you tell me the best, simple, easy to understand book!!

Re: [Tutor] Hangman GUI

2011-12-11 Thread Alan Gauld
On 12/12/11 05:49, Aswin Shan wrote: Please use a sensible subject line in your postings. It will help people find the thread and encourage those with appropriate skills to read it. I need help in creating a GUI for my python code to program a Hangman. I have programmed a working code of Han

Re: [Tutor] return, why do I need it?

2011-12-11 Thread bodsda
Why unindent functions for testing? Challenge: write a function called myadd(one, two) that accepts 2 parameters, both will be ints. When the function is called, it should add both parameters together. It should allow me to do this: a = myadd(5, 10) a += myadd(10, 5) a == 30 True Hopefully

[Tutor] best book for OOP

2011-12-11 Thread surya k
I'm reading "Core Python Programming" - Chun..  Currently, I am studying OOP in it.. and I feel there is something I am missing in that while studying. Actually I am from C.. so, no idea of OOP. Could you tell me the best, simple, easy to understand book!!

[Tutor] return, why do I need it?

2011-12-11 Thread Pete O'Connell
Hi I have been writing python code for a while now and I never return anything within any of my functions, I just (eg.) print stuff or make directories or update a log or what have you. When I look at other people's code they are always returning in their functions and I was wondering if someone co

[Tutor] (no subject)

2011-12-11 Thread Aswin Shan
Hi! I need help in creating a GUI for my python code to program a Hangman. I have programmed a working code of Hangman, but I need to make it to a proper program with GUI. please help. The code is given below: import random; import time; correct_guesses = ['-', ' '] guessed_letters = [] def

Re: [Tutor] Need Explanation...

2011-12-11 Thread Alan Gauld
On 11/12/11 03:23, Lie Ryan wrote: If returning 'self' is the default expected behavior, it would cause inconsistencies with respect to immutable types. For example, `5 .__add__(2)`, one could expect it to return 5 instead of 7. That's not a case where default behaviour would be invoked. I'm t