gnue
[Top][All Lists]
Advanced

[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: Mon, 20 Nov 2006 12:40:15 +0200

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

to remove the annoying  text mode  user/password questions you can use
the SilentLoginHandler.

Add to imports:
from gnue.common.datasources.GLoginHandler import SilentLoginHandler

Add to constructor:
loginHandler = SilentLoginHandler (_username = user, _password = paswd)
self.connections.setLoginHandler (loginHandler)

Thanks Jan!   The script is running flawlessly now.

Now I am taking the new step : run the script from an embedded python
interpreter (dynamically linked with a pascal program).  Apparently,  there
are differences when embedding python compared to running the python
executable :

Traceback (most recent call last):
 File "<string>", line 1, in ?
 File "/usr/local/gnue/lib/python/gnue/__init__.py", line 31, in ?
   import gnue.common.apps as _init
 File "/usr/local/gnue/lib/python/gnue/common/apps/__init__.py", line 30, in ?
   import GDebug
 File "/usr/local/gnue/lib/python/gnue/common/apps/GDebug.py", line 34, in ?
   if '--debug-imports' in sys.argv or os.environ.has_key('GNUE_DEBUG_IMPORT'):
AttributeError: 'module' object has no attribute 'argv'



Cheers,
Adrian Maier




reply via email to

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