Motherboard Forums

Thread Tools Display Modes

Question about glob<-- Newbie

Sean Berry
Posts: n/a
      05-04-2004, 12:46 AM

>>> r = glob.glob('/*')
>>> r

['/dev', '/usr', '/stand', '/etc', '/cdrom', '/proc', '/bin', '/boot',
'/mnt', '/modules', '/root', '/sbin', '/tmp', '/var', '/sys', '/COPYRIGHT',
'/kernel.GENERIC', '/kernel', '/compat', '/home', '/kernel.old',
>>> r = glob.glob('/usr/websites/*')
>>> r


I can do a
>>> import os
>>> dirs = os.system('ls /usr/websites')

and that works. Why doesn't glob.glob work on /usr/websites?

What I am trying to do is write a simple script that will recursively search
for and replace key words in all files. I am doing this mainly for practice
since I already can write a shell script or use an awk/sed combo. Does
anyone have anything that does a similar task? Thanks

Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question Pete Abit 1 07-03-2005 03:23 PM
Newbie question on AI7 & Motherbroad Monitor NewsReader Abit 1 08-08-2004 12:36 PM
re-newbie question: HDD drivers & support Mark Asus 1 11-24-2003 02:51 AM
Newbie question Dave Davidson Asus 2 11-06-2003 03:18 AM
Re: Super Newbie Question, Please Egil Solberg Asus 4 07-21-2003 10:30 AM

All times are GMT. The time now is 04:24 AM.

Welcome to Motherboard Point