Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Standalone application
#1
Lightbulb 
Hello dear coders, i was searching way to print in console CPU temperature and i found code i put bellow. The problem is, this code works only when i have in my PC OpenHardwareMonitor program.
THIS - https://openhardwaremonitor.org/documentation/
So in my opinion this code just takes information from this program. When i make standalone EXE. with Pyinstaller from this script and run it on second computer without open hardwaremonitor it is not working.

PLEASE GUYS IS THERE ANY SOLUTION TO RUN THIS CODE ON EVERY MACHINE ? HOW TO ADD OpenHardwareMonitor to dependencies or is there any other way to make this working alone ? Thank you.

import wmi
w = wmi.WMI(namespace="root\OpenHardwareMonitor")
temperature_infos = w.Sensor()


for sensor in temperature_infos:
    if sensor.Name=='CPU Core':
        print(sensor.Value)
        break
Iam also adding photo of how this program looks like

app
Reply


Messages In This Thread
Standalone application - by samuelbachorik - Jul-31-2020, 06:39 PM
RE: Standalone application - by Gribouillis - Jul-31-2020, 06:46 PM
RE: Standalone application - by samuelbachorik - Jul-31-2020, 06:59 PM
RE: Standalone application - by snippsat - Aug-01-2020, 12:14 AM
RE: Standalone application - by samuelbachorik - Aug-01-2020, 12:25 PM
RE: Standalone application - by snippsat - Aug-01-2020, 01:10 PM
RE: Standalone application - by samuelbachorik - Aug-02-2020, 11:37 AM
RE: Standalone application - by snippsat - Aug-02-2020, 01:02 PM
RE: Standalone application - by samuelbachorik - Aug-02-2020, 01:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Tiny web server as standalone executable? Winfried 0 1,255 Feb-09-2024, 11:48 AM
Last Post: Winfried
  How to send data from a python application to an external application aditya_rajiv 1 3,094 Jul-26-2021, 06:00 AM
Last Post: ndc85430
  Run an app in a standalone terminal and wait until it's closed glestwid 2 3,556 Aug-30-2020, 08:14 AM
Last Post: glestwid
  Python 3.4: the only release to create .EXE standalone without .dll samsonite 7 7,554 Feb-28-2019, 09:20 AM
Last Post: samsonite
  Standalone interpreter? stf92 2 3,698 Mar-11-2018, 12:33 AM
Last Post: stf92
  Correct way to import from a standalone module in a different location chowder 3 19,943 Dec-16-2017, 07:44 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020