Andrew McNabb amcn...@mcnabbs.org added the comment:
I think that optparse is doing the right thing here. I think that your code
example should be changed to:
import optparse
parser = optparse.OptionParser()
parser.add_option(-o, --option, action = append)
options, args
New submission from Andrew McNabb amcn...@mcnabbs.org:
I was trying to open stdin in binary mode and ran the following:
RawIOBase(sys.stdin.fileno()).read()
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'RawIOBase' object has no attribute 'readinto'
I
New submission from Andrew McNabb amcn...@mcnabbs.org:
The following snippet behaves differently in the C IO implementation than in
the Python IO implementation:
import sys
sys.stdout.write('unicode ')
sys.stdout.buffer.write(b'bytes ')
To test this, I have created two scripts
Andrew McNabb amcn...@mcnabbs.org added the comment:
This seems like a common need (particularly for stdout and stderr), and setting
`stdout._CHUNK_SIZE = 1` is relying on an implementation detail.
1) Can the documentation for TextIOWrapper be updated to clearly describe this
extra buffering
Andrew McNabb amcn...@mcnabbs.org added the comment:
I would imagine that this would come up in most programs that read data from a
pipe or from a socket (which are binary data) and then output to stdout or
stderr. I ran across the problem in my first non-trivial port to Python 3
Andrew McNabb amcn...@mcnabbs.org added the comment:
I'm seeing something very similar to this. In my case, I have a
single-threaded program, and select fails to be interrupted by SIGCHLD. I'm
still tracking down more details, so I'll report back if I find more
information.
--
nosy
Andrew McNabb amcn...@mcnabbs.org added the comment:
Sorry for the noise. It turns out that my problem was unrelated.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5315
New submission from Andrew McNabb amcn...@mcnabbs.org:
The What's New documentation for Python 3.0 and 3.1 have sections called
Porting to Python 3.0. It would be great to add a link to the Python wiki
page about porting Python to Python 3:
http://wiki.python.org/moin/PortingPythonToPy3k
Andrew McNabb amcn...@mcnabbs.org added the comment:
What advice in particular do you consider bad? I would be happy to submit some
changes to the wiki page for anything that's wrong.
I think it would be great to have a reviewed version in the documentation
directly, but I think the world
Andrew McNabb amcn...@mcnabbs.org added the comment:
By the way, I just noticed your notes on the wiki page and added a
response/question. It seems that the advice that you consider bad is the
official porting story (upgrade to 2.6 and use 2to3). I agree that it's easier
and better
Andrew McNabb amcn...@mcnabbs.org added the comment:
Thanks for your advice. I just signed up for the python-porting list, and I'll
start a discussion there.
I'm trying to improve the wiki page to address your concerns. There are
multiple valid approaches to take, and I'm trying to make
Andrew McNabb amcn...@mcnabbs.org added the comment:
I ran into this problem, too. It took me a long time to track down the
segfaults. It's really bad to pass in None and have the system pick
some random address instead of 0.
I looked at the attached patch, and it seems to me the only
Andrew McNabb amcn...@mcnabbs.org added the comment:
On Thu, Jul 30, 2009 at 07:14:56PM +, Thomas Heller wrote:
Thanks for bringing my attention to this problem again, and for the review.
I'm just glad to help.
The problem is that the patch changes the behaviour of the
'POINTER
New submission from Andrew McNabb amcn...@mcnabbs.org:
The stream encoder for the zlib_codec doesn't use the incremental encoder, so
it has limited usefulness in practice. This is easiest to show with an example.
Here is the behavior with the stream encoder:
filelike = io.BytesIO()
wrapped
Changes by Andrew McNabb amcn...@mcnabbs.org:
--
nosy: +amcnabb
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14191
___
___
Python-bugs-list
Changes by Andrew McNabb amcn...@mcnabbs.org:
--
nosy: +amcnabb
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15258
___
___
Python-bugs-list
Andrew McNabb amcn...@mcnabbs.org added the comment:
Andrew, are you still with us?
I'm here, but it's been a busy few weeks. I'll see if I can spend some time on
this today.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Andrew McNabb amcn...@mcnabbs.org added the comment:
Some interesting information. If I do `os.mkdir('/net/prodigy/tmp')`, it gives
OSError: [Errno 13] Permission denied: '/net/prodigy/tmp'. However, if I
instead do `os.mkdir('/net/prodigy/tmp/hi')`, it succeeds. (Note that I'm being
careful
Changes by Andrew McNabb amcn...@mcnabbs.org:
Added file: http://bugs.python.org/file25611/mkdir-p.out
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14702
Changes by Andrew McNabb amcn...@mcnabbs.org:
Added file: http://bugs.python.org/file25612/makedirs.out
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14702
Andrew McNabb amcn...@mcnabbs.org added the comment:
This isn't fixed. All of the examples I've given were with a 3.3.0 kernel.
Doing a stat would be a fix.
--
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Andrew McNabb amcn...@mcnabbs.org added the comment:
Hmm. Maybe there's a difference between doing stat('/net/prodigy') vs.
stat('/net/prodigy/tmp'). Just a guess, but maybe the former can succeed before
the mount completes, but the latter has to wait for the mount to complete
Andrew McNabb amcn...@mcnabbs.org added the comment:
By the way, if my hunch about the difference in stat of '/net/prodigy' vs.
'/net/prodigy/tmp' is correct, then this would explain why makedirs on deeper
directories work. Specifically, one of the shallower stat calls would force the
mount
Andrew McNabb amcn...@mcnabbs.org added the comment:
I see no evidence that this is a bug in Linux, and I think it's ridiculous to
close it when a trivial one-line fix is available. I won't reopen it because
it's obvious no one wants to address
Andrew McNabb amcn...@mcnabbs.org added the comment:
I posted a bug report with the kernel here:
https://bugzilla.kernel.org/show_bug.cgi?id=43262
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14702
Andrew McNabb amcn...@mcnabbs.org added the comment:
Which one-line fix do you propose?
Doing a stat(/net/prodigy/tmp) before mkdir(/net/prodigy/tmp) is an
extremely simple workaround.
Of course, I would love to see clear documentation of how the kernel is defined
to behave
Andrew McNabb amcn...@mcnabbs.org added the comment:
Maybe I'm confused, but the presence of /net/prodigy is *not*
the issue here, and what gets mounted is *not* /net/prodigy,
but /net/prodigy/tmp (do mount to confirm or dispute).
No, /net/prodigy is the mountpoint in this case:
amcnabb
Andrew McNabb amcn...@mcnabbs.org added the comment:
It looks like encodings/zlib_codec.py defines a custom IncrementalEncoder and
IncrementalDecoder, but its StreamWriter and StreamReader rely on the standard
implementation of codecs.StreamWriter and codecs.StreamReader.
One solution might
New submission from Andrew McNabb amcn...@mcnabbs.org:
When a os.makedirs is used under an autofs directory, it crashes. For example,
on my machine, `os.makedirs('/net/prodigy/tmp')` crashes with the following
traceback:
Traceback (most recent call last):
...
File /usr/lib64/python2.7
Changes by Andrew McNabb amcn...@mcnabbs.org:
--
nosy: +amcnabb
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9334
___
___
Python-bugs-list
Andrew McNabb added the comment:
The --no-user-cfg option works for me in Python 2.7, but it does not seem to be
in Python 3.2 or 3.3:
error: option --no-user-cfg not recognized
Am I doing something wrong, or was this feature only added to Python 2.7?
--
nosy: +amcnabb
31 matches
Mail list logo