[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] brief status update

From: ksterker
Subject: Re: [Adonthell-devel] brief status update
Date: Mon, 23 Aug 2004 10:06:58 +0200

Von: address@hidden
Datum: Freitag, 20. August 2004, 13:05

> However, once I am finished, using the engine from Python will be 
> as convenient as using it from C++:

I've just committed these changes ... 
With them in place, Adonthell can be used from Python the following way:

  from adonthell import main

  class myApp:
      # -- ctor
      def __init__ (self, app):
          self.App = app ()
      # -- application entry point
      def main (self):
          self.App.init_modules (self.App.GFX | ...)
  if __name__ == '__main__':
      adonthellApp = main.AdonthellApp ()
      app = myApp (adonthellApp)
      adonthellApp.init (app.main)

It's still a little awkward, though. Perhaps myApp::main should get 
adonthellApp passed as argument, as this would further simplify the code: 
  from adonthell import main

  class myApp:
      # -- application entry point
      def main (self, app):
          app.init_modules (app.GFX | ...)
  if __name__ == '__main__':
      adonthellApp = main.AdonthellApp ()
      adonthellApp.init (myApp ().main)

For more info, see the updated test scripts as well as src/main/|.h 
and src/py-wrappers/adonthell/|.h

Now that this is in place, I can continue with quests and questedit. However, 
don't expect much for the next 3 weeks, as I will be occupied otherwise.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]