On Wed, Sep 15, 2010 at 11:37 PM, Alan Gauld <alan.ga...@btinternet.com>wrote:
> > "Jojo Mwebaze" <jojo.mweb...@gmail.com> wrote > > > I would like to intercept and record I/O function calls to a file.. (later >> to a database) with probably the names of the files that have been >> created, >> accessed / deleted in my program. I have not done something like this >> before.. Some Guidance is highly appreciated >> > > Are you talking about I/O calls in your own app? If so thats fairly > straightforward to do. OTOH If you are talking about capturing all > I/O calls that's a lot harder.... and if it's a multi-user OS will need > administrator privileges. > I could begin with tracing I/O calls in my App.. if its sufficient enough i may not need i/o calls for the OS. > > But this is extremely dependant on the Operating System - you will > basically > have to intercept the system calls. So, which OS are you using? > And how familiar are you with its API? > I am using centos, however i don't even have admin privileges. Which API are you referring to? Al;so, While you can probably do this in Python but its likely to have > a serious impact on the OS performance, it will slow down the performamce > quite noticeably. I'd normally recommend using C for something like this. > > HTH, > > -- > Alan Gauld > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor