リンク
ちゃんと調べるときは
http://www.python.jp/doc/release/
Wiki内検索
最近更新したページ
最新コメント
文字コードの判定 by awesome things!
正規表現 by awesome things!
辞書 by stunning seo guys
文字列の16進変換 by check it out
文字コードの変換 by check this out
デバッガ by check this out
サブプロセス by watch for this
文字コードの判定 by watch for this
サニタイジング by check this out
タグ

ファイル

存在チェックとか属性とかは、こっち

ファイル書き込み


>>> f = open("c:\\temp\\temp.txt", "w")
>>> f.write("Write string.\n")
>>> f.close()
>>>

ファイル読み込み


>>> f = open("c:\\temp\\temp.txt", "r")
>>> while True:
...   s = f.readline()
...   if s == "": break
...   print s
...
Write string.

>>> f.close()

シーク


ファイルの先頭に戻る
f.seek(0)
2008年07月23日(水) 16:30:04 Modified by hebi_




スマートフォン版で見る