Re: open() and file CREATION
Fri, 11 Feb 94 15:05:42 PST
> From: Guido.van.Rossum@cwi.nl
> Date: Fri, 11 Feb 1994 23:23:30 +0100
> > How do I CREATE a file from Python? I normally just OPEN an already
> > existing file.. Now I need to CREATE one.. open() will not do it..
> > I looked in the INFO file for builtin functions and could not find one..
> Python's open() passes its two arguments straight to stdio's fopen().
> If you C library supports (as it should) fopen(filename, "w") to
> create a file, Python's open(filename, 'w') should do so too. If it
> doesn't, you have a bug (but the test set tests this case so I
> suspect you simply haven't tried hard enough or there is a permission
> problem in the directory).
I found the problem.. As long as I open it with 'w' and not 'wr' permissions
everything works fine.. I am sorry to have wasted the bandwidth on this..
Lance Ellinghouse email@example.com
UNIX Systems Support firstname.lastname@example.org
Mark V Systems Limited Voice: +1 818 995 7671
FAX: +1 818 995 4267