[Python] Suppress the spew from loading the python module

Use --extra if you want it back.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21601 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2011-11-20 18:27:17 +00:00
parent 4ee898d90b
commit a32c6f5d5d
2 changed files with 19 additions and 15 deletions

View File

@ -51,6 +51,8 @@ gchar * gnc_locale_from_utf8(const gchar *);
%newobject gnc_locale_to_utf8;
gchar * gnc_locale_to_utf8(const gchar *);
gboolean gnc_is_extra_enabled();
const char * gnc_locale_default_iso_currency_code (void);
#if defined(SWIGGUILE)

View File

@ -1,32 +1,34 @@
import sys
import _sw_app_utils
from gnucash import *
from _sw_core_utils import gnc_is_extra_enabled
import gtk
import os
sys.path.append(os.path.dirname(__file__))
print "woop", os.path.dirname(__file__)
noisy = gnc_is_extra_enabled()
if noisy:
print "woop", os.path.dirname(__file__)
import pycons.console as cons
print "Hello from python!"
print "test", sys.modules.keys()
print "test2", dir(_sw_app_utils)
if noisy:
print "Hello from python!"
print "test", sys.modules.keys()
print "test2", dir(_sw_app_utils)
root = _sw_app_utils.gnc_get_current_root_account()
print "test", dir(root), root.__class__
print "test2", dir(gnucash_core_c)
if noisy:
print "test", dir(root), root.__class__
print "test2", dir(gnucash_core_c)
acct = Account(instance = root)
print "test3", dir(acct)
#print acct.GetName()
#print acct.GetBalance()
#print acct.GetSplitList()
#print "test2", dir(gnucash.gnucash_core_c)
if noisy:
print "test3", dir(acct)
#print acct.GetName()
#print acct.GetBalance()
#print acct.GetSplitList()
#print "test2", dir(gnucash.gnucash_core_c)
class Console (cons.Console):
""" GTK python console """