Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Ante Group Title

Hey, guys! I'm a bit stuck at problem set 5, problem 11 where we need to write a function that reads in a file containing information about what triggers with what names should be created. I may overcomplicate this but I'm not sure what the output should be. A dictionary of trigger names as keys, maybe, with the content stored as corresponding values? Any ideas?

  • one year ago
  • one year ago

  • This Question is Closed
  1. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    this one? Problem 11. Finish implementing readTriggerConfig(filename). We’ve written code to open the file and throw away all the lines that don’t begin with instructions (e.g. comments, blank spaces). Your job is to finish the implementation. readTriggerConfig should return the list of triggers specified in the configuration file. "return the list of triggers specified in the configuration file"

    • one year ago
  2. Ante Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Yeah, but I mean what does that mean? What is a trigger? I can create a list of lists where each element is a trigger's representation (name, type, arguments) but I hardly think that solves the problem. An idea is that the function should "create" (with assignment) triggers that have the specified names and can be used outside the functions scope. But that seems just way too complicated. So what am I missing? :)

    • one year ago
  3. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    well the docstring for the function that they partially wrote for us says that it returns a list of trigger objects. if you look at the initial main_thread() function they wrote for us, you can see that it is supposed to be a list

    • one year ago
  4. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    http://dpaste.com/906384/

    • one year ago
  5. Ante Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Okay, yes, I overcomplicated it, creating and enlisting Trigger objects does not require any magical name assignments. Thanks for the help :) The code works now, although, it's pretty annoying that I don't know how to stop the thread (the one that gathers RSS feeds) once it has started... Other than by quitting IDLE.

    • one year ago
  6. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    ctrl-c seems to work but the docs say it may not - http://dpaste.com/909558/ for the newsreader; I tried ctrl-c to get the shell prompt back then thread.exit() - that does not work

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.