Question: I'm writing two Python scripts that both parse files. One is a standard unix logfile and the other is a binary file. I'm trying to figure out the best way to monitor these so I can read data as soon as they're updated. Most of the solutions I've found thus far are linux specific, but I need this to work in FreeBSD. 

Obviously one approach would be to just run my script every X amount of time, but this seems gross and inefficient. If I want my Python app running continuously in the background monitoring a file and acting on it once it's changed/updated, what's my best bet?

Answer: 
Be explicit - then the compiler won't warn that you perhaps made a mistake.

```
while ( (list = list->next) != NULL )

```

or

```
while ( (list = list->next) )

```

Some day you'll be glad the compiler told you, people *do* make that mistake ;)
It's just a 'safety' warning. It is a relatively common idiom, but also a relatively common error when you meant to have `==` in there. You can make the warning go away by adding another set of parentheses:

```
while ((list = list->next))

```