Strategy/ Advice for How to Best Attack this Problem?

Saran A ahlusar.ahluwalia at gmail.com
Mon Mar 30 12:45:44 EDT 2015


On Sunday, March 29, 2015 at 10:04:45 PM UTC-4, Chris Angelico wrote:
> On Mon, Mar 30, 2015 at 12:08 PM, Paul Rubin <no.email at nospam.invalid> wrote:
> > Saran Ahluwalia <ahlusar.ahluwalia at gmail.com> writes:
> >> cross-platform...
> >> * Monitors a folder for files that are dropped throughout the day
> >
> > I don't see a cross-platform way to do that other than by waking up and
> > scanning the folder every so often (once a minute, say).  The Linux way
> > is with inotify and there's a Python module for it (search terms: python
> > inotify).  There might be comparable but non-identical interfaces for
> > other platforms.
> 
> All too often, "cross-platform" means probing for one option, then
> another, then another, and using whichever one you can. On Windows,
> there's FindFirstChangeNotification and ReadDirectoryChanges, which
> Tim Golden wrote about, and which I coded up into a teleporter for
> getting files out of a VM automatically:
> 
> http://timgolden.me.uk/python/win32_how_do_i/watch_directory_for_changes.html
> https://github.com/Rosuav/shed/blob/master/senddir.py
> 
> ChrisA

@Dave, Chris, Paul and Dennis: Thank you for resources and the notes regarding what I should keep in mind. I have an initial commit: https://github.com/ahlusar1989/IntroToPython/blob/master/Project1WG_with_assumptions_and_comments.py

I welcome your thoughts on this



More information about the Python-list mailing list