Index: src/optional/python-bindings/gnucash_core.i
===================================================================
--- src/optional/python-bindings/gnucash_core.i	(Revision 20730)
+++ src/optional/python-bindings/gnucash_core.i	(Arbeitskopie)
@@ -40,7 +40,9 @@
     @brief SWIG output file.
     @ingroup python_bindings
 */
-
+#ifdef DOXY2SWIG
+%include "doxydocs.i"
+#endif
 %feature("autodoc", "1");
 %module(package="gnucash") gnucash_core_c
 
@@ -205,4 +207,3 @@
 char * no_args[1] = { NULL };
 gnc_engine_init(0, no_args);
 %}
-
Index: src/optional/python-bindings/Makefile.am
===================================================================
--- src/optional/python-bindings/Makefile.am	(Revision 20730)
+++ src/optional/python-bindings/Makefile.am	(Arbeitskopie)
@@ -71,11 +71,44 @@
 	${top_srcdir}/src/engine/gncEntry.h \
 	${top_srcdir}/src/engine/gncTaxTable.h \
 	${top_srcdir}/src/engine/gncIDSearch.h \
-	${top_srcdir}/src/engine/gnc-pricedb.h
+	${top_srcdir}/src/engine/gnc-pricedb.h 
 
+if WITH_DOXY2SWIG
+_gnucash_core_c_includes += doxydocs.i
+SWIG_FILES += doxydocs.i
+XML_DOC_DIR = ${top_srcdir}/src/doc/xml
+XML_DOC_FILES = ${XML_DOC_DIR}/qofsession_8h.xml\
+		${XML_DOC_DIR}/qofbook_8h.xml\
+		${XML_DOC_DIR}/qofbackend_8h.xml\
+		${XML_DOC_DIR}/qoflog_8h.xml\
+		${XML_DOC_DIR}/qofutil_8h.xml\
+		${XML_DOC_DIR}/qofid_8h.xml\
+		${XML_DOC_DIR}/guid_8h.xml\
+		${XML_DOC_DIR}/gnc-module_8h.xml\
+		${XML_DOC_DIR}/gnc-engine_8h.xml\
+		${XML_DOC_DIR}/Transaction_8h.xml\
+		${XML_DOC_DIR}/Split_8h.xml\
+		${XML_DOC_DIR}/Account_8h.xml\
+		${XML_DOC_DIR}/gnc-commodity_8h.xml\
+		${XML_DOC_DIR}/gnc-lot_8h.xml\
+		${XML_DOC_DIR}/gnc-numeric_8h.xml\
+		${XML_DOC_DIR}/gncCustomer_8h.xml\
+		${XML_DOC_DIR}/gncEmployee_8h.xml\
+		${XML_DOC_DIR}/gncVendor_8h.xml\
+		${XML_DOC_DIR}/gncAddress_8h.xml\
+		${XML_DOC_DIR}/gncBillTerm_8h.xml\
+		${XML_DOC_DIR}/gncOwner_8h.xml\
+		${XML_DOC_DIR}/gncInvoice_8h.xml\
+		${XML_DOC_DIR}/gncJob_8h.xml\
+		${XML_DOC_DIR}/gncEntry_8h.xml\
+		${XML_DOC_DIR}/gncTaxTable_8h.xml\
+		${XML_DOC_DIR}/gncIDSearch_8h.xml\
+		${XML_DOC_DIR}/gnc-pricedb_8h.xml
+DOXY2SWIG_SWIG_DEFINE = -DDOXY2SWIG
+endif
 
 gnucash_core.c: $(SWIG_FILES) ${top_srcdir}/src/base-typemaps.i ${top_srcdir}/src/engine/engine-common.i $(_gnucash_core_c_includes)
-	swig -python -Wall -Werror \
+	swig -python -Wall -Werror ${DOXY2SWIG_SWIG_DEFINE} \
 	-I$(top_srcdir)/src -I$(top_srcdir)/src/engine \
 	-I$(top_srcdir)/src/business/business-core \
 	-I${top_srcdir}/src/libqof/qof \
@@ -105,3 +138,17 @@
 sqlite3test_LDADD = ${_gnucash_core_c_la_LIBADD}
 sqlite3test_CPPFLAGS = ${_gnucash_core_c_la_CPPFLAGS}
 
+${XML_DOC_FILES}:
+	@cd ${top_srcdir}; make doc
+
+doxydocs.i: ${XML_DOC_FILES}
+	@echo Importing doxygen documentation...
+	@echo //File generated by Makefile with doxy2swig.py > doxydocs.i
+	@echo //It consists of docstrings extracted from doxygen >> doxydocs.i
+	@echo //to be imported to python-bindings docstrings >> doxydocs.i
+	for xml_file in ${XML_DOC_FILES};\
+	do echo processing $$xml_file;\
+	doxy2swig.py $$xml_file xml_doc.i;\
+	cat xml_doc.i >> doxydocs.i;\
+	done
+	@rm xml_doc.i
Index: src/doc/Makefile.am
===================================================================
--- src/doc/Makefile.am	(Revision 20730)
+++ src/doc/Makefile.am	(Arbeitskopie)
@@ -64,4 +64,6 @@
 	sed < $< > $@.tmp \
             -e 's:@-top_srcdir-@:${top_srcdir}:g; s:@-VERSION-@:${VERSION}:g'
 	mv $@.tmp $@
-
+if WITH_DOXY2SWIG
+	echo "GENERATE_XML		= YES" >> $@
+endif
Index: configure.ac
===================================================================
--- configure.ac	(Revision 20730)
+++ configure.ac	(Arbeitskopie)
@@ -1108,7 +1108,41 @@
     AC_MSG_ERROR([--enable-python-bindings is obsolete: The option has been renamed into --enable-python])
   fi)
 
+###-------------------------------------------------------------------------
+### Additional documentation for python bindings by importing doxygen docs
+### optional 
+###-------------------------------------------------------------------------
 
+AC_ARG_ENABLE(doxy2swig,
+  [AS_HELP_STRING([--enable-doxy2swig],[enable additional online documentation for python bindings])],
+  [case "${enableval}" in
+     yes) enable_doxy2swig=true ;;
+     no) enable_doxy2swig=false ;;
+     *) enable_doxy2swig=false    # default: false
+   esac],
+  [enable_doxy2swig=false] # default: false
+  )
+AM_CONDITIONAL(WITH_DOXY2SWIG, [test x${enable_doxy2swig} = xtrue])
+
+if test x${enable_doxy2swig} = "xtrue"
+then
+  AC_CHECK_PROG([DOXY2SWIG_EXISTS],[doxy2swig.py],[true],[false])
+  if test "x$DOXY2SWIG_EXISTS" != "xtrue" ; then
+    AC_MSG_ERROR([
+	
+ doxy2swig.py not found !
+ To import docstrings from doxygen to python-bindings
+ you will need to get it and have it executable in PATH.
+ You can get it here: 
+ http://www.aero.iitb.ac.in/~prabhu/software/code/python/doxy2swig.py
+
+])
+  fi
+  if test x${enable_python} = "xfalse"; then
+    AC_MSG_WARN([It's no use enabling doxy2swig when you don't enable python.])
+  fi
+fi
+
 ###-------------------------------------------------------------------------
 ### Additional compiler warnings (or not) if we're running GCC
 ###-------------------------------------------------------------------------
