Tim Golden wrote:
> [Ron Rogers Jr.]
>
> | I have this line of code that's written with Linux in mind:
> |
> | path_to_nethack_logfile = os.popen("locate logfile | grep
> | nethackdir").read()
> |
> | and I'm wanting a Windows equivalent, any suggggestions?
>
> Well, you could obviously use os.walk to write something
> (cross-platform) which would search the entire filesystem
> for a filename matching the pattern you're after.
>
Thank you. I'm very new to Python, only bought my first book in the
last couple of weeks, and hadn't read about os.walk yet.
> But there's no universal Windows equivalent to the Unix
> locate database. More recent Wins do offer you the system
> indexing catalog (or whatever it's called) and I'm sure
> there are existing apps to do the same sort of thing with
> more or less flair and automation, but there's nothing
> which is guaranteed to be there.
Ah... I thought that perhaps there was a built in command line tool that
does what that "search dog" does.that I didn't know about. I am not as
familiar with the Windows command prompt as I probably should be.
Thanks again.
CronoCloud (Ron Rogers Jr.)
--
http://mail.python.org/mailman/listinfo/python-list