Re: glob.glob standardization

2007-06-28 Thread Tim Roberts
billiejoex <[EMAIL PROTECTED]> wrote: >... >glob.glob, instead, return file names only if given path is relative: > os.chdir('Desktop') os.getcwd() >'/home/user/Desktop glob.glob("*") >['file.py'] > >...and absolute file names if given path is absolute: > glob.glob('/home/user/D

Re: glob.glob standardization

2007-06-27 Thread Martin v. Löwis
> Don't you think it would be more convenient for glob.glob to return > file names only in any case, like os.listdir do? No. Use glob.glob1 if you want a list of files. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: glob.glob standardization

2007-06-27 Thread Lawrence Oluyede
billiejoex <[EMAIL PROTECTED]> wrote: > Don't you think it would be more convenient for glob.glob to return > file names only in any case, like os.listdir do? AFAIK it's a wanted behavior. The doc says: """ Notice how any leading components of the path are preserved. """ -- Lawrence, oluyede.o