[issue7232] Support of 'with' statement fo TarFile class

2009-10-29 Thread Jaime Buelta

New submission from Jaime Buelta :

Currently, the TarFile is not supporting the 'with' statement, which I
think it should for coherence with other file classes. 

I've already created a patch including it for consideration.

--
components: Library (Lib)
files: tarfileWithSupport.patch
keywords: patch
messages: 94645
nosy: jaime.buelta
severity: normal
status: open
title: Support of 'with' statement fo TarFile class
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file15220/tarfileWithSupport.patch

___
Python tracker 

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



[issue7232] Support of 'with' statement fo TarFile class

2009-10-29 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

Please clean up the patch, and I take another look at it.

--
assignee:  -> lars.gustaebel
nosy: +lars.gustaebel

___
Python tracker 

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



[issue7232] Support of 'with' statement fo TarFile class

2009-10-29 Thread Jaime Buelta

Jaime Buelta  added the comment:

I've cleaned the patch, I don't now why Eclipse added a lot of garbage,
sorry.

--
Added file: http://bugs.python.org/file15221/tarfileWithSupportv2.patch

___
Python tracker 

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



[issue4750] tarfile keeps excessive dir structure in compressed files

2009-10-29 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

The latest patch (4750.gzip.basename.fix.diff) cannot be used the way it
is. The problem is that it uses the name attribute to store the basename
with the .gz extension stripped. This breaks compatibility.

--

___
Python tracker 

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



[issue7233] decimal.py: two rotate() issues

2009-10-29 Thread Stefan Krah

New submission from Stefan Krah :

Hi,

I got two issues with the all-important function rotate():

1. It should probably convert an integer argument:

>>> from decimal import *
>>> c = getcontext()
>>> c.prec = 4
>>> Decimal("10").rotate(1)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/decimal.py", line 3411, in rotate
ans = self._check_nans(other, context)
  File "/usr/lib/python2.7/decimal.py", line 738, in _check_nans
other_is_nan = other._isnan()


2. When the coefficient size is greater than prec, the most significant
digits should be truncated before rotating:

>>> c.prec = 4
>>> Decimal("10").rotate(Decimal(1))
Decimal('1')


The result should be 0 (checked against decNumber).

--
messages: 94649
nosy: mark.dickinson, skrah
severity: normal
status: open
title: decimal.py: two rotate() issues
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue7233] decimal.py: two rotate() issues

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

Agreed on both counts.  I'll take a look.

--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue4750] tarfile keeps excessive dir structure in compressed files

2009-10-29 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

I fixed it in r75935 and r75937.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue5500] tarfile: path problem in arcname under windows

2009-10-29 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

I suppose this issue is related to issue4750 which I have just closed.
If not, please reopen this issue.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue7228] %lld for PyErr_Format (Modules/_io/bufferedio.c)

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

I've rolled back all the changes I made trying to fix these format 
arguments;  the rollback is in r75939 (trunk), r75941 (py3k) and r75942 
(release31-maint).  Next time I'll think a bit harder, get a code 
review, and make sure that the code gets tested on Windows before it 
goes in.

I agree that what's needed here is %lld and %llu support in PyErr_Format 
and PyString_FromFormat(V);  this seems like a useful thing to add in 
any case.

ocean-city:  you don't happen to have a patch available, do you?

--

___
Python tracker 

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



[issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1

2009-10-29 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Perhaps we can get some movement regarding this problem again, as it
also applies to other platforms that require special gcc options for the
compiler and linker.

A common case where such settings were needed is Mac OS X - in the case
of building universal binaries. Since this was too tedious to get right,
Python 2.5 introduced new configure options to simplify this. In Python
2.4, you had to configure Python using these  configure options to get a
universal build:

BASECFLAGS="-arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk" LDFLAGS="-arch i386 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.4u.sdk"

... and that shows part of the problem with the Python configure/make
system: it simply doesn't follow the standards used in other OSS
software of passing through CFLAGS et al. to all subsequent compiler and
linker calls.

In order to get compiler options passed through, you have to set BASECFLAGS.

For linker options, you may have some luck with using LDFLAGS, but not
always, since e.g. the configure script may sometimes add LDFLAGS to
LDSHARED (e.g. on Mac OS X using the universal binary options), which
then results in the options to show up twice on the linker line. Using
LDSHARED directly instead then helps.

As a result, simply adding CFLAGS and LDFLAGS to a few more targets
definitions in the Makefile will likely cause more trouble on other
platforms and in other situations.

Overall, the whole configure/Makefile system for defining compiler and
linker options has gotten somewhat messy over the years and much of it
is not documented (at least I'm not aware of any such documentation
apart from the ticket and checkin messages related to the various changes).

I think a first step in the right direction would be to make sure that
LDSHARED never automagically gets additional values from LDFLAGS. Then
we could at least add LDFLAGS to all targets that use LDSHARED as linker
command for shared libs.

As second step, I think that the CFLAGS environment variable passed to
configure should be made to init the BASECFLAGS Makefile variable, since
that's what the user would expect (if he knew how the system works).

--
nosy: +lemburg

___
Python tracker 

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



[issue7117] Backport py3k float repr to trunk

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

The next job is to deprecate PyOS_ascii_atof and PyOS_ascii_strtod, I 
think.  I'll get to work on that.

--

___
Python tracker 

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



[issue7233] decimal.py: two rotate() issues

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

The shift function should also accept an integer 2nd argument.

--

___
Python tracker 

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



[issue3871] cross and native build of python for mingw32 with distutils

2009-10-29 Thread David Fraser

Changes by David Fraser :


--
nosy: +davidfraser

___
Python tracker 

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



[issue5872] New C API for declaring Python types

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This patch is huge.

Some things:
- you should provide an example of using the new API. Your description
is not very, well, descriptive :)
- "all PyTypeObjects must now be *pointers* rather than static
instances": is it mandatory, or did you add this out of "purity"? It
would be nice if we could minimize disruption (that is, provide the new
API as a feature, but not force ourselves and other people to rewrite
huge chunks of code)
- same for the private declaration of PyTypeObject: is it really
necessary to hide it from outside code?

Lastly, since your patch is not ready for consumption, I would advocate
creating a branch somewhere (on the SVN sandbox if you have access
rights, or in a separate e.g. bitbucket repository by cloning the
existing Mercurial mirror).

--
nosy: +nnorwitz, pitrou

___
Python tracker 

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



[issue7233] decimal.py: two rotate() issues

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

There were a number of Decimal methods that failed to accept an integer 
second argument.  I've fixed that in r75944.

--

___
Python tracker 

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



[issue7233] decimal.py: two rotate() issues

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

And the shift and rotate bugs for large arguments are fixed in r75945.

--

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-29 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Christoph Gohlke wrote:
> 
> Christoph Gohlke  added the comment:
> 
> Apparently the msvc9compiler_stripruntimes_regexp2 patch causes problems
> for MinGW users. The following C program is using the Python C API to
> import the testpyd extension generated by testpyd.py. When compiled with
> MinGW, the program fails with "ImportError: DLL load failed:..." if the
> PYD extension is compiled with MSVC9 and the patch is applied. The
> program works if 1) it is compiled with MSVC9, or 2) the testpyd
> extension is build without the patch, or 3) the files
> Microsoft.VC90.CRT.manifest and msvcr90.dll are placed next to the
> executable and the manifest is also embedded into the executable (e.g.
> using mt.exe).
> 
> 
> /* Import the testpyd.pyd module. */
> #include 
> int main(void) {
> Py_Initialize();
> { 
> PyObject *p = PyImport_ImportModule("testpyd"); 
> }
> Py_Finalize();
> return 0;
> }

I'm not sure whether this is related to the problem in question.
Does MinGW also embed a manifest in the generated executable ?

If it doesn't, then this is more likely a problem with how
MinGW works per default, than with Python or distutils.

The fact that the above does work without the patch applied
suggests that MinGW does not embed the manifest in the executable
(since the Windows linker then uses the one from the PYD file).

--

___
Python tracker 

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



[issue7233] decimal.py: two rotate() issues

2009-10-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

Merged (along with a test numbering fix in extra.decTest) in r75946 
(release26-maint), r75947 (py3k) and r75948 (release31-maint).

Thanks for the report!

--
components: +Library (Lib)
priority:  -> normal
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior
versions: +Python 3.1, Python 3.2

___
Python tracker 

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



[issue7234] Complete your registration to Python tracker -- keyRVZuTYMju0LifnIK60WPnidSrLQIHXI7

2009-10-29 Thread lpp1985
__
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com




@font-face {
font-family: 宋体;
}
@font-face {
font-family: Verdana;
}
@font-face {
font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; 
layout-grid: 15.6pt; }
P.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; 
FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
page: Section1
}
UNKNOWN {
FONT-SIZE: 10pt
}
BLOCKQUOTE {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}




the
reply's additional "Re:" is ok
 
 
2009-10-29 


李澎鹏 



发件人: Python tracker 

发送时间: 
2009-10-29  21:07:41 

收件人: lpp1985 

抄送: 
主题: Complete your 
registration 
to Python tracker -- keyRVZuTYMju0LifnIK60WPnidSrLQIHXI7 
 

To complete your registration of the user "kaka" with
Python tracker, please do one of the following:

- send a reply to rep...@bugs.python.org and maintain the subject line as is (the
reply's additional "Re:" is ok),

- or visit the following URL:

http://bugs.python.org/?...@action=confrego&otk=RVZuTYMju0LifnIK60WPnidSrLQIHXI7



unnamed
Description: Binary data
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7235] IO libary have some error

2009-10-29 Thread lpp1985

New submission from lpp1985 :

The parameter 'newline' in os.open() functiion in the condition of 
input could ought to be set to any character.But if I set anythin 
else '','\n','\r\n',and '\r',there will be a error raise.This is maybe 
a bug in this libary.

--
components: Library (Lib)
messages: 94663
nosy: kaka
severity: normal
status: open
title: IO libary have some error

___
Python tracker 

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



[issue7234] Complete your registration to Python tracker -- keyRVZuTYMju0LifnIK60WPnidSrLQIHXI7

2009-10-29 Thread Eric Smith

Changes by Eric Smith :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue7235] IO libary have some error

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It's by design. If you want to split on arbitrary characters, use the
split() method on string and bytes objects.

--
nosy: +pitrou
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue7236] the reply's additional "Re:" is ok

2009-10-29 Thread lpp1985
__
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com




@font-face {
font-family: 宋体;
}
@font-face {
font-family: Verdana;
}
@font-face {
font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; 
layout-grid: 15.6pt; }
P.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; 
FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
page: Section1
}
UNKNOWN {
FONT-SIZE: 10pt
}
BLOCKQUOTE {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}



 
 
 
2009-10-29 


李澎鹏 



发件人: Python tracker 

发送时间: 
2009-10-29  21:07:41 

收件人: lpp1985 

抄送: 
主题: Complete your 
registration 
to Python tracker -- keyRVZuTYMju0LifnIK60WPnidSrLQIHXI7 
 

To complete your registration of the user "kaka" with
Python tracker, please do one of the following:

- send a reply to rep...@bugs.python.org and maintain the subject line as is (the
reply's additional "Re:" is ok),

- or visit the following URL:

http://bugs.python.org/?...@action=confrego&otk=RVZuTYMju0LifnIK60WPnidSrLQIHXI7



unnamed
Description: Binary data
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7236] the reply's additional "Re:" is ok

2009-10-29 Thread Eric Smith

Changes by Eric Smith :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue7211] select module - kevent ident field 64 bit issue

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

According to man pages on the Web, the kevent structure is:

 struct kevent {
 uintptr_t ident;/* identifier for this event */
 short filter;   /* filter for event */
 u_short   flags;/* action flags for kqueue */
 u_int fflags;   /* filter flag value */
 intptr_t  data; /* filter data value */
 void  *udata;   /* opaque user data identifier */
 };

So the `ident` field is indeed an uintptr_t.
However the patch is slightly wrong IMO:

- you should not blindly use `long long`. Python already defines a
"Py_uintptr_t" type. If you need more information you should conditional
compilation such as in (for the off_t type)
http://svn.python.org/view/python/trunk/Modules/_io/_iomodule.h?view=markup

- in tests, you should use sys.maxsize (which gives you the max value of
a ssize_t integer) rather than choosing based on platform.architecture():

>>> sys.maxsize
9223372036854775807
>>> 2**64*1
18446744073709551616L
>>> sys.maxsize*2 + 1
18446744073709551615L


PS : a patch against trunk or py3k is preferred, but in this case it
would probably apply cleanly anyway

--
nosy: +pitrou

___
Python tracker 

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



[issue7211] select module - kevent ident field 64 bit issue

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Apparently Roundup borked the URL. Let's try another one (or look into
Modules/_io/_iomodule.h): 
http://code.python.org/hg/trunk/file/b9bc35171668/Modules/_io/_iomodule.h#l88

--

___
Python tracker 

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



[issue7235] IO libary have some error

2009-10-29 Thread lpp1985

lpp1985  added the comment:

But sometimes the content of file in too large to put into memory,So I need a 
tool to solve this problem.Just only modify a subclass in Io could solve this 
problem.To me ,it is difficult,but simple to your team!

2009-10-29 

李澎鹏 

发件人: Antoine Pitrou 
发送时间: 2009-10-29  21:18:31 
收件人: lpp1985 
抄送: 
主题: [issue7235] IO libary have some error 

Antoine Pitrou  added the comment:
It's by design. If you want to split on arbitrary characters, use the
split() method on string and bytes objects.
--
nosy: +pitrou
resolution:  -> invalid
status: open -> closed
___
Python tracker 

___

--
Added file: http://bugs.python.org/file15226/unnamed
Added file: http://bugs.python.org/file15227/unnamed

___
Python tracker 

___



@font-face {
font-family: 宋体;
}
@font-face {
font-family: Verdana;
}
@font-face {
font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; 
layout-grid: 15.6pt; }
P.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; 
FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; 
FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
page: Section1
}
UNKNOWN {
FONT-SIZE: 10pt
}
BLOCKQUOTE {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}



But sometimes the content of file 
in too large to put into memory,So I need a tool to solve this problem.Just 
only 
modify a subclass in Io could solve this problem.To me ,it is difficult,but 
simple to your team!
 
2009-10-29 


李澎鹏 



发件人: Antoine Pitrou 

发送时间: 
2009-10-29  21:18:31 

收件人: lpp1985 

抄送: 
主题: [issue7235] IO libary 
have 
some error 
 


Antoine Pitrou  added the comment:

It's by design. If you want to split on arbitrary characters, use the
split() method on string and bytes objects.

--
nosy: +pitrou
resolution:  -> invalid
status: open -> closed

___
Python tracker 
;
___


unnamed
Description: Binary data
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-29 Thread Christoph Gohlke

Christoph Gohlke  added the comment:

My last comment was merely reporting that this patch can break MinGW
based build processes. It did surprise some developers that their
programs embedding matplotlib, which is now build with the MSVC9 patch,
stopped working.

--

___
Python tracker 

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



[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Prelude has had the same problem with signal 32:
https://dev.prelude-ids.com/issues/show/133
According to their research, it is due to the linuxthreads
implementation of the pthread API.

To know which threads implementation your glibc is using, you can run
"getconf GNU_LIBPTHREAD_VERSION" (on a modern system, it should print
something like "NPTL 2.9").

(of course, the question is, since the signal is used by linuxthreads,
why doesn't it get caught instead of killing the process?)

--
nosy: +pitrou

___
Python tracker 

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



[issue7211] select module - kevent ident field 64 bit issue

2009-10-29 Thread Michael Broghton

Michael Broghton  added the comment:

Antoine, thanks for the tips and the example. I have updated the patch.

I checked and this does apply cleanly to py3k.

--
Added file: http://bugs.python.org/file15228/kevent.patch

___
Python tracker 

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



[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Sridhar, Neal, I would advocate disabling (commenting out)
test_closerange in Lib/test/test_os.py and see what happens.

That's the one really dirty test in test_os, it might close a file
handle linuxthreads is relying on.

--

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-29 Thread Koen van de Sande

Koen van de Sande  added the comment:

The MinGW breakage probably comes from the same "issue" as encountered
in http://bugs.python.org/issue4120#msg80908 and #msg80909: the main
application, which embeds Matplotlib, does not have a manifest for the
MSVCR9 runtimes? That's a problem which should be addressed by adding a
manifest in the main application (and manifests can also be separate
files called app.exe.manifest if you do not want to embed it).

--

___
Python tracker 

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



[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Forget the last comment, test_closerange is fine...

--

___
Python tracker 

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



[issue7237] Syntax error with not

2009-10-29 Thread David W. Lambert

New submission from David W. Lambert :

lambertdw$ p3
Python 3.1.1 (r311:74480, Oct  2 2009, 12:29:57) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> not 23
False
>>> not(23&1)
False
>>> 1+not(23&1)
  File "", line 1
1+not(23&1)
^
SyntaxError: invalid syntax
>>>

--
components: Interpreter Core
messages: 94675
nosy: LambertDW
severity: normal
status: open
title: Syntax error with not
type: compile error
versions: Python 3.1

___
Python tracker 

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



[issue7211] select module - kevent ident field 64 bit issue

2009-10-29 Thread Eric Smith

Eric Smith  added the comment:

The patch (http://bugs.python.org/file15228/kevent.patch) works for me
under OS X 10.5.8 Intel.

All tests pass, except test_telnetlib which fails intermittently with
and without the patch.

Python 3.2a0 (py3k:75951, Oct 29 2009, 11:38:58) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin

--
nosy: +eric.smith

___
Python tracker 

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



[issue7237] Syntax error with not

2009-10-29 Thread David W. Lambert

David W. Lambert  added the comment:

problem also exists in 2.6.
It's a, in my humble opinion, release blocker.

--
type: compile error -> behavior

___
Python tracker 

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



[issue5582] Incorrect DST transition

2009-10-29 Thread acummings

acummings  added the comment:

The same thing happens with the autumn transition.  Windows knows the 
transition has changed, but python does not seem to know that:

The following interactive session was run on Oct 29th, at 10:02 (Windows 
clock reported 10:02):

>>> july1 = datetime(2009, 7, 1)
>>> jan1 = datetime(2009, 1,1)
>>> oct30 = datetime(2009, 10, 30)
>>> time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
>>> time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
>>> time.localtime(time.mktime(oct30.timetuple()))
(2009, 10, 30, 0, 0, 0, 4, 303, 0)
>>> time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 10, 29, 9, 2, 38, 3, 302, 0)

Again, the 9th element of the timetuple is 1 for July 1st, 0 for Jan 
1st, and **0** for Oct 30th and Oct 29th. Also, the time reported by 
datetime.now() was 9:02, one hour behind.

--
title: Incorrect DST transition on Windows -> Incorrect DST transition

___
Python tracker 

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



[issue7237] Syntax error with not

2009-10-29 Thread R. David Murray

R. David Murray  added the comment:

>>> 1+not
  File "", line 1
1+not
^
SyntaxError: invalid syntax
>>> 1+(not(23&1))
1

It's been this way since 2.4 at least, probably earlier.

--
nosy: +r.david.murray
priority:  -> normal
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7237] Syntax error with not

2009-10-29 Thread Eric Smith

Eric Smith  added the comment:

I'm not sure what release it would be blocking. The oldest version I
have on hand is 2.4, and it's a problem there. If it hasn't caused an
actual problem in that long, then I don't see it as all that critical.

--
nosy: +eric.smith

___
Python tracker 

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



[issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it

2009-10-29 Thread Mark Florisson

New submission from Mark Florisson :

As you can see, when a local trace function sets f_lineno, f_lineno 
doesn't get updated on subsequent lines. Otherwise it works fine.
$ python tracer_testcase.py 
 
12
12
12

13
14
15

The reference manual (for python 2.6) states the following: "f_lineno is 
the current line number of the frame — writing to this from within a 
trace function jumps to the given line (only for the bottom-most frame). 
A debugger can implement a Jump command (aka Set Next Statement) by 
writing to f_lineno.". This is contradictory with the shown results, 
because apparently it doesn't always represent the current line number.

--
components: Interpreter Core
files: tracer_testcase.py
messages: 94681
nosy: eggy
severity: normal
status: open
title: frame.f_lineno doesn't get updated after local trace function assigned 
to it
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 
3.1, Python 3.2
Added file: http://bugs.python.org/file15229/tracer_testcase.py

___
Python tracker 

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



[issue7239] Error when running a code

2009-10-29 Thread MN

New submission from MN :

Process: Python [12980]
Path:   
/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Identifier:  org.python.python
Version: 2.6.4 (2.6.4)
Code Type:   X86 (Native)
Parent Process:  Python [12768]

Date/Time:   2009-10-29 18:54:32.502 +
OS Version:  Mac OS X 10.6.1 (10B504)
Report Version:  6

Interval Since Last Report:  67916 sec
Crashes Since Last Report:   8
Per-App Interval Since Last Report:  10 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:  2FD60074-C28B-48E1-AB01-5A5B2E3B28D3

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x, 0x
Crashed Thread:  4

Application Specific Information:
abort() called

Thread 0:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib   0x948df822 semaphore_wait_signal_trap
+ 10
1   libSystem.B.dylib   0x9490d3d8 _pthread_cond_wait + 1089
2   libSystem.B.dylib   0x9495670f pthread_cond_wait + 48
3   org.python.python   0x000f6a1c PyThread_acquire_lock + 172
4   org.python.python   0x000fb473 lock_PyThread_acquire_lock
+ 83
5   org.python.python   0x000c0165 PyEval_EvalFrameEx + 19429
6   org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
7   org.python.python   0x000c034c PyEval_EvalFrameEx + 19916
8   org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
9   org.python.python   0x000c034c PyEval_EvalFrameEx + 19916
10  org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
11  org.python.python   0x000c034c PyEval_EvalFrameEx + 19916
12  org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
13  org.python.python   0x0003f746 function_call + 166
14  org.python.python   0xed35 PyObject_Call + 85
15  org.python.python   0x00020b36 instancemethod_call + 422
16  org.python.python   0xed35 PyObject_Call + 85
17  org.python.python   0x000ba5be
PyEval_CallObjectWithKeywords + 78
18  org.python.python   0x00023a02 PyInstance_New + 114
19  org.python.python   0xed35 PyObject_Call + 85
20  org.python.python   0x000beab7 PyEval_EvalFrameEx + 13623
21  org.python.python   0x000c0ae6 PyEval_EvalFrameEx + 21862
22  org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
23  org.python.python   0x000c0a25 PyEval_EvalFrameEx + 21669
24  org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
25  org.python.python   0x0003f746 function_call + 166
26  org.python.python   0xed35 PyObject_Call + 85
27  org.python.python   0x000bdf2c PyEval_EvalFrameEx + 10668
28  org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
29  org.python.python   0x000c034c PyEval_EvalFrameEx + 19916
30  org.python.python   0x000c22dd PyEval_EvalCodeEx + 2109
31  org.python.python   0x000c23f7 PyEval_EvalCode + 87
32  org.python.python   0x000e888f PyRun_StringFlags + 287
33  org.python.python   0x000e898e PyRun_SimpleStringFlags + 78
34  org.python.python   0x000f929e Py_Main + 1486
35  org.python.python   0x1f82 0x1000 + 3970
36  org.python.python   0x1ea9 0x1000 + 3753

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib   0x9490603a kevent + 10
1   libSystem.B.dylib   0x94906768 _dispatch_mgr_invoke + 215
2   libSystem.B.dylib   0x94905bf9 _dispatch_queue_invoke + 183
3   libSystem.B.dylib   0x9490598a _dispatch_worker_thread2 + 
234
4   libSystem.B.dylib   0x94905401 _pthread_wqthread + 390
5   libSystem.B.dylib   0x94905246 start_wqthread + 30

Thread 2:
0   libSystem.B.dylib   0x94905092 __workq_kernreturn + 10
1   libSystem.B.dylib   0x94905628 _pthread_wqthread + 941
2   libSystem.B.dylib   0x94905246 start_wqthread + 30

Thread 3:
0   libSystem.B.dylib   0x948df822 semaphore_wait_signal_trap
+ 10
1   libSystem.B.dylib   0x9490d3d8 _pthread_cond_wait + 1089
2   libSystem.B.dylib   0x9495670f pthread_cond_wait + 48
3   org.python.python   0x000f6a1c PyThread_acquire_lock + 172
4   org.python.python   0x000ba2e3 PyEval_RestoreThread + 67
5   select.so   0x007dd6ea select_select + 490
6   org.python.python   0x000c0165 PyEval_EvalFrameEx + 19429
7   org.python.python   0x000c0ae6 PyEval_Ev

[issue7208] Getpass echo's password to screen on 2.6, but not on 2.5 or 3.1

2009-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gps

___
Python tracker 

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



[issue3488] Provide compress/uncompress functions on the gzip module

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch lacks a documentation update, though.
(see Doc/library/gzip.rst)

--

___
Python tracker 

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



[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch preallocating a freelist of MemoryErrors.

To Alexandre: yes, PyExc_RecursionErrorInst probably has the same problem.

--
versions: +Python 3.2 -Python 3.0
Added file: http://bugs.python.org/file15230/memerror.patch

___
Python tracker 

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



[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2009-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file13262/issue5437.patch

___
Python tracker 

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



[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2009-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue7239] Error when running a code

2009-10-29 Thread MN

MN  added the comment:

graphics.py incompatible with snow leo

--
status: open -> closed

___
Python tracker 

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



[issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1

2009-10-29 Thread Roumen Petrov

Roumen Petrov  added the comment:

Only about LDFLAGS.
The python build system evolve and executable and libraries are build
with LDFLAGS as is. So except passing LDFLAGS to setup.py rest of Bob
Atkins patch is in the makefile.

As part of issue 4010 I post a patch "py-issue-4010.patch" (thanks to
John P. Speno that point for quote of LDFLAGS), i.e. same as Bob patch.
The rest of "py-issue-4010.patch" is clean up of configure.in (avoid 
options doubling on BSD based plaforms) and setup.py scripts.

--

___
Python tracker 

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



[issue5872] New C API for declaring Python types

2009-10-29 Thread Larry Hastings

Larry Hastings  added the comment:

Antoine: As the patch matured I would obviously provide documentation
and examples and such.  The point of submitting the patch in this form
was a) so it was alive somewhere besides my hard drive, and b) to get
some public review from the core team to ensure I was going in a valid
direction.

As for mandatory vs purity: The whole purpose of the patch was to make
PyTypeObject a private type; see "THE PROBLEM" / "THE SOLUTION".  This
requires that all the public interfaces take pointers.  So within the
context of what the patch is trying to accomplish, it's mandatory.

The patch attempts to mitigate this as much as possible with the
backwards-compatibility 

p.s. By "huge" I suspect you mean "large", though on first reading I
thought you meant "fabulous".  That's what I get for working with a big
crew of 20-somethings.

p.p.s. Did this patch get mentioned recently or something?  After months
of inactivity, there have been two nosy+ this week.

p.p.p.s. I have not touched this patch since submitting it.  The
tribulations of working at a startup.

--

___
Python tracker 

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



[issue5872] New C API for declaring Python types

2009-10-29 Thread Larry Hastings

Larry Hastings  added the comment:

Whoops!  I think I'll finish that unfinished sentence.

"The patch attempts to mitigate this as much as possible with the
backwards-compatibility" 

header file; it minimizes as much as possible the changes you need to
perform to get your code up and working again.  But I fear I've taken
that concept about as far as it makes sense to go.

--

___
Python tracker 

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



[issue5872] New C API for declaring Python types

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> As the patch matured I would obviously provide documentation
> and examples and such.

What I meant is that it's difficult for me (and perhaps others) to
assess how much more practical your patch makes it to create C types.

> This
> requires that all the public interfaces take pointers.  So within the
> context of what the patch is trying to accomplish, it's mandatory.

Hmm. That public interfaces take pointers is one thing, but that doesn't
mean the PyTypeObject structure itself must be concealed. It could be
exposed as an implementation detail.

Please note that your approach will make it difficult for third-party C
extensions to remain compatible accross several Python versions (those
before and after the API switch). While we sometimes change or deprecate
APIs, we never do it as massively as that (even the 2.x -> 3.x
transition is quite gentle).

> p.s. By "huge" I suspect you mean "large", though on first reading I
> thought you meant "fabulous".  That's what I get for working with a big
> crew of 20-somethings.

I meant "large" indeed :)

> p.p.s. Did this patch get mentioned recently or something?  After months
> of inactivity, there have been two nosy+ this week.

Well, a nosy+ bumps up the issue at the top of the recently modified
issues, which means other people notice it as well.

--

___
Python tracker 

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



[issue5582] Incorrect DST transition

2009-10-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Could you try to confirm with at least Python 2.6? We don't do any bug
fixes on 2.5 anymore.

--
components: +Library (Lib)
nosy: +pitrou, tim_one
priority:  -> normal
stage:  -> needs patch
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

___
Python tracker 

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



[issue7237] Syntax error with not

2009-10-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I believe this is actually correct. not does not bind its operand as
powerfully as + does. Thus the parser sees (1 + not) x, which is quite
correctly a syntax error.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue7232] Support of 'with' statement fo TarFile class

2009-10-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal
stage:  -> patch review
versions: +Python 3.2

___
Python tracker 

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



[issue7210] Proposed Syntax Checks in Test Suite

2009-10-29 Thread Chuck Rhode

Changes by Chuck Rhode :


Removed file: http://bugs.python.org/file15213/test_grammar.patch

___
Python tracker 

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



[issue7210] Proposed Syntax Checks in Test Suite

2009-10-29 Thread Chuck Rhode

Chuck Rhode  added the comment:

Sorry I'm having so much trouble with this patch.  Here's another. 
Thanks for your patience.  -ccr-

--
Added file: http://bugs.python.org/file15231/test_grammar.patch

___
Python tracker 

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



[issue3488] Provide compress/uncompress functions on the gzip module

2009-10-29 Thread Anand B Pillai

Anand B Pillai  added the comment:

Ok, I will add this.

--

___
Python tracker 

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



[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1

2009-10-29 Thread Peter Gibson

New submission from Peter Gibson :

subprocess.Popen.stdout.flush() fails on OS-X 10.6.1 under the bundled
Python 2.6.1 and 2.6.3 from Macports.

>>> from subprocess import Popen, PIPE
>>> p = Popen('cat', stdin=PIPE, stdout=PIPE)
>>> p.stdout.flush()
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 9] Bad file descriptor

However it works on Python 2.6.2 on Linux.

--
components: Library (Lib)
messages: 94694
nosy: petegibson
severity: normal
status: open
title: subprocess.Popen.stdout.flush fails os OS-X 10.6.1
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1

2009-10-29 Thread Philip Jenvey

Philip Jenvey  added the comment:

Why are you flushing stdout? It's read-only and flush is for writing. This 
behavior is dependent on the underlying platform's fflush, which really 
*should* be raising EBADF when fflushing a read only file, anyway

--
nosy: +pjenvey

___
Python tracker 

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



[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1

2009-10-29 Thread Ned Deily

Ned Deily  added the comment:

Philip is correct:

>>> p.stdout.flush()
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 9] Bad file descriptor
>>> p.stdout
', mode 'rb' at 0x100527470>

You'll get the same error on OS X (at least as far back as Python 2.3.5 
on OS X 10.4) if you try to flush a disk read-only file:

>>> f = open('a.txt', 'rb')
>>> f.flush()
Traceback (most recent call last):
  File "", line 1, in ?
IOError: [Errno 9] Bad file descriptor

Note, both the OS X and Linux 2.6 fflush(3) man pages clearly state that 
EBADF can be returned if the stream is not open for writing but there 
seems to be a difference in behavior between the two OS's.

As this doesn't seem to be a new issue and can easily be avoided (don't 
flush a read-only file), I suggest closing the issue.

--
assignee:  -> ronaldoussoren
components: +Macintosh
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue7241] tkinter fails to import

2009-10-29 Thread Jebagnanadasa

New submission from Jebagnanadasa :

import _tkinter # If this fails your Python may not be configured for Tk

I'm using python3 in linux. In windows tkinter is working fine but in
mandriva linux spring 2009 it fails to import. Can you please tell me
step-by-step on how to fix this issue? In python3.1 home page the
description is not clear or it can't be understood by the beginner. As
i'm a beginner for programming python in linux please help me out. I
want to know what is the thing i missed during installation. I've done
the things correctly as mentioned in the python readme text inside the
python3.1 tarball file. While searching the net i found out that if i
want to fix this issue i've to uninstall and install it again. what
should i do now?

--
components: Tkinter
messages: 94697
nosy: python.noob
severity: normal
status: open
title: tkinter fails to import
type: resource usage
versions: Python 3.1

___
Python tracker 

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