[PyQt] Problem with QFileSystemWatcher

Hans-Peter Jansen hpj at urpla.net
Fri Dec 10 18:10:36 GMT 2010


Dear Rui,

On Friday 10 December 2010, 11:08:50 NARCISO, Rui wrote:
> When I use absolute paths (os.path.abspath) or real paths
> (os.path.realpath) or even relative paths (../../toto) it doesn't
> work. It only works when I use only the file name.

Works fine here with absolute paths. Consequently, it triggers all four connected signals, if I touch the watched file in my home.

Guys, if you rely on some special file argument, why can't you provide a global variable or even better, a command line parameter.

> I don't think permissions are the problem because I tried the with
> the same file in the current folder and then in the parent folder and
> it works for the first and it doesn't for the latter...
>
> I'm on a Linux workstation accessing hard drives physically stored in
> a data center elsewhere. Can this be the problem ? I would think not
> because if it works for a file in the current folder it should work
> for the parent folder as well since both are in the same hard
> drive/filer ...

My home is NFS, too. If I remember correctly, Qt uses simple timer based polling for the file system watcher since being multi-platform they cannot rely on any special OS kernel/filesystem feature.

> Any insight anyone ?

Yes, you're using ancient versions of everything. This is most probably,  what does harm in your case.

Pete

SCR: http://goldmark.org/jeff/stupid-disclaimers/fun.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101210/43f38d90/attachment.html>


More information about the PyQt mailing list