On Mon, 05 May 2008 16:28:33 +0200, Paul Scott <pscott@uwc.ac. zawrote:
How about not nesting the calls?
True
Jean-Paul
>
>On Mon, 2008-05-05 at 16:21 +0200, Paul Scott wrote:
>
>Sorry, pasted the wrong example...
>
>Better example:
>
pics = glob.glob(os.pa th.join(os.path .join(basedir,p icdir),'*'))
>
>
>On Mon, 2008-05-05 at 16:21 +0200, Paul Scott wrote:
>example:
>>
>if os.path.exists( os.path.join(ba sedir,picdir)) == True :
> blah blah
>>
>>
>if os.path.exists( os.path.join(ba sedir,picdir)) == True :
> blah blah
>>
>Sorry, pasted the wrong example...
>
>Better example:
>
pics = glob.glob(os.pa th.join(os.path .join(basedir,p icdir),'*'))
>
>
>Question is, is there a better way of doing this? The above *works* but
>it looks kinda hackish...
>it looks kinda hackish...
>>from os.path import join
>>join(join('x' , 'y'), 'z') == join('x', 'y', 'z')
>>join(join('x' , 'y'), 'z') == join('x', 'y', 'z')
>>>