Difference between revisions of "Danny's Python Modules"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(Adding link on DrawLib.py)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
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.  
 
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.  
  
''Danny.OOo.OOoLib.py ''
+
[http://www.oooforum.org/forum/viewtopic.phtml?t=14409 Click here to see original posting]
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 ''
+
'''[[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.  
 
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 ''
+
'''[[Danny.HSBConversions.py]]'''
HSB to RGB color space conversion routines. This module is a prerequisite for the module Danny.OOo.DrawLib.py.  
+
HSB to RGB color space conversion routines. This module is a prerequisite for the module [[Danny.OOo.DrawLib.py]].  
  
''Danny.OOo.PrintToWriter.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.  
 
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 ''
+
'''[[Danny.OOo.ConfigLib.py]]'''
 
Routines for working with the Configuration Manager.  
 
Routines for working with the Configuration Manager.  
  
''Danny.OOo.DialogLib.py ''
+
'''[[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.  
 
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 ''
+
'''[[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.  
 
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''  
+
'''[[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.  
 
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 ''
+
'''[[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.  
 
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 ''
+
'''[[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.  
 
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.
 
This is NOT an OOo specific module. It can be used for any type of Python code.
 +
 +
[[Category:Python]][[Category:External Project]]

Latest revision as of 20:04, 17 February 2015

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