[GRASS-dev] Tk implemantation of a query function

Thierry Gonon thierrygonon at mac.com
Mon Oct 23 12:56:20 EDT 2006

Thanks Moritz !

It helps for the beginning, but after that, the problem is that it can't run db.table (I call it this way :
exec {db.tables driver=$DB_DRIVER database=$DB_DATABASE > /tmp/tables}
Anyone can help me (one more time !!) ??

Thanks !

Le lundi, 23 octobre, 2006, à 19h35, Moritz Lennert <mlennert at club.worldonline.be> a écrit :

>On Mon, October 23, 2006 17:27, Thierry Gonon wrote:
>> Hi everybody,
>> I'm a beginner in programmation and my goal (as wanted by my boss) is to
>> add a function to make the building of a query easier and more friendly
>> that it is actually (so that people who don't know SQL syntax can build
>> queries !!).
>> I've made a first script in bash, that works quite well (for postgres, but
>> I'm planning to extend it to other databases used by GRASS). And now,
>> Im'trying to make it more friendly, thru Tk. My problem is the following
>> error :
>> Error in startup script: can't read "GRASS_WISH": no such variable
>>     while executing
>> "exec $GRASS_WISH "$0" "$@""
>> If I only write "exec $GRASS_WISH" in this line, the error is that it
>> opens a new window and freeze everything...
>> I think my problems are very small... But can someone helps me ??
>> I join my code to help !
>I think your second line should end with a backslash:
>#Version 0.5 (15 octobre 2006)\
>exec $GRASS_WISH "$0" "$@"
>The backslash makes sure the line with 'exec' is only visible to the
>shell, but not to tcltk (for which it is the continuation of the commented
>line 2).

Thierry Gonon
2 Place de l'Eglise
Tél : 04 74 34 49 26

More information about the grass-dev mailing list