本文整理匯總了Python中pylcdsysinfo.LCDSysInfo.display_network_info方法的典型用法代碼示例。如果您正苦於以下問題:Python LCDSysInfo.display_network_info方法的具體用法?Python LCDSysInfo.display_network_info怎麽用?Python LCDSysInfo.display_network_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pylcdsysinfo.LCDSysInfo
的用法示例。
在下文中一共展示了LCDSysInfo.display_network_info方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: LCDSysInfo
# 需要導入模塊: from pylcdsysinfo import LCDSysInfo [as 別名]
# 或者: from pylcdsysinfo.LCDSysInfo import display_network_info [as 別名]
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from pylcdsysinfo import BackgroundColours, TextColours, TextAlignment, TextLines, LCDSysInfo
from time import sleep
d = LCDSysInfo()
d.clear_lines(TextLines.ALL, BackgroundColours.BLACK)
d.dim_when_idle(False)
d.set_brightness(255)
d.save_brightness(127, 255)
d.set_text_background_colour(BackgroundColours.BLACK)
d.display_cpu_info(8010, 32, TextColours.RED, TextColours.WHITE)
d.display_ram_gpu_info(1994, 32, TextColours.RED, TextColours.GREEN)
d.display_network_info(1, 2, TextColours.RED, TextColours.GREEN, 0, 1)
d.display_fan_info(1994, 1994, TextColours.RED, TextColours.GREEN)
for pos in range(0, 48):
d.display_icon(pos, 1 + pos % 32)
d.clear_lines(63, BackgroundColours.WHITE)
d.set_text_background_colour(BackgroundColours.BLUE)
sleep(1)
for line in range(1, 7):
d.display_text_on_line(line, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", False, TextAlignment.LEFT, TextColours.WHITE)
示例2: LCDSysInfo
# 需要導入模塊: from pylcdsysinfo import LCDSysInfo [as 別名]
# 或者: from pylcdsysinfo.LCDSysInfo import display_network_info [as 別名]
# -*- coding: UTF-8 -*-
from pylcdsysinfo import BackgroundColours, COL2LEFT, TextColours, TextAlignment, TextLines, LCDSysInfo
from time import sleep
d = LCDSysInfo()
d.clear_lines(TextLines.ALL, BackgroundColours.BLACK)
d.dim_when_idle(False)
d.set_brightness(255)
d.save_brightness(127, 255)
# System Info
d.set_text_background_colour(BackgroundColours.BLACK)
d.display_cpu_info(8010, 32, TextColours.RED, TextColours.WHITE)
d.display_ram_gpu_info(1994, 32, TextColours.RED, TextColours.GREEN)
d.display_network_info(1, 2, TextColours.RED, TextColours.GREEN, False, True)
d.display_fan_info(1994, 1994, TextColours.RED, TextColours.GREEN)
# All icons
for pos in range(0, 48):
d.display_icon(pos, 1 + pos)
sleep(1)
# Arbitrary text drawing
d.clear_lines(TextLines.ALL, BackgroundColours.WHITE)
d.set_text_background_colour(BackgroundColours.BLUE)
for line in range(1, 7):
d.display_text_on_line(line, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", False, TextAlignment.LEFT, TextColours.WHITE)
sleep(1)
# Clearing individual lines