home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] Python tight loop causing massive CPU barfage



Peter Espen wrote:
> 
> You're probably trying to run it directly as a script rather than via 
> python, as in:
> 
> python myscript.py
> 
> Put a:
> 
> #!/usr/bin/env python
> 
> as the very first thing in the file, and then you'll be able to run it 
> directly, as in:

Yes I was - stupid me.  I also had a problem with 'mode' being 
referenced before assignment - so I had to set mode = (some number) in 
the except:.

path.walk is very cool!

Thanks Peter, this is great stuff. :)



Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache