This is HIGHLY dependant on the package you plan to use! You will find many packages dependencies are not supported so it is a bit hit and miss.
IF you want to try this, you would need to create a ZIP file eg, newpack.zip (max 8.3 filename) in the root directory you would put the folder of the compiled python. For example, if I want to use https://github.com/sourceperl/pyModbusTCP
I would copy the pyModbusTCP folder into the newpack.zip.
You can then copy over the newpack.zip to the WR44. You must then tell the router to recognise this file with the following command:
pycfg 0 modpath “python.zip:wizards.zip:privpy.zip:newpack.zip”
The first three zip files are the default. They are automatically loaded when the modpath is blank.
From there you can use, for example, “from pyModbusTCP.server import ModbusServer”
You can also pull down the python.zip and modify that but I like to keep that separate and python.zip is replaced every firmware update. Looking at python.zip is a good example though.
PS if you are going to test with that pyModbusTCP example, then # out line 226 of server.py as the device does not support socket.TCP_NODELAY.