johnf wrote:
> On Tuesday 24 February 2009 09:56:36 am Paul McNett wrote:
>> Perhaps this is a bad idea. Setting the default encoding should be Python's
>> or the user's job, not Dabo's.
> +1
> 
> Just document how it works.

What about providing a function so the user can do it explicitly without having 
to 
know how to reload(sys) and re-set the encoding?:::


## dabo.__init__ :

def setDefaultEncoding(enc=dabo.defaultEncoding):
   dabo.defaultEncoding = enc
   sys.reload()
   sys.setdefaultencoding(enc)
   del(sys.setdefaultencoding)


That way, user code can:

import dabo
dabo.setDefaultEncoding("my_encoding")


And the generated appwizard code can include that in the main.py too.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to