Guest007 пишет: > Приветствую! > >>>> import sys >>>> sys.setdefaultencoding('koi8-r') > > Traceback (most recent call last): > File "", line 1, in -toplevel- > sys.setdefaultencoding('koi8-r') > AttributeError: 'module' object has no attribute 'setdefaultencoding' > > К чему бы это? Эта и ещё несколько функций описаны в доке и присутствуют в > теле интерпретатора (вместе с докстрингами). Однако не работает... > > Раньше я таким пользовался -- код рабочий. > > Сизиф свежий. setdefaultencoding( name) Set the current default string encoding used by the Unicode implementation. If name does not match any available encoding, LookupError is raised. This function is only intended to be used by the site module implementation and, where needed, by sitecustomize. Once used by the site module, it is removed from the sys module's ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ namespace. New in version 2.0. ^^^^^^^^^^ >>> dir(sys) [ 'setappdefaultencoding' ] >>> sys.setappdefaultencoding('koi8-r')