[Top][All Lists]

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

Re: [GNUe] Working example for calling a specific form from a python scr

From: Adrian Maier
Subject: Re: [GNUe] Working example for calling a specific form from a python script
Date: Fri, 17 Nov 2006 16:27:19 +0200

On 11/17/06, Jan Ischebeck <address@hidden> wrote:
Hi Adrian,

the following example is working for me (latest development version).



from gnue.forms.GFInstance import GFInstance
from gnue.forms.uidrivers import wx26 as ui
from gnue.forms.GFConfig import ConfigOptions
from gnue.common.apps.GClientApp import GClientApp

class gfdrunner(GClientApp):
  def __init__ (self, connections = None):
    self.OPTIONS['username'] = "myname"
    self.OPTIONS['password'] = "mypassword"
    GClientApp.__init__ (self, connections, 'forms', ConfigOptions)

    self.configurationManager.registerAlias ('gConfigForms', 'forms')

  def run(self):
    instance = GFInstance(manager=self,
               ui=ui, disableSplash=1)


r = gfdrunner()

Hello Jan,

This script works here, too. But it asked me for a username and password,
in console mode :

GNU Enterprise: Login to db_faf

 Login required for

 User Name: am

Then the form started with the wx ui.  A little strange, but it's an important
step forward:  the form ran !

James had explained me a couple of days ago, on irc,  that it's necessary to
define a login manager class that returns the user and password.  I'll try doing
that next.

Thanks !

Adrian Maier

reply via email to

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