ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Ivan Fedorov <ns@altlinux.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] python?
Date: Sun, 02 Jul 2006 13:54:14 +0900
Message-ID: <44A75176.4000905@altlinux.ru> (raw)
In-Reply-To: <200606291622.51135.trash4@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

Guest007 пишет:
> Приветствую!
> 
>>>> import sys
>>>> sys.setdefaultencoding('koi8-r')
> 
> Traceback (most recent call last):
>   File "<pyshell#1>", 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)
[<SKIP> 'setappdefaultencoding' <SKIP>]
>>> sys.setappdefaultencoding('koi8-r')




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

  reply	other threads:[~2006-07-02  4:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29 12:22 Guest007
2006-07-02  4:54 ` Ivan Fedorov [this message]
2006-07-03 13:29   ` Guest007

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44A75176.4000905@altlinux.ru \
    --to=ns@altlinux.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git