Skip to content

Commit

Permalink
[Python] Suppress the spew from loading the python module
Browse files Browse the repository at this point in the history
Use --extra if you want it back.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21601 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
jralls committed Nov 20, 2011
1 parent 4ee898d commit a32c6f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/core-utils/core-utils.i
Expand Up @@ -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)
Expand Down
32 changes: 17 additions & 15 deletions src/python/init.py
@@ -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 """
Expand Down

0 comments on commit a32c6f5

Please sign in to comment.