User:Vishal

draft only.

Tasks

 * Environment Setup on Fedora 11


 * Extend OOo4Kids using Python


 * describe how to use Python with OOo4Kids.
 * teach the basics through examples
 * provide code sample
 * provide the most known links and references

Environment Setup on Fedora 11
Found out that the package 'libcupsys2-dev' of Debian/Ubuntu repository is equivalent of package 'cups-devel' in the Fedora repository. similarly is the case of - gstreamer-devel, gstreamer-plugins-base-devel

So for OOo4Kids installation on Fedora -

these packages are essential - cups-devel gstreamer-devel gstreamer-plugins-base-devel

Configuration goes fine on Fedora.

Next step - building:

build --all -P3 -- -P3 (using both cores of CPU)

Reflected the required changes on http://wiki.ooo4kids.org/index.php/EnvironmentSetup/Linux

Even tested the InstallOOo4kids4.sh script for installation of OOo4Kids on Fedora 11 machine. Suggested a bit of amendment to it.

Python Stuff
1) Reading the details here - http://wiki.services.openoffice.org/wiki/Using_Python_on_Linux, confused me that the implementation of the pyUNO would consist of - the following Python scripts :

* python.bin * pythonloader.py and pyc * uno.py and pyc * unohelper.py and pyc * mailmerge.py   * officehelper

Although the in the installation directory - '/opt/ooo4kids0.9.5/basis0.9.5/program', I could find only the following :


 * mailmerge.py
 * officehelper.py
 * pythonloader.py  and pythonloader.uno.so  and pythonloader.unorc
 * pythonscript.py
 * unohelper.py
 * uno.py
 * pyuno.so
 * libpyuno.so

Although the confusing thing for me was that I couldn't locate 'python.bin' ,so far now I have been using the system python shell.

2) Macro Issue

While in debug mode, and with following actions -

Opening OOo4Kids, Tools -> Customize -> Adding a macro to any event yields -

Mon Jul 19 20:56:19 2010 [ERROR] DirBrowseNode error: an error occured during opening a directory while evaluating file:///home/garg/.ooo4kids/0.9.5/user/Scripts/python Mon Jul 19 20:56:19 2010 [ERROR] : an error occured during opening a directory /opt/ooo4kids0.9.5/basis0.9.5/program/pythonscript.py:579 in function getChildNodes [contents = self.provCtx.sfa.getFolderContents( self.rootUrl, True )] Mon Jul 19 20:56:19 2010 [DEBUG] Entering PythonScriptProvider.ctoruser:uno_packages

Solution to this :

The macro script is actually looks in '~/.ooo4kids/0.9.5/user/Scripts', which by default is empty, so just place the folder named 'python' from the location- '/opt/ooo4kids0.9.5/basis0.9.5/share/Scripts' at '~/.ooo4kids/0.9.5/user/Scripts'. I don't know why the scripts aren't placed automatically on installation.

3) yet to document

Contact Me
View my Biography at [Vishal Garg] Visit: http://vishalgarg.in Mail me: [mailto:vishalgarg09@gmail.com vishalgarg09@gmail.com] IRC Nick: vishal, tux_addict on #sugar, #olpc, #gsoc, #python, #c at irc.feenode.net