open() and file CREATION

lance@markv.com
Fri, 11 Feb 94 10:46:29 PST

I must be going crazy or loosing my mind..

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..

I can use posix.open() but that requires me to look in <sys/fcntl.h>
for the creation mask and then that only returns an int instead of
a fileobject.

Also, why are there no flags defined in the posix module?
Flags like:

O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_SYNC, O_APPEND, O_CREAT,
O_TRUNC, O_EXCL, O_NOCTTY

??

--

Lance Ellinghouse lance@markv.com UNIX Systems Support support@markv.com Mark V Systems Limited Voice: +1 818 995 7671 FAX: +1 818 995 4267