intTypePromotion=1

Web to py enterprise web framework - p 6

Chia sẻ: Yukogaru Yukogaru | Ngày: | Loại File: PDF | Số trang:10

0
45
lượt xem
4
download

Web to py enterprise web framework - p 6

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

LAMBDA 35 1 2 file = open('myfile.txt', 'w') file.write('hello world') Similarly, you can read back from the file with: 1 2 3 file = open('myfile.txt', 'r') print file.read() hello world Alternatively, you can read in binary mode with "rb", write in binary mode with "wb", and open the file in append mode "a", using standard C notation. The read command takes an optional argument, which is the number of bytes. You can also jump to any location in a file using seek. You can read back from the file with read 1 2 3 print file.seek(6) print file.read() world and you can close the...

Chủ đề:
Lưu

Nội dung Text: Web to py enterprise web framework - p 6

ADSENSE
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2