[issue7567] Messed up terminal after calling curses.initscr() twice.

2010-07-26 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

shouldn't `initialised_setupterm' be tested instead?

--
nosy: +doko

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



[issue9381] syntax error in Unicode C API docs

2010-07-26 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r83160.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-26 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
nosy: +dmalcolm

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



[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-07-26 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +ezio.melotti, haypo, lemburg, loewis

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



[issue9382] os.popen referenced but not documented in Python 3.x

2010-07-26 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

(D) in python 3, os.popen has been reimplemented using subprocess.Popen.
So the other mentions of os.popen should probably be replaced with mentions of 
subprocess.Popen.

Your (C) is close...the continued existence of os.popen in Python3 is, I think, 
a bit of a kludge (I wasn't around for the discussion), but a backward 
compatibility one.  I don't know if there is a plan to deprecate it, but I 
suspect not.  On the other hand I certainly wouldn't recommend using it, since 
it does an import inside the function, which can get one into trouble if one 
uses threads.

--
nosy: +r.david.murray

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



[issue9167] argv double encoding on OSX

2010-07-26 Thread Daniele Varrazzo

Daniele Varrazzo p...@develer.com added the comment:

Ronald,

Thank you for the interest. For me trying to deal with such a tricky issue on a 
system whose Best Before date is already passed would be a waste of time.

I was only interested in factor out the bugs in my extension module from the 
ones not under my responsibility and I had the bad luck to find a 10.4 to test 
on. I don't have a direct interest in this bug to be fixed.

Thank you very much again for your time.

--

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



[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

@Thomas: could you provide a unit test to go with your patch.

--
nosy: +BreamoreBoy
stage:  - unit test needed
versions: +Python 3.2 -Python 2.7

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



[issue1813] Codec lookup failing under turkish locale

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Does anyone know if this was discussed on python-dev?  I've tried searching the 
archives and didn't find anything, but that's not to say it isn't there.

--
nosy: +BreamoreBoy

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



[issue7637] Improve 19.5. xml.dom.minidom doc

2010-07-26 Thread A.M. Kuchling

A.M. Kuchling li...@amk.ca added the comment:

Thanks for the catch; it was intended to be ', avoiding ...'.  Fixed in 
rev83162, along with the sentence simplification you suggest.

--

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



[issue1886] Permit to easily use distutils --formats=tar, gztar, bztar on all systems

2010-07-26 Thread A.M. Kuchling

Changes by A.M. Kuchling li...@amk.ca:


--
assignee: akuchling - 

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



[issue3075] make minidom.toxml() encoding argument useful

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

This is how toprettyxml looks in 3.1/2 which seems to meet the OP's need, I'll 
close in a few days time unless someone objects.

def toprettyxml(self, indent=\t, newl=\n, encoding=None):
# indent = the indentation string to prepend, per level
# newl = the newline string to append
use_encoding = utf-8 if encoding is None else encoding
writer = codecs.getwriter(use_encoding)(io.BytesIO())
if self.nodeType == Node.DOCUMENT_NODE:
# Can pass encoding only to document, to put it into XML header
self.writexml(writer, , indent, newl, encoding)
else:
self.writexml(writer, , indent, newl)
if encoding is None:
return writer.stream.getvalue().decode(use_encoding)
else:
return writer.stream.getvalue()

--
nosy: +BreamoreBoy
status: open - pending

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



[issue1767933] Badly formed XML using etree and utf-16

2010-07-26 Thread Richard Urwin

Richard Urwin soron...@googlemail.com added the comment:

I can't produce an automated test, for want of time, but here is a demonstrator.

Grab the example XHTML from 
http://docs.python.org/library/xml.etree.elementtree.html#elementtree-objects 
or use some tiny ASCII-encoded xml file. Save it as file.xml in the same 
folder as bug-test.py attached here.

Execute bug-test.xml

file.xml is read and then written in UTF-16. The output file is then read and 
dumped to stdout as a byte-stream.

1. To be correct UTF-16, the output should start with 255 254, which should 
never occur in the rest of the file.

2. The rest of the output (including the first line) should alternate zeros 
with ASCII character codes.

3. The file output.xml should be loadable in a UTF16-capable text editor (eg 
jEdit), be recognised as UTF-16 and be identical in terms of content to file.xml

--
nosy: +Richard.Urwin
Added file: http://bugs.python.org/file18211/bug-test.py

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-26 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Oh, I'm sorry, I forgot about that case. 

I agree with Arfrever, we should suppress the OSError only if the target file 
exists as a directory, but not other types. That is, the exist_ok argument in 
makedirs() should mean dir existing is ok, only existing of the exact same 
thing as we specified to create is ok, not other things. I will fixed this 
later. 

Besides, I wonder what should we do if the target directory exists but with a 
different mode than we specified(if we specified the mode argument). I guess 
we should also raise the OSError because the existing thing is not the same as 
what we want.

--

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

There is diff.py utility that is already available from standard Python 
distribution.

--
nosy: +techtonik

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



[issue1767933] Badly formed XML using etree and utf-16

2010-07-26 Thread Richard Urwin

Richard Urwin soron...@googlemail.com added the comment:

 Execute bug-test.xml

I meant bug-test.py, of course

--

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-26 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

Alternatively you could call os.chmod.

--

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



[issue4686] Exceptions in ConfigParser don't set .args

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Patch doesn't apply cleanly to 3.1 or earlier. As it is *arguably* a new 
feature rather than a bugfix I'm closing the issue.

I certainly wouldn't argue against someone else backporting though...

--
stage: commit review - committed/rejected
status: open - closed
versions:  -Python 2.6, Python 2.7, Python 3.1

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

This would change the format of config files that configparser supports. Should 
there be some discussion of this on python-dev first?

The patch for the docs is against the latex docs, so definitely needs updating.

--
nosy: +michael.foord

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



[issue4510] ValueError for list.remove() not very helpful

2010-07-26 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Ugh.  That's a reasonable objection.

What's the best thing to do in this case, generally speaking?

list.index() does print the full repr on a value error; and a quick grep shows 
a number of other similar uses, although those don't seem to be as easy to 
trigger inadvertently.

Should this feature be removed from list.index as well?

--

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



[issue5412] extend configparser to support [] syntax

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

There are no docs or tests in the patch. I like the functionality though and 
doubt it will be controversial. The current api is a bit arcane. So +1 from 
me.

--
nosy: +michael.foord

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



[issue6517] configparser: add possibility to escape formatstrings

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

This should just be applied. I'll do it shortly unless there is an objection.

--
nosy: +michael.foord

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

On Fri, Jul 23, 2010 at 10:24 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:
 I suggest changing

 Use exit() or Ctrl-D (i.e. EOF) to exit

  to

 Type exit() or quit() and press the Enter key to exit

Type exit() or press Ctrl-D to exit.

--
nosy: +techtonik

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

+1 to improving the message and improving the help message too.

--
nosy: +michael.foord

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



[issue6517] configparser: add possibility to escape formatstrings

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

It is (very) unfortunate that configparser.ConfigParser should *not* be used 
and that configparser.SafeConfigParser is the correct class instead.

I would be *in favour* of deprecating ConfigParser and eventually renaming 
SafeConfigParser back to ConfigParser (leaving SafeConfigParser as an alias).

Now that deprecation warnings are silent by default this should be less of an 
issue.

--

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

I don't think we should have a list of three alternatives to the single way you 
really should be creating diffs. If you are working on Python you should have 
Subversion and run svn diff, or have Mercurual and run hg diff.

I guess I'm -0 on this idea. I also don't even know where the dev/faq page is 
located in SVN to make any potential change.

--
nosy: +brian.curtin

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

The better way would be
 python -m easy_install review
 python -m review

--

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Until Rietveld has a defined place in our workflow, I don't think that's a good 
idea.

I think that will be a part of the process in the future, but we're not 
defining that here.

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 26, 2010 at 9:48 AM, anatoly techtonik
rep...@bugs.python.org wrote:
..
 Type exit() or press Ctrl-D to exit.

Anatoly,

I think you missed the point of the story that I posted.  The young
user, who was not completely new to computers, by the way, was not
familiar with Ctrl  abbreviation and there was no key marked that
way on his keyboard.

--

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-07-26 Thread Dirk Jülich

Dirk Jülich mucisl...@web.de added the comment:

Applies also to Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 
bit (Intel)] on win32.

--
nosy: +mucisland
versions: +Python 2.6

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

1) I'm with Michael on this one.
2) Python is not responsible for dotting every i and crossing every t for a 
computer novice.  What would the novice make of my HP keyboard which doesn't 
have keys marked RETURN or BS, they both have symbols.  There isn't an ANY key 
on the keyboard either! :)

--

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



[issue6517] configparser: add possibility to escape formatstrings

2010-07-26 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

You are right, IMO, at least the current doc patch should be applied.  Please 
go ahead, if you want to, I won't have time to get to it for a couple of days.

Maybe you could come up with a new title for this issue that reflects the 
concerns being addressed here...

--
assignee: r.david.murray - 

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

I believe that the switch to mercurial is months if not years away, so I'd 
quite happily see just a reference to svn diff.  Failing that I wouldn't loose 
any sleep over closing this, ok to leave it with you Brian?

--

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



[issue9383] PIL Bug with split

2010-07-26 Thread Arrnaud Fabre

New submission from Arrnaud Fabre arnaud...@gmail.com:

 import Image
 im = Image.open('whatever')
 im.split()
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.6/dist-packages/PIL/Image.py, line 1497, in split
if self.im.bands == 1:
AttributeError: 'NoneType' object has no attribute 'bands'

Bug can be fixed by using getdata before split() :

 import Image
 im = Image.open('whatever')
 im.getdata()
ImagingCore object at 0x7fad913c0090
 im.split()
(Image.Image image mode=L size=360x480 at 0x1CAE320, Image.Image image 
mode=L size=360x480 at 0x1CAE368, Image.Image image mode=L size=360x480 at 
0x1CAE3B0)

--
messages: 111630
nosy: Arrnaud.Fabre
priority: normal
severity: normal
status: open
title: PIL Bug with split
type: crash
versions: Python 2.7

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



[issue1767933] Badly formed XML using etree and utf-16

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

@Florent: is this something you could pick up, I think it's out of my league.

--

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

 Brian Curtin cur...@acm.org added the comment:

 Until Rietveld has a defined place in our workflow, I don't think that's a 
 good idea.

1. AFAIK Python don't have any workflow. Do you speak about your own workflow?
2. What conditions should become True for you to think that's a good
idea? I.e. fill the blanks:
if ... and ... and ...:
  debug(Rietveld has a defined place in out workflow)
  good_idea = True

--

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



[issue9383] PIL Bug with split

2010-07-26 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

You should report this on the PIL bug tracker. PIL is not part of the Python 
standard library.

--
nosy: +ezio.melotti
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
type: crash - behavior

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



[issue9376] Refer to gnuwin32 diff util on development FAQ

2010-07-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

svn diff is already explained a few times in the doc, including the line 
above the suggested change.

--
resolution:  - rejected
stage:  - committed/rejected
status: open - closed

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



[issue1767933] Badly formed XML using etree and utf-16

2010-07-26 Thread Richard Urwin

Richard Urwin soron...@googlemail.com added the comment:

As an example, here is the first two lines of output when I use Python 2.6.3:
60 63 120 109 108 32 118 101 114 115 105 111 110 61 39 49 46 48 39 32 101 110 
99 111 100 105 110 103 61 39 85 84 70 45 49 54 39 63 62 10
60 255 254 104 0 116 0 109 0 108 0 62 255 254 10

Note:
No 255 254 at the start of the file, but several within it.
No zeros interspersing the first line and the odd one missing thereafter.

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 26, 2010 at 10:50 AM, Mark Lawrence rep...@bugs.python.org wrote:
..
 2) Python is not responsible for dotting every i and crossing every t for a 
 computer novice.

Yes, but it is not responsible for teaching a novice more than one way
to exit the interpreter right off the bat.Note that the
Ctrl-D/Ctrl-Z recommendation has a long history from the time when
there was no exit/quit object defined in the default site.py and the
alternative to the magic key-press was an unwieldy raise SystemExit.

Note the following bug report from IDLEfork project:

http://sourceforge.net/tracker/?func=detailatid=109579aid=69group_id=9579

Apparently, some IDEs may want to rebind Ctrl-Z form EOF to (in this
case) undo action.  This is quite reasonable, but it makes the exit
hint misleading.  There are many reasons outside of python control for
EOF to be bound to the keys other than Ctrl-Z/D.   The current logic
in site.py that makes a choice based on the filepath separator
character is quite fragile:

if os.sep == ':':
eof = 'Cmd-Q'
elif os.sep == '\\':
eof = 'Ctrl-Z plus Return'
else:
eof = 'Ctrl-D (i.e. EOF)'

  What would the novice make of my HP keyboard which doesn't have keys marked 
 RETURN or BS,
 they both have symbols.

There is very little you can do at the command prompt without knowing
where your enter key is.  In fact, you will not even see the hint in
question if you don't press enter after typing exit.   On the other
hand, you can get quite far without using control key and if it is
marked control or a national equivalent on your keyboard, you may
not know the ctrl abbreviation for quite some time.  Note that my last
alternative, Use exit() to exit or Enter exit() to exit  does not
require knowing how the enter key is called.  The user just need to
know the means of entering commands and he or she must know this
before seeing the exit hint anyways.

  There isn't an ANY key on the keyboard either! :)

Right.  And computer industry would save loads of money in support
calls if they instructed users to press the space bar instead. :-)

--

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



[issue6517] Emphasising in the docs configparser.SafeConfigParser over ConfigParser

2010-07-26 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Note that the patch doesn't apply cleanly. Łukasz Langa is going to update it.

There is still discussion as to whether we should *also* deprecate ConfigParser 
(well - PendingDeprecation in 3.2, Deprecation in 3.3 and in 3.4 making 
ConfigParser an alias for SafeConfigParser).

--
title: configparser: add possibility to escape formatstrings - Emphasising in 
the docs configparser.SafeConfigParser over ConfigParser

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Could we (easily) add a third line at startup that says how to quit?

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 26, 2010 at 11:45 AM, Mark Lawrence rep...@bugs.python.org wrote:

 Mark Lawrence breamore...@yahoo.co.uk added the comment:

 Could we (easily) add a third line at startup that says how to quit?

+1

Alternatively, we can add the second line to help output:

Type help() for interactive help, or help(object) for help about object.
Type exit() to exit python.

--

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



[issue7742] please avoid 'which' in Modules/ld_so_aix

2010-07-26 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

On 2010-07-22, at 11:56 AM, Stefan Krah wrote:

 
 Stefan Krah stefan-use...@bytereef.org added the comment:
 
 I'm not sure this should be changed:
 
  1) Why is .cshrc sourced? It should only get sourced for a login
 shell.

/usr/bin/which is a csh script on our AIX machine too:

bash-2.04$ head -n 5 /usr/bin/which
#!/usr/bin/csh -f
set prompt = % 
if ( -f ~/.cshrc) then
source ~/.cshrc
endif

  2) If the user sets a PATH that excludes the compiler, then `which`
 will also not find the compiler on other systems (like Linux).
 Why would anyone set a PATH that excludes the compiler?
 
 
 Sridhar, has this ever been a problem for you on AIX?

Not at all, we use bash as the default shell.

--

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



[issue9384] Tkinter windows pop under the terminal in OSX

2010-07-26 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

I believe any Tkinter app will exhibit the same behavior, but I discovered this 
with idle and verified with wish.py:


$ ./python.exe Demo/tkinter/guido/wish.py 
% quit
Traceback (most recent call last):
  File Demo/tkinter/guido/wish.py, line 22, in module
if tk.getboolean(tk.call('info', 'complete', cmd)):
_tkinter.TclError: expected boolean value but got 


Note that the Traceback above is probably due to another bug.

If you start wish.py from a terminal covering the top left corner of the 
screen, the wish window will appear under the terminal window.

--
assignee: ronaldoussoren
components: IDLE, Macintosh, Tkinter
messages: 111641
nosy: belopolsky, ronaldoussoren
priority: normal
severity: normal
status: open
title: Tkinter windows pop under the terminal in OSX
type: behavior

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



[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2010-07-26 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

#7139 has been closed as duplicate of this and contains a few messages that 
might be worth reading.

--
nosy: +effbot, ezio.melotti, moriyoshi

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-26 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Does 'regex' implement default word boundaries (see #7255)?

--

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



[issue9385] python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module

2010-07-26 Thread Radoslaw Madej

New submission from Radoslaw Madej radeg...@o2.pl:

Hi,

Python ctypes module creates a 'rwx' memory mapping (defined in 
malloc_closure.c) which causes python to crash when running under grsecurity 
enabled kernel and could also have a negative security impact. 

Is there any specific need for the mmap call to create an executable mapping or 
can it be safely removed? 

Please refer here for more information and proposed patch:
http://bugs.gentoo.org/show_bug.cgi?id=329499

The actual mmap call:
item = (ITEM *)mmap(NULL,
count * sizeof(ITEM),
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS,
-1,
0);

There has been further investigation done by Gentoo users and work towards 
python handling this error gracefully rather than segfaulting. It seems that 
dereference at Py_XDECREF(self-restype); (line 23 of 
Modules/_ctypes/callbacks.c) causes the segfault.

Thanks.

--
assignee: theller
components: ctypes
messages: 111644
nosy: radegand532, theller
priority: normal
severity: normal
status: open
title: python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module
type: security
versions: Python 2.6, Python 3.2

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



[issue9385] python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module

2010-07-26 Thread Radoslaw Madej

Radoslaw Madej radeg...@o2.pl added the comment:

segfault info:
# grep 65725f6b /var/log/grsec.log
#
Jul 27 00:58:53 [kernel] grsec: Segmentation fault occurred at 65725f6b in 
/home/root/syschroot/usr/bin/python2.6[python2.6:23877] uid/euid:0/0 
gid/egid:0/0, parent /home/root/syschroot/bin/bash[bash:25516] uid/euid:0/0 
gid/egid:0/0

--

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



[issue7077] SysLogHandler can't handle Unicode

2010-07-26 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

There is indeed a problem with the patch: the BOM is put in front of the angle 
brackets indicating the priority/facility, so the syslog can't find it anymore. 
 The BOM should be put after the brackets.

--
nosy: +georg.brandl
status: closed - open

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



[issue9385] python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module

2010-07-26 Thread Pavel Labushev

Pavel Labushev p.labus...@gmail.com added the comment:

Note that the removing of PROT_EXEC flag doesn't break any ctypes test.

--
nosy: +Arach

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



[issue9268] Add annotation option to pickletools.dis

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Reopening as a documentation issue:

- manual entry should have a versionchanged
- use *arg* instead of 'arg'
- add a ReST entry describing -m pickletools

--
components: +Documentation
nosy: +ezio.melotti
status: closed - open

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



[issue9386] Bad indentation in urllib import fixer with multipe imports

2010-07-26 Thread Dave Malcolm

New submission from Dave Malcolm dmalc...@redhat.com:

Running 2to3 on lxml-2.2.6 failed with broken indentation.

This fragment from lxml/html/__init__.py:
 def open_http_urllib(method, url, values):
 ## FIXME: should test that it's not a relative URL or something
 try:
from urllib import urlencode, urlopen
 except ImportError: # Python 3

became:
 def open_http_urllib(method, url, values):
 ## FIXME: should test that it's not a relative URL or something
 try:
 from urllib.parse import urlencode
 from urllib.request import urlopen
 except ImportError: # Python 3

which is syntactically invalid: note the invalid indentation for the second 
import line.

Seems to work when there's a single name imported per line; fails when more 
than one name is imported from urlib.


Am attaching a patch to test_fixers (for the 2.7 branch) which adds a 
reproducer.  I don't have a fix.

test test_lib2to3 failed -- Traceback (most recent call last):
  File 
/home/david/coding/python-svn/2.7-2to3/Lib/lib2to3/tests/test_fixers.py, line 
1858, in test_import_indentation
self.check(b, a)
  File 
/home/david/coding/python-svn/2.7-2to3/Lib/lib2to3/tests/test_fixers.py, line 
37, in check
tree = self._check(before, after)
  File 
/home/david/coding/python-svn/2.7-2to3/Lib/lib2to3/tests/test_fixers.py, line 
33, in _check
self.assertEqual(after, unicode(tree))
AssertionError: u\ndef foo():\nfrom urllib.parse import urlencode\n
from urllib.parse im [truncated]... != u\ndef foo():\nfrom urllib.parse 
import urlencode\nfrom urllib.request impo [truncated]...
  
  def foo():
  from urllib.parse import urlencode
- from urllib.parse import urlopen
? --  ^
+ from urllib.request import urlopen
?   ^
  print('got here')
  
(Note to self: tracking this downstream in Fedora for lxml as 
https://bugzilla.redhat.com/show_bug.cgi?id=600036 )

--
components: 2to3 (2.x to 3.0 conversion tool)
files: urllib-indentation-issue.patch
keywords: patch
messages: 111649
nosy: dmalcolm
priority: normal
severity: normal
stage: needs patch
status: open
title: Bad indentation in urllib import fixer with multipe imports
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file18212/urllib-indentation-issue.patch

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



[issue9385] _ctypes module uses 'rwx' mmap() calls

2010-07-26 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever
title: python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module - 
_ctypes module uses 'rwx' mmap() calls
versions: +Python 2.7, Python 3.1

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



[issue9315] The trace module lacks unit tests

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 26, 2010 at 12:49 AM, Eli Bendersky rep...@bugs.python.org wrote:
..
 This raises a question: should method names of classes come after the class 
 names when appearing
 in a trace? Intuitively yes, but I want to investigate some more, probably by 
 adding a couple more test
 cases where the traced functions are methods of objects rather than plain 
 functions.


I want to agree, but finding the class name of the method may not be
trivial in 3.x because we don't have unbound methods anymore.   Please
bring this up on python-dev.

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

On Mon, Jul 26, 2010 at 5:32 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:

 I think you missed the point of the story that I posted.  The young
 user, who was not completely new to computers, by the way, was not
 familiar with Ctrl  abbreviation and there was no key marked that
 way on his keyboard.

The stuff that should be explained once in a lifetime to every newborn
software engineer will waste million of braincycles over the world
every time the stuff is read. You need to consider changing the school
program in your region to add practical computer lessons where
chindren are explained all questions they have about computers.
--
anatoly t.

--

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



[issue9386] Bad indentation in urllib import fixer with multiple imports

2010-07-26 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
title: Bad indentation in urllib import fixer with multipe imports - Bad 
indentation in urllib import fixer with multiple imports

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-26 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

No.

Wouldn't that break compatibility with 're'?

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

On Mon, Jul 26, 2010 at 7:03 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:

 Could we (easily) add a third line at startup that says how to quit?

 +1

+1

- Type help, copyright, credits or license for more information.
+ Type help, copyright, credits or license for more
information, exit to quit.

 Alternatively, we can add the second line to help output:

 Type help() for interactive help, or help(object) for help about object.
 Type exit() to exit python.

-0.5 (no beer from me)

BTW, Ctrl-D works on Windows also. No need to maintain system-specific
Ctrl-Z shortcut.

--

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



[issue9387] Make python -m tkinter run tkinter test

2010-07-26 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

Since tkinter is a package, it requires __main__.py in order to be runnable 
using -m option.  Attached tkinter-m.patch fixes this.

--
assignee: belopolsky
components: Tkinter
files: tkinter-m.py
keywords: easy
messages: 111654
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Make python -m tkinter run tkinter test
type: feature request
Added file: http://bugs.python.org/file18213/tkinter-m.py

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



[issue9387] Make python -m tkinter run tkinter test

2010-07-26 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
keywords: +needs review
stage:  - patch review
versions: +Python 3.2

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on 
win32
Type help, copyright, credits or license for more information.
 ^D
  File stdin, line 1
♦
^
SyntaxError: invalid syntax

--
nosy: +brian.curtin

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-26 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs timeho...@users.sourceforge.net added the comment:

What about a regex flag?  Like regex.W or (?w)?

--

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
nosy: +brian.curtin

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

The original patch was of no use because didn't let users specify 
multicharacter delimiters and comment delimiters.

The main goal behind the implementation was making monstrosities like the Samba 
configuration file work. This is why a sample smb.conf is added to the tests as 
to show what is now parsable.

The patch is called issue1682942.diff and is quite big. Georg, Brian, before 
you panic, please note the following: the old test suite with the new code 
works (which means it's by default backwards compatible). 

With a patch of that size it also might just be easier for you to browse the 
patched code and not the patch itself.

The Doc/ part still needs work but after 10 hours of coding I have enough for 
today :)

--
Added file: http://bugs.python.org/file18214/issue1682942.diff

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
nosy: +georg.brandl
Added file: http://bugs.python.org/file18215/cfgparser.2

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



[issue8834] Define order of Misc/ACKS entries

2010-07-26 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

LGTM :)

--
nosy: +lukasz.langa

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



[issue1524825] ConfigParser: accept leading whitespace on options+comments

2010-07-26 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Implemented as part of issue1682942 since it touches the same code. Moreover, 
this issue mentions Samba config parsing in the original comment (msg50719) 
which was not doable without the changes introduced by issue1682942.

So I would supersede this issue with issue1682942. One way or the other, they 
both fly or both go.

Michael, can you close this as superseded?

--
nosy: +lukasz.langa, michael.foord

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



[issue1524825] ConfigParser: accept leading whitespace on options+comments

2010-07-26 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-26 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

That's a possibility.

I must admit that I don't entirely understand it enough to implement it (the OP 
said I don't believe that the algorithm for this is a
whole lot more complicated), and I don't have a need for it myself, but if 
someone would like to provide some code for it, even if it's in the form of a 
function written in Python:

def at_default_word_boundary(text, pos):
...

then I'll see what I can do! :-)

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Something is broken in your 3.1.2 - this is Ctrl-D for me.

{{{
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\~env\Python26python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more information.


C:\~env\Python26
}}}

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Do you have pyreadline installed? If so, that is causing it. If not, it's 
something else as Ctrl-D is not an EOF character on Windows.

--

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



[issue7447] Sum() doc and behavior mismatch

2010-07-26 Thread Leonhard Vogt

Leonhard Vogt leonhard.v...@gmx.ch added the comment:

Thank you.

I think the specific list of list example is better for the sum documentation 
because lists support the + operator. I don't think
that someone would consider using sum for chaining arbitrary iterables.
What about a concise To concatenate lists use itertools.chain.from_iterable. 
and letting the apply list constructor part as an exercise to the reader?

I did the explicit reference to itertools.itertools.chain.from_iterable since 
the default or the explicit link to itertools.chain.from_iterable did not 
produce a correct link in the html docs.
I applied patch3 and ran make html; there is no html link to from_iterable 
produced.

--

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



[issue9387] Make python -m tkinter run tkinter test

2010-07-26 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I lack context: Why is being able to run “python -m tkinter” useful? Tests can 
be run directly or via regrtest, and I recall Guido saying that using modules 
as scripts was an anti-pattern to him, i.e. sometimes useful but not always 
necessary.

--
nosy: +merwok

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



[issue1524825] ConfigParser: accept leading whitespace on options+comments

2010-07-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
superseder:  - ConfigParser support for alt delimiters

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

It appears that `import pyreadline` goes ok. It appears that this lib
is used for unification of console incompatibilities between platform.
Why not to ship it in Python by default?

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

On Jul 26, 2010, at 4:32 PM, anatoly techtonik  
rep...@bugs.python.org wrote:

 Why not to ship it in Python by default?


Because it is under GPL?

--
nosy: +Alexander.Belopolsky

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
nosy:  -brian.curtin

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

c:\py3k\Libpy32
Python 3.2a0 (py3k:83057M, Jul 22 2010, 15:20:27) [MSC v.1500 32 bit (Intel)] 
on win32
Type help, copyright, credits or license for more information.
 ^D
  File stdin, line 1
♦
^
SyntaxError: invalid syntax
[49008 refs]


This to me is getting stupid.  Let's make a decision and move on, there are far 
more pressing issues that need attention.

--

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



[issue3402] test_nis is hanging on Solaris

2010-07-26 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

I'll close this unless someone gives a good reason as to why it should be kept 
open.

--
status: open - pending

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2010-07-26 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

I still disagree. You're giving the parser ambiguous input. If a parser sees 
--foo --bar, and --foo is a valid option, but --bar is not, this is a 
legitimately ambiguous situation. Either the user really wanted --bar, and 
the parser doesn't support it, or the --bar was meant to be the argument to 
the --foo flag. At this point, the parser must make an arbitrary decision, 
and argparse chooses the interpretation that the user wanted the --bar flag.

I understand that you have a good use case for the other interpretation. That's 
why I suggest you come up with a patch that allows this other interpretation to 
be enabled when necessary. Changing the default behavior is really a 
non-starter unless you can propose a sensible transition strategy (as is always 
necessary for changing APIs in backwards incompatible ways).

--

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


Removed file: http://bugs.python.org/file18214/issue1682942.diff

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2010-07-26 Thread Anders Kaseorg

Anders Kaseorg ande...@mit.edu added the comment:

 I still disagree. You're giving the parser ambiguous input. If a
 parser sees --foo --bar, and --foo is a valid option, but --bar
 is not, this is a legitimately ambiguous situation.

There is no ambiguity.  According to the way that every standard option parsing 
library has worked for decades, the parser knows that --foo takes an argument, 
so the string after --foo is in a different grammatical context than options 
are, and is automatically interpreted as an argument to --foo.  (It doesn’t 
matter whether that string begins with a dash, is a valid argument, might 
become a valid argument in some future version, looks like a negative number, 
or any other such condition.)

  arguments = *(positional-argument / option) [-- *(positional-argument)]
  positional-argument = string
  option = foo-option / bar-option
  foo-option = --foo string
  bar-option = --bar

This is just like how variable names in Python are in a different grammatical 
position than keyword argument names, so that Popen(shell) is not confused with 
Popen(shell=True).  This is not ambiguity; it simply follows from the standard 
definition of the grammar.

argparse’s alternative interpretation of that string as another option does not 
make sense because it violates the requirement that --foo has been defined to 
take an argument.

The only justification for considering that input ambiguous is if you start 
assuming that argparse knows better than the user (“the user accidentally 
forgot to type the name of the conf file”) and try to guess what they meant.  
This violates the user’s expectations of how the command line should work.  It 
also creates subtle bugs in scripts that call argparse-based programs (think 
about call([program, --foo, foo_argument]) where foo_argument comes from 
some complex computation or even untrusted network input).

 Changing the default behavior is really a non-starter unless you can
 propose a sensible transition strategy (as is always necessary for
 changing APIs in backwards incompatible ways).

This would not be a backwards incompatible change, since every option that 
previously parsed successfully would also parse in the same way after the fix.

--

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Updated the patch after review by Georg Brandl. This version includes 
documentation updates as well.

--
Added file: http://bugs.python.org/file18216/issue1682942.diff

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



[issue9387] Make python -m tkinter run tkinter demo

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 26, 2010 at 4:16 PM, Éric Araujo rep...@bugs.python.org wrote:
..
 I lack context: Why is being able to run “python -m tkinter” useful?

The missing context is in issue 9384.  I discovered that  python -m
tkinter did not work when I was looking for a simple way to
demonstrate the tkinter pop-under bug.  The demo code was already in
the package but would not run using -m option.

 Tests can be run directly or via regrtest, and I recall Guido saying that 
 using modules as scripts
 was an anti-pattern to him, i.e. sometimes useful but not always necessary.

I have not heard it from Guido, but I agree with one exception.  If
the module contains doctests, it is useful to have doctest run
boilerplate in the file.   While regrtest runs most of the existing
doctests, it does not discover them and there is no option to run
doctests separately from unit tests as far as I know.

Note that tkinter._test() is not really a test, it is a tiny demo
program.  (I am changing the title accordingly.)   I think exposing it
as python -m tkinter would provide one obvious way for users to see if
they have working tkinter and what its widgets look like.

--
title: Make python -m tkinter run tkinter test - Make python -m tkinter run 
tkinter demo

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2010-07-26 Thread Anders Kaseorg

Anders Kaseorg ande...@mit.edu added the comment:

   arguments = *(positional-argument / option) [-- *(positional-argument)]
   positional-argument = string
   option = foo-option / bar-option
   foo-option = --foo string
   bar-option = --bar

Er, obviously positional arguments before the first ‘--’ can’t begin with a 
dash (I don’t think there’s any confusion over how those should work).
  arguments = *(non-dash-positional-argument / option) [-- 
*(positional-argument)]
  non-dash-positional-argument = string not beginning with -
  positional-argument = string

The point was just that the grammar unambiguously allows the argument of --foo 
to be any string.

--

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



[issue9387] Make python -m tkinter run tkinter demo

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

issue9387a.diff includes a note in library/tkinter.rst.  The note can probably 
be improved.

--
keywords: +patch
Added file: http://bugs.python.org/file18217/issue9387a.diff

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



[issue9387] Make python -m tkinter run tkinter demo

2010-07-26 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
resolution:  - accepted
stage: patch review - commit review

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



[issue9384] Tkinter windows pop under the terminal in OSX

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

This is probably Tk issue, but there might me a way that tkinter can work 
around it.   On OSX 10.6, the pre-installed /usr/bin/wish shows the same 
behavior, but mac ports' /opt/local/bin/wish works fine.

--

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I wonder if it would be possible as a part of Demo and Tools clean-up to move 
them into packages under Lib.

I would really like to be able to do

$ python -m demo.turtle

instead of (on a Mac)

$ cd /Applications/Python\ 2.6/Extras/Demo/turtle/
$ python turtleDemo.py

and I still cannot find where Apple decided to put Tools.

--

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

I uploaded the current patch to Rietveld and reviewed it there, CC'ed Łukasz. 
http://codereview.appspot.com/1848051/show is the link.

I only gave the tests a once-over since they failed for not having the test 
file Łukasz meant to include. I'll review those more in depth on the next patch.

--

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-26 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

I feel we do too much things in such a function if we change the mod the target 
directory to the mod we specified. Does anybody feel such behavior maybe 
dangerous? Because if the function success, we know nothing about weather we 
create a new directory or we convert an existing directory to the directory we 
need.

--

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

What does mkdir -p do, which would at least be a starting point?

--

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-26 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

I want to explain mkdir -p as this:

We want to create a specified directory, if such a directory doesn't exist, 
then create it. If such a directory already exists, then we have already 
reached our goal, do nothing.

While we port this function to os.makedir(), there is a more specified 
information of the target directory, the mode. If the target directory 
already exists but with a different mode, we need not create it, but we haven't 
reach our goal, yet. So we can raise a exception.

--

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-26 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
nosy:  -gvanrossum

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-26 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

instead of (on a Mac)

$ cd /Applications/Python\ 2.6/Extras/Demo/turtle/
$ python turtleDemo.py

and I still cannot find where Apple decided to put Tools.

This has nothing to do with Apple.  /Applications/Python x.y is created by 
the python.org OS X installer, not supplied by Apple.  See 
Mac/BuildScript/build-installer.py for the details.  AFAIK, the Tools directory 
is currently not installed by the OS X installer.  Should it be?

--
nosy: +ned.deily

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



[issue9388] locale documentation describes non-existing ERA_YEAR constant

2010-07-26 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

Grepping through the source tree, reveals a single match for ERA_YEAR:

Doc/library/locale.rst:247:   .. data:: ERA_YEAR

Google search for it shows an OpenSolaris bug report that explains the origin 
of this constant:


There appears to be an IBM-private field in _LC_time_t struct, 
era_year.   We should remove era_year from the _LC_time_t struct.  
This should only affect the LC_TIME functions, localedef 
command, and locale objects.  (nl_langinfo and langinfo.h are
unaffected because they don't reference era_year.) 


I believe this entry should simply be removed.

--
assignee: d...@python
components: Documentation
keywords: easy
messages: 111683
nosy: belopolsky, d...@python
priority: normal
severity: normal
stage: needs patch
status: open
title: locale documentation describes non-existing ERA_YEAR constant
versions: Python 3.2

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-26 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 26, 2010 at 11:58 PM, Ned Deily rep...@bugs.python.org wrote:
..
 This has nothing to do with Apple.  /Applications/Python x.y is created by 
 the python.org OS X
 installer, not supplied by Apple.  See Mac/BuildScript/build-installer.py for 
 the details.

Does this mean that Apple distributes neither Tools nor Demo?   That
would be another reason to move anything anyone cares about to Lib.

  AFAIK, the Tools directory is currently not installed by the OS X installer. 
  Should it be?

Probably not all of it.  Moving to tools package would give an
opportunity to select which tools are only of interest to those
working with python source and which are of general utility.

--

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



[issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory)

2010-07-26 Thread Guy

New submission from Guy g...@openmail.cc:

When an exception is raised and Python's showing a traceback, the lines of the 
Python scripts are that of those on-disk, not in memory.

For example, if I run a Python script which raises an exception, but I edit the 
line the exception occurs on and save the script in the same location, the new 
line (The one that's not interpreted), will be shown in the traceback.

--
components: Interpreter Core
messages: 111685
nosy: Guy
priority: normal
severity: normal
status: open
title: Traceback: Exception Shows Code that's On-Disk (Not in memory)
type: behavior
versions: Python 2.7

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-26 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Does this mean that Apple distributes neither Tools nor Demo?   That
would be another reason to move anything anyone cares about to Lib.

I believe that neither are included in the Apple-supplied Python in OS X, which 
resides primarily in /System/Library/Frameworks/Python.framework.

In recent OS releases, Apple seems to have taken their cue from the python.org 
installer framework layouts but tweaked things somewhat.  Ronald may have more 
insight and/or an opinion on this.  He's also had some contact with the people 
inside Apple.

--
nosy: +ronaldoussoren

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



[issue6325] robotparser doesn't handle URL's with query strings

2010-07-26 Thread Michael Stephens

Michael Stephens michaelj...@gmail.com added the comment:

Supplied patch matches rules with query params.

--
keywords: +patch
nosy: +mikejs
Added file: http://bugs.python.org/file18218/6325.diff

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



  1   2   >