共用方式為


ConsoleWriter 類別

檔案物件的包裝函式,以確保排清。

建構 ConsoleWriter。

繼承
builtins.object
ConsoleWriter

建構函式

ConsoleWriter(f: TextIO | None = None, show_output: bool = True)

參數

名稱 Description
f

基礎檔案資料流程

預設值: None
show_output
預設值: True

方法

flush

清除基礎檔案。

print

寫入基礎檔案。 檔案已排清。

print_run_info

列印執行識別碼和 Azure 入口網站的連結。 針對 ipython 內容,請透過 html 格式化它。

println

寫入基礎檔案。 也會寫入分行符號,並排清檔案。

如果提供的文字是 None,則只會寫入新的行字元。

write

直接寫入基礎檔案。

flush

清除基礎檔案。

flush() -> None

print

寫入基礎檔案。 檔案已排清。

print(text: str, carriage_return: bool = False) -> None

參數

名稱 Description
text
必要

要寫入的文字

carriage_return

新增歸位字元。

預設值: False

print_run_info

列印執行識別碼和 Azure 入口網站的連結。 針對 ipython 內容,請透過 html 格式化它。

print_run_info(run: Run) -> None

參數

名稱 Description
run
必要

要列印的執行。

傳回

類型 Description

println

寫入基礎檔案。 也會寫入分行符號,並排清檔案。

如果提供的文字是 None,則只會寫入新的行字元。

println(text: str | None = None) -> None

參數

名稱 Description
text

要寫入的文字

預設值: None

write

直接寫入基礎檔案。

write(text: str) -> None

參數

名稱 Description
text
必要

要寫入的文字