Page 1 of 1

Python Plugin Redux

Posted: February 9th, 2017, 6:37 pm
by glitchassassin
Hi everyone,

Some time ago jblume created an open source plugin for Rainmeter allowing Python 3.3 scripts to be used as Measures. The project seems to have been abandoned and the original repository deleted. So, I took it upon myself to bring it back to life.

The new repo is linked below, with DLLs automatically built for Python 3.4 and 3.5. I'll add 3.6 shortly:

https://github.com/glitchassassin/rainmeter-python

If you have any issues getting it running, please submit an issue report on GitHub and I'll see what I can do!

Cheers,

Re: Python Plugin Redux

Posted: April 19th, 2017, 2:09 pm
by F4Jonatas
Loved it!
To make everyone's life easier, it would be better to leave an example (rmskin). It would be best for low level users.

Re: Python Plugin Redux

Posted: April 19th, 2017, 2:42 pm
by kyriakos876
Soooooo now I can do pretty much everything with Rainmeter yay!

Thanks for sharing!

Re: Python Plugin Redux

Posted: May 14th, 2017, 7:01 pm
by drakulaboy
nice, i installed Python 3.6, made and test a simple skin that show the local IP address of my pc :)

if you have another version of Python download and replace the Python.DLL from the GitHub repository
EDIT the SKIN IF YOU HAVE DIFFERENT INSTALL FOLDER FOR PYTHON

Code: Select all

PythonHome=c:\YOUR_PYTHON_DIR
Thank you glitchassassin for revive this, i was searching this plugin for a few days :D

Re: Python Plugin Redux

Posted: November 15th, 2017, 4:52 am
by RiseUp
Yes, thank you very much, glitchassassin! I'll be playing around with this to see if I can make it do what I need. :D

Time to Python all the things! ;-)

Re: Python Plugin Redux

Posted: February 23rd, 2022, 12:40 am
by sorienrot
I have tried to try the "Python Local IP_1.0.rmskin" and at the moment it doesn't work for me. I have edited the line and I have installed version 3.6 of python and put the correct Dll, but I can't get it to work. Does the skin work right now?

I'm using it because I wanted to test my own code and use python, but I can't figure out how to make it work. I have tried this skin, to know how to work, but I can't get it to work for me.

LocalIP.INI

Code: Select all

[Rainmeter]

[MeasurePy]
Measure=Plugin
Plugin=Python.dll
PythonHome=C:\Users\Sorienrot\AppData\Local\Programs\Python\Python36
ScriptPath=default.py
ClassName=Measure
UpdateDivider=1

[Measure]
Meter=String
MeasureName=MeasurePy
FontSize=20
StringStyle=Bold
InlineSetting=Shadow | 5 | 3 | 1 | 44,253,2,200
InlineSetting2=Shadow | 0 | 0 | 9.9 | 217,250,211
InlineSetting3=Shadow | 5 | 2 | 9.9 | 255,255,255
InlineSetting4=Shadow | 5 | 2 | 9.9 | 217,250,211
InlineSetting5=Shadow | 5 | 3 | 1 | 0,0,0,255
AntiAlias=1
StringEffect=Border
FontEffectColor=44,253,2
FontColor=217,250,211
Text=Your Local IP: %11
default.py

Code: Select all

import socket
socket.gethostbyname(socket.gethostname())

class Measure:
  def Reload(self, rm, maxValue):
    rm.RmLog(rm.LOG_NOTICE, "Reload called")

  def Update(self):
    return 1.0

  def GetString(self):
    return socket.gethostbyname(socket.gethostname())

  def ExecuteBang(self, args):
    pass

  def Finalize(self):
    pass
Image