setdefaultencoding error

Discussion in 'Python' started by smalltalk, Dec 8, 2007.

  1. smalltalk

    smalltalk Guest

    >>> import sys
    >>> sys.setdefaultencoding(utf8)

    Traceback (most recent call last):
    File "<interactive input>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'setdefaultencoding'

    but i find the attribute"setdefaultencoding" in python manuals

    where is the error?
     
    smalltalk, Dec 8, 2007
    #1
    1. Advertising

  2. smalltalk

    John Machin Guest

    On Dec 8, 8:36 pm, smalltalk <> wrote:
    > >>> import sys
    > >>> sys.setdefaultencoding(utf8)

    >
    > Traceback (most recent call last):
    > File "<interactive input>", line 1, in <module>
    > AttributeError: 'module' object has no attribute 'setdefaultencoding'
    >
    > but i find the attribute"setdefaultencoding" in python manuals
    >
    > where is the error?


    You need to do more than find an attribute in a manual, you need to
    read what the manual says about that attribute.
     
    John Machin, Dec 8, 2007
    #2
    1. Advertising

  3. smalltalk

    smalltalk Guest

    thank you very much
    I have solved
     
    smalltalk, Dec 10, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. christof hoeke

    xml processing and sys.setdefaultencoding

    christof hoeke, Jul 20, 2003, in forum: Python
    Replies:
    4
    Views:
    838
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Jul 21, 2003
  2. Askari

    sys.setdefaultencoding(name)

    Askari, Sep 18, 2004, in forum: Python
    Replies:
    5
    Views:
    5,340
    Askari
    Sep 20, 2004
  3. Robin Becker

    sys.setdefaultencoding

    Robin Becker, Aug 28, 2007, in forum: Python
    Replies:
    1
    Views:
    392
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Aug 28, 2007
  4. crow
    Replies:
    5
    Views:
    714
    Terry Reedy
    Jul 9, 2010
  5. moerchendiser2k3

    Is setdefaultencoding bad?

    moerchendiser2k3, Feb 23, 2011, in forum: Python
    Replies:
    4
    Views:
    306
    Nobody
    Feb 24, 2011
Loading...

Share This Page