티스토리 뷰
Read File
#r,w,rb,wb
f=open(filename,'r')
#read all String
file=f.read()
#read line
line=f.readline()
#print 5 line
for i in range(5):
print line
#get line example
with open('somefile') as openfileobject: for line in openfileobject: do_something()
Modify File
file_data=[]
with open(file_name,'r+') as file:
del file_data[:]
for line in file:
file_data.append(line.replace("aaaa","bbbb"))
file.seek(0)
file.writelines(file_data)
'Programming > Python' 카테고리의 다른 글
python if 문 (0) | 2017.04.27 |
---|---|
python Class (0) | 2017.04.21 |
python string (0) | 2017.04.09 |
powershell tutorial ExecutePolicy (0) | 2017.03.20 |
pwntool gdb 연동 (0) | 2017.02.14 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- LKM
- gdb intel 변환
- BP
- gdb 명령어
- backdoor
- 드라이버
- 디바이스
- 변환
- 레거시 드라이버
- gdb명령어
- VMware
- DriverEntry
- vmware cannot connect to the virtual machine
- module
- GDB
- rootkit
- Intel
- gdb intel
- PNP 드라이버
- 리눅스 모듈
- vmware 오류
- breakpoint
- IRP
- 백도어
- 모듈
- 루트킷
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함