Monitoring a USB-drive / Card-reader using python?

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed Jun 1 09:48:28 EDT 2005


[Thomas W]
| I want to monitor a given USB-device, like a Memory Card-reader, and
| when a memory card is inserted I want to move the data on the 
| card to a
| different location on the filesystem ( or do something else with the
| files).
| 
| Does anybody know how to do this ( on Linux and/or windows ) 
| or if it's
| even do-able ?

It can be done on Windows using the WM_DEVICECHANGE
I'll try to hunt out some code... OK, it's a bit long,
but if you Google this group for "wm_devicechange"
you'll find some code I posted which works for USB
sticks and CD-ROMs.

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list