Nallo's Profile User Rating: -----

Reputation: 163 Stalwart
Group:
Contributors
Active Posts:
259 (0.13 per day)
Joined:
19-July 09
Profile Views:
9,092
Last Active:
User is offline Feb 02 2015 02:13 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
50
Icon   Nallo has not set their status

Posts I've Made

  1. In Topic: tkinter drawing rectangles

    Posted 2 Feb 2015

    create_rectangle takes four arguments plus some optional arguments. Those four arguments denote the position of the upper left and lower right corner: create_rectangle(x1, y1, x2, y2).
    What you did with the comented out self.canvas.create_rectangle(self.lst[i], 10, self.lst[i], 10) is create a rectangle for which the upper left and lower right corner are the same (no wonder you see no rectangle).

    An example:
    from Tkinter import *
    
    master = Tk()
    
    w = Canvas(master, width=200, height=100)
    w.pack()
    
    x, y = 10, 10
    width = 25
    width2 = 50
    height = 5
    dist = 10
    w.create_rectangle(x, y, x + width, y + height, outline='blue', fill="red")
    w.create_rectangle(x, y + height + dist, x + 50, y + height + dist + height) 
    
    mainloop()
    
    
  2. In Topic: Learning Python

    Posted 4 Jun 2014

    when you are writing
    x = Set([1, 3, 5, 7])
    print(x.union(Set([1, 4, 7])))
    
    

    other is Set([1, 4, 7]), so in the union fuction call in line
    for x in other:
    ...
    
    

    python tries to get an iterator over other ...
    ...python: thinking
    ...python: no __iter__ method defined
    ...python: oops, use some fallback
    ...not sure here, but python "does something" with __getitem__

    in other words:
    python needs an iterator to execute
    for x in other:
    
    

    but has some fallback if __iter__ is not provided for the other instance (again I am not sure about that fallback)
  3. In Topic: Help keeping track of attendees

    Posted 28 May 2014

    Edit: removed as was wrong
  4. In Topic: Help keeping track of attendees

    Posted 28 May 2014

    Why dont you just take the display() function from your first post ... you need to write the printdata function though.
  5. In Topic: Help keeping track of attendees

    Posted 28 May 2014

    what woooee said is not correct.

    Try to run woooee's code with this test data:
    test_data = [["John Doe", "ABC Company", "California", "JDoe@ABC.com"],
                 ["John Doe", "CDE Company", "Texas", "JD@CDE.com"]]
    
    


    Two different persons (with the same name). woooee's program will only remember the second when building info_dict. Forgetting John Doe from California :-(

    Your original program does handle that fine. woooee didn't read your program carefully! You buid a new dictionary there for every person, so his argument in his first post is not corect anyway.

    (Edit: actually he made the error he accused you of ^^)

My Information

Member Title:
D.I.C Regular
Age:
102 years old
Birthday:
January 1, 1913
Gender:
Programming Languages:
who cares

Contact Information

E-mail:
Private
Website URL:
Website URL  http://