Comments (4)
Putting that all together I came up with this diff file
--- sys_info.py 2015-12-28 17:39:50.348930030 +0000
+++ sys_info.py~ 2015-12-28 17:22:28.391519969 +0000
@@ -36,13 +36,13 @@
def cpu_usage():
# load average, uptime
- uptime = datetime.now() - datetime.fromtimestamp(psutil.boot_time())
+ uptime = datetime.now() - datetime.fromtimestamp(psutil.BOOT_TIME)
av1, av2, av3 = os.getloadavg()
return "Load:%.1f %.1f %.1f Up: %s" \
% (av1, av2, av3, str(uptime).split('.')[0])
def mem_usage():
- usage = psutil.virtual_memory()
+ usage = psutil.phymem_usage()
return "Mem: %s %.0f%%" \
% (bytes2human(usage.used), 100 - usage.percent)
@@ -53,7 +53,7 @@
% (bytes2human(usage.used), usage.percent)
def network(iface):
- stat = psutil.net_io_counters(pernic=True)[iface]
+ stat = psutil.network_io_counters(pernic=True)[iface]
return "%s:Tx%s,Rx%s" % \
(iface, bytes2human(stat.bytes_sent), bytes2human(stat.bytes_recv))
@@ -66,7 +66,7 @@
lcd.locate(0,2)
lcd.text(disk_usage('/'))
lcd.locate(0,3)
- lcd.text(network('eth0'))
+ lcd.text(network('wlan0'))
lcd.locate(0,4)
def main():
from luma.lcd.
Oh nice one, I'll merge it in. This repo hasn't seen much action lately, so I guess the libs have moved on a bit
from luma.lcd.
Beware: that diff file is upside down, because I'm an idiot (unlikely) or the diff util isn't intuitive (more likely).
from luma.lcd.
Thank you. I'll give that a go in the morning.
from luma.lcd.
Related Issues (20)
- ST7735 inverted colors HOT 18
- HD44780 with I2C backpack HOT 6
- Stray pixels when using diff_to_previous with ILI9341 HOT 20
- test_ili9341 hangs HOT 3
- Error trying PWMBacklight with ili9341 HOT 23
- Help with speed difference between SBCs HOT 15
- ili9341 and PWM support? HOT 1
- Thoughts on Bridgetek EVE (Embedded Video Engine) HOT 11
- Support for ili9486 HOT 9
- Trying to get this to work with Spotpear LCD HOT 20
- ST7789 - maximum height and width? HOT 9
- Multiple TFT Screens (ST7735) HOT 2
- Standard 'gpio_LIGHT' pin causes crash of I2S HOT 1
- Support ILI9488 3.5" (320x480) displays HOT 4
- The function device.backlight(False) turns on the lights, instead of device.backlight(True) HOT 7
- DeprecationWarning: getsize is deprecated and will be removed in Pillow 10 (2023-07-01)
- RuntimeError: This module can only be run on a Raspberry Pi! HOT 2
- Comment error: HT1621 may actually 1/3 bias HOT 2
- ILI9341 issue?
- st7735 white screen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luma.lcd.