1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Question about glob<-- Newbie

Discussion in 'AMD Thunderbird' started by Sean Berry, May 4, 2004.

  1. Sean Berry

    Sean Berry Guest


    >>> 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',
    '/modules.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
    Sean Berry, May 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. NewsReader
    Replies:
    1
    Views:
    261
  2. Pete

    Newbie Question

    Pete, Jul 3, 2005, in forum: Abit
    Replies:
    1
    Views:
    299
  3. Egil Solberg

    Re: Super Newbie Question, Please

    Egil Solberg, Jul 20, 2003, in forum: Asus
    Replies:
    4
    Views:
    355
    JayPeterman
    Jul 21, 2003
  4. Dave Davidson

    Newbie question

    Dave Davidson, Nov 4, 2003, in forum: Asus
    Replies:
    2
    Views:
    274
    Mike Gorman
    Nov 6, 2003
  5. Sean Berry

    Re: Question about glob<-- Newbie

    Sean Berry, May 4, 2004, in forum: AMD Thunderbird
    Replies:
    0
    Views:
    545
    Sean Berry
    May 4, 2004
Loading...

Share This Page