빅

[python] os.path.getsize()

· 2012-05-15 (화) 16:56:35 · 1836
#!/usr/bin/python

import os

data = "I am a boy. That looks like tired."

f = open('test.txt','wb')
f.write(data)
f.close()spacer.gif
file_size = os.path.getsize('test.txt')

print file_size
byoungguk@byoungguk-desktop:~/pythonc$ ./getsizetest.py 
34
|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
Linux 12-05-15 조회 1,951
jQuery 12-05-15 조회 3,503
Linux 12-05-14 조회 1,681
Linux 12-05-14 조회 1,796
Linux 12-05-14 조회 1,935
Linux 12-05-14 조회 2,405
Linux 12-05-14 조회 2,141
jQuery 12-05-14 조회 2,470
기타 12-05-13 조회 2,974
jQuery 12-05-12 조회 3,630
PHP 12-05-11 조회 2,075
jQuery 12-05-11 조회 8,629
Linux 12-05-11 조회 2,919
Linux 12-05-11 조회 1,775
Linux 12-05-11 조회 2,346
Linux 12-05-11 조회 2,244
Linux 12-05-11 조회 2,525
Linux 12-05-11 조회 1,697
JavaScript 12-05-10 조회 3,170
Linux 12-05-10 조회 3,464
Linux 12-05-10 조회 1,891
Linux 12-05-10 조회 1,979
Linux 12-05-10 조회 2,370
Linux 12-05-10 조회 4,753
Linux 12-05-10 조회 1,950
Linux 12-05-10 조회 2,133
Linux
[Linux]
12-05-10 조회 2,024
Linux 12-05-10 조회 1,862
Linux 12-05-10 조회 2,356
Linux 12-05-10 조회 3,115