From bb31f2821d14db6e9e14942b02973566c25c9f00 Mon Sep 17 00:00:00 2001 From: jordonbc Date: Thu, 14 Jul 2016 14:33:10 +0100 Subject: [PATCH] 1.5.0a --- .idea/workspace.xml | 176 ++++++++---------- .../__pycache__/desktop.cpython-35.pyc | Bin 14655 -> 14869 bytes .../__pycache__/login.cpython-35.pyc | Bin 6722 -> 6620 bytes JDE/Interfaces/desktop.py | 2 + JDE/Logs/09-07-2016-17-26PM.log | 37 ---- JDE/Logs/09-07-2016-17-29PM.log | 18 -- {Programs => inDevelopment}/PyIDE.py | 0 inDevelopment/pyMonitor.py | 112 +++++++++++ setup.py | 6 +- 9 files changed, 195 insertions(+), 156 deletions(-) delete mode 100644 JDE/Logs/09-07-2016-17-26PM.log delete mode 100644 JDE/Logs/09-07-2016-17-29PM.log rename {Programs => inDevelopment}/PyIDE.py (100%) create mode 100644 inDevelopment/pyMonitor.py diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e55ab07..3cbd039 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -20,52 +20,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -127,8 +83,6 @@ - - @@ -147,6 +101,20 @@ + + + + + + + + + + @@ -206,7 +176,12 @@ - + + + + + + + + - + + - - - - - + + + + + + @@ -444,23 +438,23 @@ - + - + + - + + - - @@ -489,7 +483,6 @@ - @@ -502,7 +495,7 @@ - + @@ -559,17 +552,6 @@ - - - - - - - - - - - @@ -612,16 +594,6 @@ - - - - - - - - - - @@ -629,13 +601,29 @@ + + + + + + + + + + + + + + + + + + - - - - - + + + @@ -647,13 +635,5 @@ - - - - - - - - \ No newline at end of file diff --git a/JDE/Interfaces/__pycache__/desktop.cpython-35.pyc b/JDE/Interfaces/__pycache__/desktop.cpython-35.pyc index dd259546b009ef8cf10325f403559c07e8fcfb82..dcaa8fadb55008e0b4178823bf407a29d1882a15 100644 GIT binary patch delta 2994 zcmZ`*eQX?85r6MK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!tAvU~O Ow8bND1tamzd-@Nif{L5~ delta 791 zcmaiyOKTHR6vxk*<~hk^(!66*ANYXy=thZ9MG#lkQZYh`qJ(5_nkKE8cr$TqX$cZP zffvDzx^yjBs9QgPdoTS6?p(R^o|~q)b8&y1^FPm-dk?REzh>qv%XBWh+Gv$NoA1oL zj0~E?q3?1ggF}yZ2fPXZa{A5uYM`8QtAzz=bX*x2G@Wf3+;pAMkguy8zAAntmhrwQ z*+0u`N~i?+S<){P;)L6T+BBJbt$K;KsWZ4HzNBtoefm4~9&JN~L+ad7XSjsoV`h2m zg@75r7GMH+fZ&Cp7XcOk7KD9(-U9TZu#Yea03P|K4#Z%BfL{D4i-ojd0Sjv*p~8kL zXxQK-wPI5NDT~@&gkB0*WUQSuO`rGAC`Tt|bxduLn=5&(*w8DGGA}3sivlxYVgRz3 zE8D&0$3CSc|G9m=z;j(i&@<_Y z@FBq?+$5|J=)v(9gf`(R;gLcmIvf1oW};d+g&#z{&^os|FXoSrd+Dz9C9@$f#bKd} O8IdmD!(GuR9{dH>L!_Dj diff --git a/JDE/Interfaces/desktop.py b/JDE/Interfaces/desktop.py index 62b742f..6da7a8f 100644 --- a/JDE/Interfaces/desktop.py +++ b/JDE/Interfaces/desktop.py @@ -176,6 +176,8 @@ class desktop: def webEditor(): webEdit.webEdit(self.window) + # def runPymonitor(): + # pyMonitor.pyMonitor(self.window) self.contextMenu.add_command(label="Refresh", command=self.desktopRefresh) diff --git a/JDE/Logs/09-07-2016-17-26PM.log b/JDE/Logs/09-07-2016-17-26PM.log deleted file mode 100644 index c23c85c..0000000 --- a/JDE/Logs/09-07-2016-17-26PM.log +++ /dev/null @@ -1,37 +0,0 @@ -05:26:00 PM:JDE.JDE:16}:INFO - Python version: 3.5.2 -05:26:00 PM:JDE.JDE:18}:INFO - Importing tkinter -05:26:00 PM:JDE.JDE:22}:INFO - Import Successful -05:26:00 PM:JDE.JDE:26}:INFO - Importing os -05:26:00 PM:JDE.JDE:30}:INFO - Import Successful -05:26:00 PM:JDE.JDE:34}:INFO - Importing JDE/Interfaces/login -05:26:01 PM:JDE.Interfaces.login:9}:DEBUG - Atempting to read settings file -05:26:01 PM:JDE.Interfaces.login:13}:DEBUG - System settings Detected! -05:26:01 PM:JDE.JDE:38}:INFO - Import Successful! -05:26:01 PM:JDE.JDE:42}:INFO - Importing JDE/Interfaces/desktop -05:26:01 PM:Programs.jpad:7}:DEBUG - Atempting to read settings file -05:26:01 PM:Programs.jpad:11}:DEBUG - System settings Detected! -05:26:01 PM:JDE.Interfaces.desktop:21}:DEBUG - Atempting to read settings file -05:26:01 PM:JDE.Interfaces.desktop:25}:DEBUG - System settings Detected! -05:26:01 PM:JDE.JDE:46}:INFO - Import Successful! -05:26:01 PM:JDE.Interfaces.login:160}:DEBUG - Running __init__ -05:26:01 PM:JDE.Interfaces.login:139}:DEBUG - Running createWindow -05:26:01 PM:JDE.Interfaces.login:118}:DEBUG - Running createBackground -05:26:01 PM:PIL.PngImagePlugin:135}:DEBUG - STREAM b'IHDR' 16 13 -05:26:01 PM:PIL.PngImagePlugin:135}:DEBUG - STREAM b'bKGD' 41 6 -05:26:01 PM:PIL.PngImagePlugin:511}:DEBUG - b'bKGD' 41 6 (unknown) -05:26:01 PM:PIL.PngImagePlugin:135}:DEBUG - STREAM b'pHYs' 59 9 -05:26:01 PM:PIL.PngImagePlugin:135}:DEBUG - STREAM b'tIME' 80 7 -05:26:01 PM:PIL.PngImagePlugin:511}:DEBUG - b'tIME' 80 7 (unknown) -05:26:01 PM:PIL.PngImagePlugin:135}:DEBUG - STREAM b'iTXt' 99 29 -05:26:01 PM:PIL.PngImagePlugin:135}:DEBUG - STREAM b'IDAT' 140 8192 -05:26:02 PM:JDE.Interfaces.login:111}:DEBUG - Running createIcon -05:26:02 PM:JDE.Interfaces.login:71}:DEBUG - Running createWidgets -05:26:02 PM:JDE.Interfaces.login:21}:DEBUG - Running reposition -05:26:03 PM:JDE.Interfaces.login:130}:DEBUG - Running fullscreen -05:26:03 PM:JDE.Interfaces.login:21}:DEBUG - Running reposition -05:26:14 PM:JDE.Interfaces.login:21}:DEBUG - Running reposition -05:26:20 PM:JDE.Interfaces.login:130}:DEBUG - Running fullscreen -05:26:20 PM:JDE.Interfaces.login:21}:DEBUG - Running reposition -05:26:20 PM:JDE.Interfaces.login:130}:DEBUG - Running fullscreen -05:26:20 PM:JDE.Interfaces.login:21}:DEBUG - Running reposition -05:26:21 PM:JDE.JDE:60}:CRITICAL - [Errno 2] No such file or directory: 'active' diff --git a/JDE/Logs/09-07-2016-17-29PM.log b/JDE/Logs/09-07-2016-17-29PM.log deleted file mode 100644 index e43a6de..0000000 --- a/JDE/Logs/09-07-2016-17-29PM.log +++ /dev/null @@ -1,18 +0,0 @@ -05:29:30 PM:JDE.JDE:16}:INFO - Python version: 3.5.2 -05:29:30 PM:JDE.JDE:18}:INFO - Importing tkinter -05:29:30 PM:JDE.JDE:22}:INFO - Import Successful -05:29:30 PM:JDE.JDE:26}:INFO - Importing os -05:29:30 PM:JDE.JDE:30}:INFO - Import Successful -05:29:30 PM:JDE.JDE:34}:INFO - Importing JDE/Interfaces/login -05:29:30 PM:JDE.Interfaces.login:9}:DEBUG - Atempting to read settings file -05:29:30 PM:JDE.Interfaces.login:13}:DEBUG - System settings Detected! -05:29:30 PM:JDE.JDE:38}:INFO - Import Successful! -05:29:30 PM:JDE.JDE:42}:INFO - Importing JDE/Interfaces/desktop -05:29:30 PM:Programs.jpad:7}:DEBUG - Atempting to read settings file -05:29:30 PM:Programs.jpad:11}:DEBUG - System settings Detected! -05:29:30 PM:JDE.Interfaces.desktop:21}:DEBUG - Atempting to read settings file -05:29:30 PM:JDE.Interfaces.desktop:25}:DEBUG - System settings Detected! -05:29:30 PM:JDE.JDE:46}:INFO - Import Successful! -05:29:30 PM:JDE.Interfaces.login:161}:DEBUG - Running __init__ -05:29:30 PM:JDE.Interfaces.login:139}:DEBUG - Running createWindow -05:29:30 PM:JDE.JDE:60}:CRITICAL - couldn't open "your-icon": no such file or directory diff --git a/Programs/PyIDE.py b/inDevelopment/PyIDE.py similarity index 100% rename from Programs/PyIDE.py rename to inDevelopment/PyIDE.py diff --git a/inDevelopment/pyMonitor.py b/inDevelopment/pyMonitor.py new file mode 100644 index 0000000..ebf8981 --- /dev/null +++ b/inDevelopment/pyMonitor.py @@ -0,0 +1,112 @@ +from tkinter import * +import threading +import cpuinfo.cpuinfo as cpuinfo +import psutil + + +class pyMonitor: + def storageRender(self): + def storage(): + try: + storageFreeLabel.configure(text="Disk(0) Free: " + str(psutil.disk_usage("/").free) + " Bytes") + storageUsedLabel.configure(text="Disk(0) Used: " + str(psutil.disk_usage("/").used) + " Bytes") + storagePercentLabel.configure(text="Disk(0) Total: " + str(psutil.disk_usage("/").percent) + "%") + threading.Timer(1, storage) + except: + pass + storageUsageLabel = Label(self.storageFrame, + text="Disk(0) Total: " + str(psutil.disk_usage("/").total) + " Bytes") + storageUsedLabel = Label(self.storageFrame, + text="Disk(0) Used: " + str(psutil.disk_usage("/").used) + " Bytes") + storageFreeLabel = Label(self.storageFrame, + text="Disk(0) Free: " + str(psutil.disk_usage("/").free) + " Bytes") + storagePercentLabel = Label(self.storageFrame, + text="Disk(0) Used: " + str(psutil.disk_usage("/").percent) + "%") + + storageUsageLabel.pack() + storageUsedLabel.pack() + storageFreeLabel.pack() + storagePercentLabel.pack() + + storageThread = threading.Thread(target=storage, name="storage", daemon=True) + storageThread.start() + + def ramRender(self): + def usedRam(): + try: + usedRamLabel.configure(text="Used RAM: " + str(psutil.virtual_memory().used) + " Bytes") + avaailableRamLabel.configure(text="Available RAM: " + str(psutil.virtual_memory().available) + " Bytes") + percentRamLabel.configure(text="Used RAM: " + str(psutil.virtual_memory().percent) + "%") + threading.Timer(1, usedRam).start() + except: + pass + + totalRamLabel = Label(self.ramFrame, text="Total RAM: " + str(psutil.virtual_memory().total) + " Bytes") + usedRamLabel = Label(self.ramFrame, text="Used RAM: " + str(psutil.virtual_memory().used) + " Bytes") + + avaailableRamLabel = Label(self.ramFrame, + text="Available RAM: " + str(psutil.virtual_memory().available) + " Bytes") + percentRamLabel = Label(self.ramFrame, + text="Used RAM: " + str(psutil.virtual_memory().percent) + "%") + + totalRamLabel.pack() + usedRamLabel.pack() + avaailableRamLabel.pack() + percentRamLabel.pack() + + usedRamThread = threading.Thread(target=usedRam, name="usedRam", daemon=True) + usedRamThread.start() + + def cpuRender(self): + def getUsage(): + try: + cpuPercentLabel.configure(text="Usage: " + str(psutil.cpu_percent(interval=1)) + "%") + threading.Timer(1, getUsage).start() + except: + pass + + cpuName = cpuinfo.get_cpu_info()["brand"] + cpuNameLabel = Label(self.cpuFrame, text="Name: " + cpuName) + + cpuFreqActual = cpuinfo.get_cpu_info()["hz_actual"] + cpuFreqActualLabel = Label(self.cpuFrame, text="Actual Speed: " + cpuFreqActual) + + cpuCoreCount = cpuinfo.get_cpu_info()["count"] + cpuCoreCountLabel = Label(self.cpuFrame, text="Cores: " + str(cpuCoreCount)) + + cpuPercentLabel = Label(self.cpuFrame, text="Usage: " + str(psutil.cpu_percent()) + "%") + + cpuNameLabel.pack() + cpuFreqActualLabel.pack() + cpuCoreCountLabel.pack() + cpuPercentLabel.pack() + getUsageThread = threading.Thread(target=getUsage, name="getUsage", daemon=True) + getUsageThread.start() + + def createContainers(self): + self.storageFrame = LabelFrame(self.window, text="Storage") + self.ramFrame = LabelFrame(self.window, text="RAM") + self.cpuFrame = LabelFrame(self.window, text="CPU") + + self.storageFrame.pack(side=LEFT, expand=YES, fill=BOTH) + self.ramFrame.pack(side=LEFT, expand=YES, fill=BOTH) + self.cpuFrame.pack(side=LEFT, expand=YES, fill=BOTH) + + cpuRenderThread = threading.Thread(target=self.cpuRender, name="cpuRender", daemon=True) + cpuRenderThread.start() + + ramRenderThread = threading.Thread(target=self.ramRender, name="ramRender", daemon=True) + ramRenderThread.start() + + storageRenderThread = threading.Thread(target=self.storageRender, name="storageRender", daemon=True) + storageRenderThread.start() + + def __init__(self, master): + self.window = Toplevel(master) + self.window.title("pyMonitor") + # self.window.geometry("800x400") + + containerThread = threading.Thread(target=self.createContainers, name="createContainers", daemon=True) + containerThread.start() + + self.window.mainloop() \ No newline at end of file diff --git a/setup.py b/setup.py index cd58cd8..021c918 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,9 @@ import sys from cx_Freeze import setup, Executable -base = None -if sys.platform == "win32": - base = "Win32GUI" +# None for commandline or "Win32GUI" or GUI + +base = "Win32GUI" dataFiles = ["JDE/", "Programs/", "Users/"]