Search Results

Search found 2 results on 1 pages for 'ptabatt'.

Page 1/1 | 1 

  • Joining links together in a dictionary

    - by ptabatt
    Hi guys, I'm student here, new to python and programming in general. I have a dictionary links which holds a tuple mapped to a number. How can I join the second url in the second tuple together with the urljoin() function? What I'm trying to do is get complete links so I can run a recursive function search() which takes a complete url as an arguement, finds all the links in each url and stores the number of links mapped to the links in a database. So far, I have: links {('href', 'http://reed.cs.depaul.edu/lperkovic/csc242/test2.html'): 1, ('href', 'test3.html'): 1} I want http://reed.cs.depaul.edu/lperkovic/csc242/test3.html...

    Read the article

  • Object-oriented GUI development in python

    - by ptabatt
    Hey guys, new programmer here. I have an assignment for class and I'm stuck... What I need to do is a create a GUI that gives someone a basic arithmetic problem in one box, asks the person to answer it, evaluates it, and tells you if you're right or wrong... Basically, what I have is this: [code] class Lesson(Frame): def init (self, parent=None): Frame.init(self, parent) self.pack() Lesson.make_widgets(self) def make_widgets(self): Label(self, text="").pack(side=TOP) ent = Entry(self) self.a = randrange(1,10) self.b = randrange(1,10) self.expr = choice(["+","-"]) ent.insert(END, str(self.a) + str(self.expr) + str(self.a)) [/code] I've broken this down into many little steps and basically, what I'm trying to do right now is insert a default random expression into the first entry widget. When I run this code, I just get a blank Label. Why is that? How can I put a something like "7+7" into the box? If you absolutely need background to the problem, it's question #3 on this link. http://reed.cs.depaul.edu/lperkovic/csc242/homeworks/Homework8.html -Thanks for all help in advance.

    Read the article

1