Wednesday, October 19, 2016

Windows Server : Python : Running Background Scripts without Console

We have a Windows Server that runs a python script every minute to send stats to a time-series-platform. So, every minute, we see a window that pops-up and disappears in a fraction of a second. If you access your server a lot, that's kinda irritating, so we had to run the python script without the console.

To run a python script without the console (popping-up):

  1. Save your python script with a .pyw extension (instead of .py)
  2. Run pythonw.exe (instead of python.exe)
Now, let's see if we'll miss that irritating console that's been playing eye tricks on us. :D

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...