open("output/mainwindow.h",'w') doesn't create a folder for me

noagbodjivictor at gmail.com noagbodjivictor at gmail.com
Wed May 2 10:13:59 EDT 2007


On May 2, 10:06 am, Michael Hoffman <cam.ac... at mh391.invalid> wrote:
> noagbodjivic... at gmail.com wrote:
> > Hello
> > I have done python for some time now. I'm forgetting things.
>
> > This is the faulty line : outfile = open("output/mainwindow.h",'w')
>
> > I thought it would have created the folder ouput and the file
> > mainwindow.h for me but it's throwing an error
>
> No, you have to create the folder first. Try os.makedirs()
> --
> Michael Hoffman

Thanks Mike




More information about the Python-list mailing list