Danny's Python Modules

From Apache OpenOffice Wiki
Revision as of 20:04, 17 February 2015 by JZA (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In this thread I am going to post some various Python modules from my growing library. The following links take you directly to the message where a particular class is posted.

Click here to see original posting

Danny.OOo.OOoLib.py This module makes programming OOo in Python much more like programming OOo in Basic. It also contains some frequently used functions that I typically write in Basic, such as makePropertyValue().

Danny.OOo.DrawLib.py This module has routines to make programming OOo Drawing documents easier. Much of this code was derrived from Basic code, that also appears in Danny's Draw Power Tools found at OOoMacros.org.

Danny.HSBConversions.py HSB to RGB color space conversion routines. This module is a prerequisite for the module Danny.OOo.DrawLib.py.

Danny.OOo.PrintToWriter.py This makes it easy and convenient to print a bunch of text into a Writer document. See the example routine in the module that shows how easy this module is to use, and how useful it can be.

Danny.OOo.ConfigLib.py Routines for working with the Configuration Manager.

Danny.OOo.DialogLib.py A class to build a dialog box from the com.sun.star.awt.* services. This doesn't do anything you couldn't already do using OOo's UNO API, this just makes it much easier.

Danny.OOo.WindowLib.py A class to build a modeless window from the com.sun.star.awt.* services. This doesn't do anything you couldn't already do using OOo's UNO API, this just makes it much easier.

Danny.OOo.Listeners.ListenerProcAdapters.py This module has various helpers that make it extremely easy to create listeners on the fly, and make them call an arbitrary python procedure. See quick example that appears with the code.

Danny.OOo.Listeners.TopWindowListener.py When you need to add a window listener to a top window, this class makes is easy to create such a listener. You can use this class, or your own subclass of it. If you create a subclass, you don't need to bother to implement every one of the methods, because you can inherit the empty implementations of methods from this class for the methods you are not interested in.

Danny.HeapSort A simple implementation of HeapSort. Yet, it allows a customizable notion of "comparison" and "swapping" by passing in your own compareGreaterProc, and swapProc. This is NOT an OOo specific module. It can be used for any type of Python code.

Personal tools