Ernesto <[EMAIL PROTECTED]> wrote:
> NEVERMIND !  Here is the solution...
>
> # ----------------------------------------------------------------
> if (os.path.isdir("C:\\MyNewFolder") == 0):
>       os.mkdir("C:\\MyNewFolder")
> # -----------------------------------------------------------------

Maybe some other process creates C:\\MyNewFolder between the call of
isdir and mkdir, or mkdir fails for some other reasons (e.g. no
permission), so you have to catch exceptions anyway. But then there's no
need for isdir.


   Florian
-- 
Das ist ja das positive am usenet: man erfährt oft Dinge, nach denen
gar nicht gefragt wurde.
[Konrad Wilhelm in <[EMAIL PROTECTED]>]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to