It is currently October 13th, 2024, 12:50 am

Python Plugin Redux

Share and get help with Plugins and Addons
glitchassassin
Posts: 1
Joined: February 9th, 2017, 6:28 pm

Python Plugin Redux

Post 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,
F4Jonatas
Posts: 2
Joined: January 11th, 2017, 10:45 pm

Re: Python Plugin Redux

Post 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.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Python Plugin Redux

Post by kyriakos876 »

Soooooo now I can do pretty much everything with Rainmeter yay!

Thanks for sharing!
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Python Plugin Redux

Post 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
You do not have the required permissions to view the files attached to this post.
RiseUp
Posts: 6
Joined: November 3rd, 2017, 8:08 pm

Re: Python Plugin Redux

Post 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! ;-)
User avatar
sorienrot
Posts: 1
Joined: February 23rd, 2022, 12:24 am

Re: Python Plugin Redux

Post 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