Re: file descriptors & fdopen

From: Scott Frankel (leknarf_at_pacbell.net)
Date: 12/06/04


Date: Mon, 6 Dec 2004 12:37:56 -0800
To: python-list@python.org


foo = open('foo.txt', 'w')

duh.

Thanks -
Scott

On Dec 6, 2004, at 11:27 AM, Scott Frankel wrote:

>
> Why does os.fdopen('foo.txt', 'w') require an integer?
> Ultimately, I want to create a new file on disk.
>
> Funny, I can't seem to suss-out how to create a new file without
> resorting
> to os.system('touch foo.txt'). ... Or maybe not so funny ...
>
> >>> foo = os.fdopen('foo.txt', 'w')
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: an integer is required
>
>
> Thanks in advance!
> Scott
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



Relevant Pages

  • file descriptors & fdopen
    ... I want to create a new file on disk. ... Funny, I can't seem to suss-out how to create a new file without ... TypeError: an integer is required ...
    (comp.lang.python)
  • Re: file descriptors & fdopen
    ... Scott Frankel wrote: ... I want to create a new file on disk. ... > Funny, I can't seem to suss-out how to create a new file without ...
    (comp.lang.python)
  • Re: Charlie Weis is an ass ... Coaches Poll Votes Tell All We Need
    ... >> Well DUH. ... >> funny to the rest of us when tOSU kicks ND and ... So they have no pride and couldn't care less ...
    (rec.sport.football.college)
  • Re: Access to Drive D denied
    ... This turned out to be a 'duh' experience. ... When I went to Roxio I saw I needed to format the disk. ...
    (microsoft.public.windowsxp.accessibility)
  • Re: Im going to get told off soon.
    ... begins a new thread entitled "Anybody remember the fuel crisis?" ... from back when I was funny. ... Well duh. ... wessie at tesco dot net ...
    (uk.rec.motorcycles)