[Tutor] useful function or reinventing the wheel??

Mark Lybrand mlybrand at gmail.com
Tue Nov 29 06:19:39 CET 2011


>
>
>>  I couldn't follow your code, but finally concluded that it's trying to
> create a directory, creating the directories parents also if they don't
> exist either.  It would be much simpler if written recursively, but there's
> no need.
>
> Check out os.makedirs(), and see if it meets your needs.   (that's
> makedirs() function, in the os module)
>
>
Okay, so I guess commenting is in order :)  "It was hard for me to write
it, so it should be hard for you to read it." comes to mind.

And I will probably try to write it recursively based on your suggestion,
even though long term, I will just make use of os.makedirs, since that was
what I was re-inventing.

thanks

>
>
> --
>
> DaveA
>
>


-- 
Mark :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111128/beffde23/attachment.html>


More information about the Tutor mailing list