On Fri, Dec 08, 2000 at 04:48:47PM +0900, Glen Malley wrote:

> 
> Hi, I'm new to the list so bear with me.
> I read through the archives looking for a solution to my problem,
> consulted various gurus, etc, but cannot find anything.
> 
> When using PyGtk, if I set my LANG environ variable to a Japanese
> one prior to running my application, I can use Japanese input methods
> as per usual in Gtk apps.
> However, if I set the LANG environ variable to the same value within
> the code itself, the input methods are not enabled.

There are two ways to set the variable and I also found that
sometimes, one of them doesn't work. Here is what should
work:

    import os

    os.environ['LANG'] = 'ja_JP.ujis'
    os.putenv ('LANG', 'ja_JP.ujis')

I *guess* the cause is that the env variable is exported to child
processes in one case and not in the other.

-- 
==============================================
Sowatec AG,       CH-8330 Pf�ffikon (ZH)
Witzbergstr. 7,   http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, [EMAIL PROTECTED]
==============================================

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to