How do I create a dir using Python.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sumi

    #1

    How do I create a dir using Python.

    How do i create a dir using python.........

  • limodou

    #2
    Re: How do I create a dir using Python.

    8 Nov 2005 23:00:09 -0800, sumi <suma_37@yahoo. com>:[color=blue]
    > How do i create a dir using python.........
    >[/color]

    import os
    os.mkdir(path)

    --
    I like python!
    My Blog: http://www.donews.net/limodou
    NewEdit Maillist: http://groups.google.com/group/NewEdit

    Comment

    • Juho Schultz

      #3
      Re: How do I create a dir using Python.

      sumi wrote:[color=blue]
      > How do i create a dir using python.........
      >[/color]
      You could use
      os.mkdir("my_di r_name")

      Comment

      • Klaus Alexander Seistrup

        #4
        Re: How do I create a dir using Python?

        Sumi wrote:
        [color=blue]
        > How do i create a dir using python.........[/color]

        #v+

        os.makedirs = makedirs(name, mode=511)
        makedirs(path [, mode=0777])

        Super-mkdir; create a leaf directory and all intermediate ones.
        Works like mkdir, except that any intermediate path segment (not
        just the rightmost) will be created if it does not exist. This
        is recursive

        #v-

        Cheers,

        --
        Klaus Alexander Seistrup
        Copenhagen, Denmark

        Comment

        Working...