469,352 Members | 1,671 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

file descriptors & fdopen


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

Jul 18 '05 #1
0 1323

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by noleander | last post: by
AdrianH
1 post views Thread by AdrianH | last post: by
8 posts views Thread by M.Endraszka | last post: by
185 posts views Thread by jacob navia | last post: by
40 posts views Thread by Phlip | last post: by
2 posts views Thread by DJ Dharme | last post: by
15 posts views Thread by =?ISO-8859-15?Q?L=E9na=EFc?= Huard | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.