I wrote a program in OOo 3.3 Calc (on SuSE Linux) for audio transformer design (using OOo Basic).
However, due to additional features required, and primitive nature of Basic, this program need to be re-written in Python.
There is a bunch of math function made with Basic, and macros launched with buttons embedded on spreadsheet which analyze data and populate spreadsheets with results.
Since I found no definitive Python/OOo guide, its quite possible I have misunderstood something.
In order to control/manipulate data in OOo from external Python script one should use PyUNO interface. However, I would like to embed all Python functions and macros straight into OOo document (like I have done with basic scripts).
For whatever reason Tools -> Organazie Macros -> Python doesn't allow to create new Python macros ("Create" button is always dimmed).

At first attempt, I created a module (embedded into spreadsheet document), pasted Python scripts written by Danny Brewer (Danny.StringOps.py). One of the function in Danny's library is for example this one:
Code: Select all
def IsAlpha( cChars ):
"""Return True if every char in cChars is a letter."""
return AllCharsInSet( cChars, constLetters() )
Actually I don't need IsAlpha mentioned above, I use it just for simple test.
Anyone can help me, how to do it correctly?
Thanks in advance for any suggestion(s).