I'm writing a program in Python that stores information for every file on the system. When it's installed, it will walk over every file, but afterwards I want to update it whenever a new file is created, or when a file is moved. For example, In the Dropbox service, whenever I copy a file into my Dropbox dir, it immediately notices and uploads it to their server.
Is there a way to do this in Python without polling? I'm thinking about some sort of an event listener that is triggered when a file is created.