Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
  Lightbulb Thread: shutdown host from docker container
Post: shutdown host from docker container

Hello, I am trying to shutdown and reboot my LINUX devices from a python script that runs in a docker container, this code I was using pre-dockerizing the script is not working anymore, how can I sol...
cosmin1805 General Coding Help 0 970 Nov-27-2022, 06:34 PM
    Thread: WMI error
Post: RE: WMI error

(Nov-13-2022, 11:57 PM)snippsat Wrote: Many CPU producers wouldn't provide a way so wmi can acess temperature directly. Can use Open Hardware Monitor and call it trough wmi. import wmi w = wmi.WMI(...
cosmin1805 General Coding Help 3 1,819 Nov-14-2022, 06:51 PM
    Thread: WMI error
Post: RE: WMI error

........
cosmin1805 General Coding Help 3 1,819 Nov-14-2022, 06:46 PM
    Thread: WMI error
Post: WMI error

Hi, I am trying to run this thing to get the CPU temperature(I got it from youtube but I am open to other suggestions that work on WINDOWS) and I get this error. import wmi w_temp=wmi.WMI(namespace="r...
cosmin1805 General Coding Help 3 1,819 Nov-13-2022, 03:47 PM
    Thread: Os.system("shutdown"); command not found
Post: RE: Os.system("shutdown"); command not found

So the problem was that I was running the python script via the Pycharm interpreter, so it worked when I ran it in the terminal.
cosmin1805 General Coding Help 4 1,744 Nov-13-2022, 02:07 PM
    Thread: Os.system("shutdown"); command not found
Post: RE: Os.system("shutdown"); command not found

(Nov-12-2022, 05:19 PM)Gribouillis Wrote: Try import subprocess subprocess.run(['/sbin/shutdown', '-h', 'now'])Error:Traceback (most recent call last): File "/home/cosmin/PycharmProjects/REMOTE-SH...
cosmin1805 General Coding Help 4 1,744 Nov-13-2022, 02:02 PM
    Thread: Os.system("shutdown"); command not found
Post: Os.system("shutdown"); command not found

Hi, I am trying to shutdown my Linux mint computer via a python script, but I get a command not found error. os.system("shutdown now")Error:sh: line 1: shutdown: command not found
cosmin1805 General Coding Help 4 1,744 Nov-12-2022, 11:43 AM

User Panel Messages

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