Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
更豐富的文字 I/O
|
367
insstr w.insstr([y, x, ]s[, attr])
將字串
s
中的字元以屬性
attr
插入(insert)到位於坐標
(x, y)
上的
w
,將文
字行剩餘的部分往右移。移動到超出行結尾外的任何字元都會遺失。如果你
省略
y
x
insstr
會使用
w
目前的游標坐標。如果你省略
attr
insstr
會使
w
目前預設的屬性。在任何情況中,插入字串完畢後,
insstr
會將
w
目前
的游標坐標設為它所插入的字串的第一個字元。
move w.move(y, x)
w
的游標移到給定的坐標
(x, y)
nodelay w.nodelay(flag)
flag
true,就將
w
設為 no-delay(無延遲)模式;若
flag
false,就
w
重設回正常模式。無延遲模式會影響
w.getch
方法。
refresh w.refresh()
更新螢幕上的視窗
w
,讓所有變更在
w
上產生作用。
curses.textpad
模組提供
Textpad
類別,它能讓你支援進階的輸入和文字
編輯。
Textpad class Textpad(window)
建立並回傳類別
Textpad
的一個實體
t
,它包裹了
curses
視窗實體
window
。實
t
有一個經常用到的方法:
t.edit()
讓使用者在
t
所包裹的視窗實體上互動式地編輯其內容。這個編輯工作階段
editing session)支援簡單的、類似 Emacs 的按鍵繫結(key bindings):
一般的字元會覆寫該視窗之前的內容,方向鍵會移動游標 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

利用 Python 进行数据分析(原书第2版)

利用 Python 进行数据分析(原书第2版)

Wes McKinney

Publisher Resources

ISBN: 9789864766819