Re: [Tutor] Tkinter grid manager question

2011-11-27 Thread Peter Otten
Chris Hare wrote: > I am attempting to create a form for the user to complete. I have the > basic layout and supporting code working, but I am having a problem with > getting things to display in the grid the way I want them. > > self.label1 = Label(self.frame, text = "D

[Tutor] Take a look at this...

2011-11-27 Thread Mario Cavett
Hola. finally my aunt gave me a push in the right direction this turned my luck around now im making my way to the top I promise youll love it http://gabfair.com/profile/29DavidScott/ see you later ___ Tutor mail

Re: [Tutor] how to delete some quasi-duplicated keys

2011-11-27 Thread Andreas Perstinger
On 2011-11-26 03:49, lina wrote: for k, v in occurence.items(): print(v,k) 292 frozenset({66, 69}) 222 frozenset({24, 27}) How can I let the result like: 292 {66,69} 222 {24,27} don't output the frozenset If you want to use your own output format you have to provide

Re: [Tutor] How to raise error without the stack trace

2011-11-27 Thread Karim
Le 26/11/2011 15:20, Rich Lovely a écrit : On 26 November 2011 11:41, Steven D'Aprano wrote: Hugo Arts wrote: On Sat, Nov 26, 2011 at 11:16 AM, Karim wrote: Hello, I want to fire my own exception without having the (useful but ugly in my case) stack trace display. How to modify a Exception

Re: [Tutor] Shorten this code

2011-11-27 Thread Mic
God morning! That's right, because your SeatButton init doesn't check to see if a file exists for it, it always colors it green. You need to read the directory and see whether a file for that seat exists. If it does color it red. (Hint: look at os.path.exists() ) Alright, I think I now manage

Re: [Tutor] Shorten this code

2011-11-27 Thread Peter Otten
Mic wrote: > class SeatButton(tk.Button): > def __init__(self, master, index): > text = str(index+1) > super(SeatButton, self).__init__(master, > text=text, bg=FREE, > command=self.clicked) >

[Tutor] Writing Game in python

2011-11-27 Thread surya k
Hi, Actually, I want to develop a multiplayer Bingo game. So, I would like to develop it in python & C. As I am not familiar with game development, could you please tell me what libraries I should use for development?... etc

Re: [Tutor] Writing Game in python

2011-11-27 Thread Wayne Werner
On Sun, Nov 27, 2011 at 7:52 AM, surya k wrote: > Hi, > > > Actually, I want to develop a multiplayer Bingo game. So, I would like to > develop it in python & C. As I am not familiar with game development, could > you please tell me what libraries I should use for development?... etc > You coul

Re: [Tutor] Writing Game in python

2011-11-27 Thread surya k
Thanks for your reply. Actually, I am good at writing code in C and still learning python(Familiar with basics). Now, I am much inclined towards python than C and trying to use it more. I love it. Coming back to the game I want to develop.. I didn't put any code yet but I finished with the algo

Re: [Tutor] Writing Game in python

2011-11-27 Thread surya k
I think I have got enough tail to catch up and start my project..Thanks to all who have spared some time to help me. From: waynejwer...@gmail.com Date: Sun, 27 Nov 2011 08:05:46 -0600 Subject: Re: [Tutor] Writing Game in python To: sur...@live.com CC: tutor@python.org On Sun, Nov 27, 2011 at 7:

[Tutor] Random order program

2011-11-27 Thread myles broomes
Im trying to make a program where the user enters 5 words and then the list of words a is returned in a random order. Heres the code I have come up with so far: #random word order program #the user gives the program a list of words #the program then returns them in a random order import random

Re: [Tutor] Writing Game in python

2011-11-27 Thread Alan Gauld
On 27/11/11 13:52, surya k wrote: Actually, I want to develop a multiplayer Bingo game. When you say multiplayer do you mean many client desktops or a web game? The solutions will be very different. to develop it in python & C. Since Bingo is not a high speed game Python should be perfect

Re: [Tutor] How to raise error without the stack trace

2011-11-27 Thread Alan Gauld
On 27/11/11 12:11, Karim wrote: I just wanted to know if it is possible to control the stack trace display when raising my own exception. No, and you should not try. You can control the stacktrace display where you catch it, but not where you raise it. And that's the point, you are raising i

Re: [Tutor] How to use try and except in this case?

2011-11-27 Thread Mic
Mic wrote: class SeatButton(tk.Button): def __init__(self, master, index): text = str(index+1) super(SeatButton, self).__init__(master, text=text, bg=FREE, command=self.clicked) s

Re: [Tutor] Random order program

2011-11-27 Thread bob gailer
On 11/27/2011 11:28 AM, myles broomes wrote: Im trying to make a program where the user enters 5 words and then the list of words a is returned in a random order. Heres the code I have come up with so far: #random word order program #the user gives the program a list of words #the program then

[Tutor] How to handle conjunction operators

2011-11-27 Thread surya k
Hi, Could you please tell me why this isn't working and how can I make it possible... Consider this code..name = raw_input("Enter your first name: ") if name[0] == ("m" or "f" or "b") : rhyme = name[1:]What I want here is.. If the name starts with 'm' or 'f' or 'b', The first letter should be

Re: [Tutor] How to handle conjunction operators

2011-11-27 Thread Hugo Arts
On Sun, Nov 27, 2011 at 7:52 PM, surya k wrote: > Hi, > Could you please tell me why this isn't working and how can I make it > possible... > Consider this code.. > > name = raw_input("Enter your first name: ") > if name[0] == ("m" or "f" or "b") : >rhyme = name[1:] > > What I want here is.. I

Re: [Tutor] How to use try and except in this case?

2011-11-27 Thread Andreas Perstinger
On 2011-11-27 17:58, Mic wrote: Say that I want to try and open 10 files. If none of these exists, I want an error message to appear. But only if NONE of these files exists. I know how to handle this with one file. But I don't know how to do that with more than one. So the program should try and

[Tutor] Parsing

2011-11-27 Thread Deanna Wilson
Project 4: Parsing rhinoceros sightings In this project, I’m working for a wildlife conservation group that is tracking rhinos in the African savannah. My field workers' software resources and GIS expertise are limited, but you have managed to obtain an Excel spreadsheet

Re: [Tutor] How to handle conjunction operators

2011-11-27 Thread bob gailer
On 11/27/2011 1:52 PM, surya k wrote: Hi, Could you please tell me why this isn't working and how can I make it possible... Consider this code.. name = raw_input("Enter your first name: ") if name[0] == ("m" or "f" or "b") : rhyme = name[1:] What I want here is.. If the name

Re: [Tutor] How to handle conjunction operators

2011-11-27 Thread bob gailer
On 11/27/2011 1:52 PM, surya k wrote: Hi, Could you please tell me why this isn't working and how can I make it possible... Consider this code.. name = raw_input("Enter your first name: ") if name[0] == ("m" or "f" or "b") : rhyme = name[1:] What I want here is.. If the name

Re: [Tutor] Parsing

2011-11-27 Thread bob gailer
Welcome to the Tutor List. We are a few volunteers who enjoy tutoring folk on specific Python learning issues. We like posts that are in plain text rather than HTML. Please post plain text in future. Also your code has a blank line between every LOC, Please remove these in future posts I f

Re: [Tutor] Parsing

2011-11-27 Thread Andreas Perstinger
On 2011-11-27 21:45, Deanna Wilson wrote: Project 4: Parsing rhinoceros sightings Please confirm that this is homework. At least I've found this site: https://www.e-education.psu.edu/geog485/node/144 [snip] sample of my code: What are your problems? I've skimmed your sample and found a nu

[Tutor] Random order program

2011-11-27 Thread myles broomes
I requested help for this code earlier and I thought it had been corrected but apparently, there is still a problem with it... #random word order program #the user gives the program a list of words #the program then returns them in a random order import random #explain the purpose of the progra

Re: [Tutor] Blacklist?

2011-11-27 Thread Alexander Etter
I'm top posting because the link below is spam. Does the email address who sent the message get blacklisted or punished? Alexander On Nov 27, 2011, at 4:45, Mario Cavett wrote: > Hola. > finally my aunt gave me a push in the right direction this turned my luck > around now im making my way to

Re: [Tutor] Blacklist?

2011-11-27 Thread Steven D'Aprano
Alexander Etter wrote: I'm top posting because the link below is spam. Why on earth do you think that it is acceptable to repeat spam on the list just because you top post? If you have to reply to spam, does your backspace key not work? ESPECIALLY the spammer's URL. -- Steven

Re: [Tutor] Blacklist?

2011-11-27 Thread Alexander Etter
On Nov 27, 2011, at 17:55, Steven D'Aprano wrote: > Alexander Etter wrote: >> I'm top posting because the link below is spam. > > > Why on earth do you think that it is acceptable to repeat spam on the list > just because you top post? > > If you have to reply to spam, does your backspace key

Re: [Tutor] Random order program

2011-11-27 Thread Andreas Perstinger
On 2011-11-27 23:17, myles broomes wrote: #get the users input for the list of words, one by one first_word = input("Please enter your first word: ") second_word = input("Please enter your second word: ") third_word = input("Please enter your third word: ") fourth_word = input("Please enter your

Re: [Tutor] Random order program

2011-11-27 Thread Dave Angel
On 11/27/2011 05:17 PM, myles broomes wrote: I requested help for this code earlier and I thought it had been corrected but apparently, there is still a problem with it... To start with, tell us what version of Python, and what operating system platform you're using. I'm assuming Python 3.x a

Re: [Tutor] Parsing

2011-11-27 Thread Andreas Perstinger
[Please reply to the list. Your indentation also got lost during the mail delivery.] On 2011-11-27 23:21, Deanna Wilson wrote: Yes it is homework, but not from Penn state. It is a Geog690 class. I'm having difficulties with determining where the rhino is referenced in the split line, determinin

Re: [Tutor] How to handle conjunction operators

2011-11-27 Thread Alan Gauld
On 27/11/11 19:02, Hugo Arts wrote: if name[0] == "m" or name[0] == "f" or name[0] == "b": or, more idiomatically, you can use the in operator like this: if name[0] in ("m", "f", "b"): And you might want to force it to lower case too: if name[0].lower() in ("m", "f", "b"): OTOH you might w

[Tutor] Coin game

2011-11-27 Thread Guess?!?
Hello All, I am learning python and hence was writing code for school assignments I could find online. I wrote my solution for this problem below. Please find it attached. I would like someone to review and give me comments on it. Basically improvements/ comments to make it more efficient proble

Re: [Tutor] Parsing

2011-11-27 Thread Alan Gauld
On 27/11/11 20:45, Deanna Wilson wrote: Project 4: Parsing rhinoceros sightings OK, You've told us this is homework, and you appear to have made some start but we need some more information. Can you program in any other language other than Python? Which version of Python are you using

Re: [Tutor] Coin game

2011-11-27 Thread Dave Angel
On 11/27/2011 07:43 PM, Guess?!? wrote: Hello All, I am learning python and hence was writing code for school assignments I could find online. I wrote my solution for this problem below. Please find it attached. I would like someone to review and give me comments on it. Basically improvements/

[Tutor] Text Proccessing/Command Line Redirection/XML Parsing etc in Python.

2011-11-27 Thread Pritesh Ugrankar
First of all, my apologies for writing this very long post. I have been through some related questions about this in Stack Overflow as well as googled it and found that Perl and Python are the two languages that offer most what I need. As a SAN Administrator, I have a very limited time to learn a