Comment 3 for bug 1132812

Revision history for this message
Rastko Karadzic (rastkokaradzic) wrote :

Because screenlets are written in python end user gets copy of source code and not precompiled binary, which means that you
can change installed files directly (not recommended) or get a copy of source code from tarball and change that.
For example if you want to change sensors.py:
1. download source
2. make changes in SOURCE_PATH/src/lib/sensors.py
3. go to SOURCE_PATH and execute "python setup.py build"
4. run "export PYTHONPATH=SOURCE_PATH/build/lib.linux-x86*/screenlets/" where lib.linux-x86* is folder generated by command above. (it will be for ex. lib.linux-x86_64-2.6, it depends on arch)
5. run desired screenlet and test your changes

It's important to run step 4 and 5 in same terminal because otherwise python will import your installed modules and not those that you have just changed.

When you make a patch which you want to be permanent, execute "sudo setup.py install" in SOURCE_PATH folder. Also, when you do that, post patch upstream ;)

Regards,
Rastko Karadzic.