[issue10301] Zipfile cannot be used in "with" Statement

2010-11-03 Thread t.steinruecken

New submission from t.steinruecken :

Using a ZipFile as a "with"-context dosnt work
(Im using the standard Ubuntu version of Python3.1)

Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from zipfile import ZipFile
>>> with ZipFile("test.zip","w") as z:
... z.close()
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'ZipFile' object has no attribute '__exit__'
>>>

--
components: Extension Modules
messages: 120346
nosy: t.steinruecken
priority: normal
severity: normal
status: open
title: Zipfile cannot be used in "with" Statement
type: behavior
versions: Python 3.1

___
Python tracker 
<http://bugs.python.org/issue10301>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5398] strftime("%B") returns a String unusable with unicode

2009-03-01 Thread t.steinruecken

New submission from t.steinruecken :

import locale
import datetime

locale.setlocale(locale.LC_ALL, ('de_DE', 'UTF8'))
print u""+datetime.datetime( 2009, 3, 1 ).strftime("%B")
--
Traceback (most recent call last):
print u""+datetime.datetime( 2009, 3, 1 ).strftime("%B")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)

--
messages: 82958
nosy: t.steinruecken
severity: normal
status: open
title: strftime("%B") returns a String unusable with unicode
type: behavior
versions: Python 2.5

___
Python tracker 
<http://bugs.python.org/issue5398>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com