Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
So, in the following line self.can.bind("",lambda x:self.handler(x,'release')) the event-handler will call handler(event, 'release') when the mousebutton is released, but the 'self' reference is automatically passed over, so the result will be the handler(self,event, 'release') call. Correct m

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
So, in the following line self.can.bind("",lambda x:self.handler(x,'release')) the event-handler will call handler(event, 'release') when the mousebutton is released, but the 'self' reference is automatically passed over, so the result will be the handler(self,event, 'release') call. Correct m

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
So, in the following line self.can.bind("",lambda x:self.handler(x,'release')) the event-handler will call handler(event, 'release') when the mousebutton is released, but the 'self' reference is automatically passed over, so the result will be the handler(self,event, 'release') call. Correct m

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
The link is broken. Mike Hansen wrote: > > > > >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf Of Zsiros Levente >>Sent: Thursday, August 24, 2006 2:21 PM >>To: Danny Yoo >>Cc: python tutor >>Subject: Re: [Tutor] tkinter events: >> >>If we're talk

[Tutor] Sending an attatchment with SMTP lib

2006-08-25 Thread nimrodx
Hi All, How do I go about sending an attachment with SMTP lib? Thanks, Matt ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Query to the tutor mailing list

2006-08-25 Thread Kent Johnson
Alan Gauld wrote: > However one badly missed Python resource that used to help > a lot was the Useless Python web site. Alas it seems to have > dissappeared fromthe web. It's back! http://www.uselesspython.com/ Kent ___ Tutor maillist - Tutor@py

Re: [Tutor] omnicomplete vim python

2006-08-25 Thread Alan Gauld
"anil maran" <[EMAIL PROTECTED]> wrote > do u guys know how to enable omnicomplete using vim > for python thanks Nope. But what is omnicomplete and why would I want it? Alan G, A Python and vim user for 5 years but not (yet) an omnicompleteist ___ Tu

Re: [Tutor] Query to the tutor mailing list

2006-08-25 Thread Alan Gauld
> i put a significant number of exercises in "Core Python," some which > ... > there are about 260 exercises in the 1st ed., and the upcoming 2nd > ed. > will have well over 300. i believe this is more than any other > Python > book out there. Certainly more than mine Wes! I got a lot of flack

Re: [Tutor] How do I make Python read a string character bycharacter?

2006-08-25 Thread Alan Gauld
"Akash" <[EMAIL PROTECTED]> wrote >> How do I make Python read a string character by character? > str = 'string' for i in range(0, len(str)): > ... print str[i] > ... Or without indexing: for c in "string": print c > s > t > r > i > n > g However I'm not sure if thats what Na

Re: [Tutor] A list of ints to a strings

2006-08-25 Thread Amadeo Bellotti
HTH wat i ment is like i have x = [1, 2, 3, 4, 5] y = [2, 3, 4, 5, 1] and i want x and y as a string and i want to write it to a file so its like 1 2 3 4 5 2 3 4 5 1 sorry about that misunderstandingOn 8/25/06, John Fouhy <[EMAIL PROTECTED]> wrote: On 26/08/06, Amadeo Bellotti <[EMAIL PROTECT

Re: [Tutor] Tkinter Icon Suse 10

2006-08-25 Thread Michael Lange
On Fri, 25 Aug 2006 15:14:49 -0400 "Alberto Troiano" <[EMAIL PROTECTED]> wrote: > Hi everyone > > It's been a long time since I left Python for .NET 2003, but then again I > need it to make an app under Linux Suse 10 and I have a question > I'm trying to put an icon to my window... > Here is the

Re: [Tutor] A list of ints to a strings

2006-08-25 Thread John Fouhy
On 26/08/06, Amadeo Bellotti <[EMAIL PROTECTED]> wrote: > I need to convert a list of intgers to a string so for example > > I have this > x = [1, 2, 3, 4, 5, 6] > > I want this > > x = "1 2 3 4 5 6" Actually, I disagree with David's solution somewhat --- I think that the pythonic way to do th

Re: [Tutor] A list of ints to a strings

2006-08-25 Thread Amadeo Bellotti
thank you and like wat if i wanna write one string on one line and another string on another line ect.On 8/25/06, David Heiser < [EMAIL PROTECTED]> wrote: This will work   x = [1, 2, 3, 4, 5, 6]   x = str(x)[1:-1].replace(",", '')   open("filename.txt", "w").write(x)   -Original

Re: [Tutor] Python programming activities

2006-08-25 Thread Bob Gailer
Bob Gailer wrote: I amend the previous e-mail: ) this is in response to [EMAIL PROTECTED] desire for some programming assignments to work while commuting. ) "I exclude these from the following rules" refers just to rules 1 and 4. ) rule 3 - the path is vertical or horizontal, not diagonal. ) rul

[Tutor] A list of ints to a strings

2006-08-25 Thread Amadeo Bellotti
I need to convert a list of intgers to a string so for example I have this x = [1, 2, 3, 4, 5, 6] I want this x = "1 2 3 4 5 6" I need this to write it to a .txt file does anyone know how to do this? ___ Tutor maillist - Tutor@python.org http://mail

Re: [Tutor] What's the invalid syntax?

2006-08-25 Thread Alan Gauld
Nathan, > Sorry, but it only showed a text-box with the message "Invalid > syntax!", then highlighted the %. OK, But if you try it from a command prompt you will get a proper error message. But even if you tell us which line it is highlighting, there are several % signs in your code. Generally

[Tutor] Tkinter Icon Suse 10

2006-08-25 Thread Alberto Troiano
Hi everyoneIt's been a long time since I left Python for .NET 2003, but then again I need it to make an app under Linux Suse 10 and I have a questionI'm trying to put an icon to my window...Here is the code so far: ###Start Code###import Tkinterfrom Tkinter import *root = Tk()root.iconbitmap("Chang

[Tutor] Python programming activities

2006-08-25 Thread Bob Gailer
Are you familiar with Kakuro (Cross Sums)? See http://www.kakuropuzzle.com/ for an example. In every such puzzle the top row and left column are all "black". I exclude these from the following "rules": A valid puzzle meets the following rules: 1 - black squares are symmetric around center. (th

[Tutor] function arg

2006-08-25 Thread josip
I have here few function from game tic-tac-toe from book python for absoulute beginners   def first(): """ Determine who goes first. Computer or Player. """ gofirst = raw_input("Do You want to go first? (y/n): ")  if gofirst == 'y':  print "You start first"  player = X  computer = O else:  print

[Tutor] omnicomplete vim python

2006-08-25 Thread anil maran
do u guys know how to enable omnicomplete using vim for python thanks __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Tutor maillist - Tutor@p