Index: 2.2-parit-releases/src/optional/python-bindings/gnucash_core.py
===================================================================
--- 2.2-parit-releases/src/optional/python-bindings/gnucash_core.py	(revision 139)
+++ 2.2-parit-releases/src/optional/python-bindings/gnucash_core.py	(revision 140)
@@ -37,18 +37,6 @@
         self.errors = errors
 
 class Session(GnuCashCoreClass):
-    """A GnuCash book editing session
-
-    To commit changes to the session you may need to call save,
-    (this is allways the case with the file backend).
-    
-    When you're down with a session you may need to call end()
-
-    Every Session has a Book in the book attribute, which you'll definetely
-    be interested in, as every GnuCash entity (Transaction, Split, Vendor,
-    Invoice..) is associated with a particular book where it is stored.
-    """
-
     def __init__(self, book_uri=None, is_new=False):
         """A convienent contructor that allows you to specify a book URI,
         begin the session, and load the book.
@@ -116,27 +104,8 @@
             return return_value
         return new_function
 
-class Book(GnuCashCoreClass):
-    """A Book encapsulates all of the GnuCash data, it is the place where
-    all GnuCash entities (Transaction, Split, Vendor, Invoice...), are
-    stored. You'll notice that all of the constructors for those entities
-    need a book to be associated with.
+class Book(GnuCashCoreClass): pass
 
-    The most common way to get a book is through the book property in the
-    Session class, that is, create a session that connects to some storage,
-    such as through 'my_session = Session('file:my_books.xac')', and access
-    the book via the book property, 'my_session.book'
-
-    If you would like to create a Book without any backing storage, call the
-    Book constructor wihout any parameters, 'Book()'. You can later merge
-    such a book into a book with actual store by using merge_init.
-
-    Methods of interest
-    get_root_account -- Returns the root level Account
-    get_table -- Returns a commodity lookup table, of type GncCommodityTable
-    """
-    pass
-
 class GncNumeric(GnuCashCoreClass):
     def __init__(self, num=0, denom=0, **kargs):
         GnuCashCoreClass.__init__(self, num, denom, **kargs)
@@ -150,19 +119,8 @@
     def __init__(self, book, name=None, namespace=None, mnemonic=None, cusip=None, fraction=1, **kargs):
         GnuCashCoreClass.__init__(self, book, name, namespace, mnemonic, cusip, fraction, **kargs)
 
-class GncCommodityTable(GnuCashCoreClass):
-    """A CommodityTable provides a way to store and lookup commoditys.
-    Commoditys are primarily currencies, but other tradable things such as
-    stocks, mutual funds, and material substances are posible.
+class GncCommodityTable(GnuCashCoreClass): pass
 
-    Users of this library should not create thier own CommodityTable, instead
-    the get_table method from the Book class should be used.
-
-    This table is automatically populated with the GnuCash default commodity's
-    which includes most of the world's currencies.
-    """
-    pass
-
 class GncLot(GnuCashCoreClass):
     def __init__(self, book, **kargs):
         GnuCashCoreClass.__init__(self, book, **kargs)
@@ -176,23 +134,9 @@
     _new_instance = 'xaccMallocSplit'
 
 class Account(GnuCashCoreClass):
-    """A GnuCash Account.
-
-    A fundamental entity in accounting, an Account provides representation
-    for a financial object, such as a BANK account, an ASSET (like a building),
-    a LIABILITY (such as a bank loan), a summary of some type of EXPENSE, or
-    a summary of some source of INCOME.
-
-    The words in upper case are the constants that GnuCash and this library uses
-    to describe account type. Here is the full list:
-    BANK, CASH, CREDIT, ASSET, LIABILITY, STOCK, MUTUAL
-    CURRENCY, INCOME, EXPENSE, EQUITY, RECEIVABLE, PAYABLE, 
-    CHECKING, SAVINGS, MONEYMRKT, CREDITLINE
-
-    These are not strings, they are attributes you can import from this
-    module
-    """
     _new_instance = 'xaccMallocAccount'
+    def GetNthChild(self, n):
+        return self.get_children().pop(n)
 
 class GUID(GnuCashCoreClass):
     _new_instance = 'guid_new_return'
@@ -221,13 +165,9 @@
 Book.add_constructor_and_methods_with_prefix('qof_book_', 'new')
 Book.add_method('gnc_book_get_root_account', 'get_root_account')
 Book.add_method('gnc_book_set_root_account', 'set_root_account')
-Book.add_method('gnc_commodity_table_get_table', 'get_table')
 #Functions that return Account
 Book.get_root_account = method_function_returns_instance(
     Book.get_root_account, Account )
-#Functions that return GncCommodityTable
-Book.get_table = method_function_returns_instance(
-    Book.get_table, GncCommodityTable ) 
 
 # GncNumeric
 GncNumeric.add_constructor_and_methods_with_prefix('gnc_numeric_', 'create')
@@ -258,7 +198,8 @@
     GncCommodity.clone, GncCommodity )
 
 # GncCommodityTable
-GncCommodityTable.add_methods_with_prefix('gnc_commodity_table_')
+GncCommodityTable.add_constructor_and_methods_with_prefix('gnc_commodity_table_', 'get_table')
+
 commoditytable_dict =   { 
                             'lookup' : GncCommodity, 
                             'lookup_unique' : GncCommodity, 
@@ -282,7 +223,6 @@
 
 # Transaction
 Transaction.add_methods_with_prefix('xaccTrans')
-Transaction.add_method('gncTransGetGUID', 'GetGUID');
 
 trans_dict =    {
                     'GetSplit': Split, 
@@ -296,14 +236,12 @@
                     'GetAccountAmount': GncNumeric, 
                     'GetAccountConvRate': GncNumeric, 
                     'GetAccountBalance': GncNumeric, 
-                    'GetCurrency': GncCommodity,
-                    'GetGUID': GUID
+                    'GetCurrency': GncCommodity 
                 }
 methods_return_instance(Transaction, trans_dict)
 
 # Split
 Split.add_methods_with_prefix('xaccSplit')
-Split.add_method('gncSplitGetGUID', 'GetGUID');
 
 split_dict =    {
                     'GetBook': Book, 
@@ -320,8 +258,7 @@
                     'GetClearedBalance': GncNumeric, 
                     'GetReconciledBalance': GncNumeric, 
                     'VoidFormerAmount': GncNumeric, 
-                    'VoidFormerValue': GncNumeric,
-                    'GetGUID': GUID
+                    'VoidFormerValue': GncNumeric 
                 }
 methods_return_instance(Split, split_dict)
 
@@ -331,7 +268,6 @@
 # Account
 Account.add_methods_with_prefix('xaccAccount')
 Account.add_methods_with_prefix('gnc_account_')
-Account.add_method('gncAccountGetGUID', 'GetGUID');
 
 account_dict =  {   
                     'get_book' : Book, 
@@ -341,6 +277,7 @@
                     'nth_child' : Account, 
                     'lookup_by_name' : Account, 
                     'lookup_by_full_name' : Account, 
+                    'GetNthChild' : Account, 
                     'FindTransByDesc' : Transaction, 
                     'FindSplitByDesc' : Split, 
                     'get_start_balance' : GncNumeric, 
@@ -360,8 +297,7 @@
                     'GetProjectedMinimumBalanceInCurrency' : GncNumeric, 
                     'GetBalanceAsOfDateInCurrency' : GncNumeric, 
                     'GetBalanceChangeForPeriod' : GncNumeric, 
-                    'GetCommodity' : GncCommodity,
-                    'GetGUID': GUID 
+                    'GetCommodity' : GncCommodity 
                 }
 methods_return_instance(Account, account_dict)
 
@@ -369,15 +305,4 @@
 
 #GUID
 GUID.add_methods_with_prefix('guid_')
-GUID.add_method('xaccAccountLookup', 'AccountLookup')
-GUID.add_method('xaccTransLookup', 'TransLookup')
-GUID.add_method('xaccSplitLookup', 'SplitLookup')
 
-guid_dict = {
-                'copy' : GUID,
-                'TransLookup': Transaction,
-                'AccountLookup': Account,
-                'SplitLookup': Split
-            }
-methods_return_instance(GUID, guid_dict)
-                
