Commit graph

21 commits

Author SHA1 Message Date
John Wiegley
aa3bade050 Added another catch handler for Python exceptions 2009-11-14 06:11:58 -05:00
John Wiegley
cd0a040778 Reordered the export_ calls in pyinterp.cc 2009-11-12 05:11:09 -05:00
John Wiegley
91e8378f04 Fixes to Python importing; removed "hello" precommand 2009-11-10 14:16:40 -05:00
John Wiegley
6005975006 Check for Python options before functions 2009-11-08 13:36:16 -05:00
John Wiegley
47c1089c61 Make sure to clean up memory after a Python exception 2009-11-07 20:00:34 -05:00
John Wiegley
9b2c2b6032 Python vars of unconvertable type return NULL_VALUE 2009-11-07 08:34:01 -05:00
John Wiegley
1bdb9330e5 Simplified passing of scope objects in Python 2009-11-05 17:16:59 -05:00
John Wiegley
78e6770c4c Segregated symbols into 5 separate namespaces
The different namespaces are:

  Function      Value expression functions, which receive a "context"
  Option        Command-line options
  Precommand    Commands which are invoked before reading the journal
  Command       Commands which are invoked after reading the journal
  Directive     Directives that occur at column 0 in a data file

This greatly eases the ability for Python uses to add intercept hooks to
change how the basic Ledger module functions.  An example of what should
be possible soon:

  import ledger

  def my_foo_handler(value):
      print "--foo received:", value

  ledger.add_handler(ledger.Option, "foo=", my_foo_handler)
2009-11-04 20:40:48 -05:00
John Wiegley
fbd660af20 Removed several unneeded Python interface files 2009-11-04 20:01:04 -05:00
John Wiegley
6d835e52f5 Changed two callout comments 2009-11-03 14:51:36 -05:00
John Wiegley
f6f8ef1ba6 Added Python interface for account_t 2009-11-03 08:53:33 -05:00
John Wiegley
dea9530cb7 Renamed Python global "session" to "current_session" 2009-11-02 17:04:49 -05:00
John Wiegley
588f2ef2f5 Fixed many compiler warnings from g++ 4.4 2009-10-25 05:01:39 -04:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
3b23823ea7 Disabled warning on not finding ledger/__init__.py
This warning is completely harmless, and was downgraded to a debug
message.
2009-03-09 22:08:24 -04:00
John Wiegley
c99ab20853 Fixed a few minor cases of uninitialized variables 2009-03-08 02:07:49 -04:00
John Wiegley
edf1ccd6ab Added a "python" command, which invokes Py_Main 2009-03-03 14:39:07 -04:00
John Wiegley
badea00584 Added a warning_() macro 2009-02-26 05:30:48 -04:00
John Wiegley
238bd7f8a5 Marked all strings needing internationalization
These strings are now collected automagically in the file po/ledger.pot.
If you'd like to produce a translation, just run this command after
building Ledger:

    msginit -l LOCALE -o LANG.po -i po/ledger.pot

Where LOCALE is a string like de or en_GB, and LANG is a short
descriptive word for your language.

Then send me this .po file so I can commit it to the Ledger sources
(alternatively, you could maintain the file in a fork on GitHub), and
setup the build script to format and install your new message catalog
during a "make install".
2009-02-25 03:51:42 -04:00
John Wiegley
0814c5a23f Added a new level of Python integration 2009-02-24 19:48:14 -04:00
John Wiegley
1799ed3a2a Moved python/*.cc files into src/
This is because soon, I intend to have real Python source files in
python/.
2009-02-24 16:08:49 -04:00
Renamed from python/pyinterp.cc (Browse further)