ANN: python-ldap-2.3.13

2011-02-19 Thread Michael Ströder
Find a new release of python-ldap:

  http://pypi.python.org/pypi/python-ldap/2.3.13

python-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for
that purpose. Additionally it contains modules for other LDAP-related
stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema).

Note: This is the last release with this feature set. From now on only very
urgent fixes are going into release series 2.3.x.

Project's web site:

  http://www.python-ldap.org/

Ciao, Michael.


Released 2.3.13 2011-02-19

Changes since 2.3.12:

Modules/
* Correct #ifdef-statement for LDAP_OPT_X_TLS_CRLFILE in
  constants.c fixes build with older OpenLDAP libs
* Support for LDAP_OPT_DEFBASE (see SF#3072016, thanks to Johannes)

-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: Python leaks in cyclic garbage collection

2011-02-19 Thread Andrea Crotti

Il giorno 19/feb/2011, alle ore 05.10, moerchendiser2k3 ha scritto:

 Hi, I have some problems with Python and the garbage collection. In
 the following piece of code I create a simple gargabe collection but I
 am still wondering why the finalizers are never called - at least on
 exit of Py they should be called somehow. What do I miss here? I know,
 there is no deterministic way how to resolve this though.
 
 class Foo():
 
def __init__(self):
self.b=Bar(self)
 
def __del__(self):
print Free Foo
 
 class Bar():
def __init__(self, f):
self.f=f
 
def __del__(self):
print Free Bar
 
 f=Foo()
 print f
 -- 
 http://mail.python.org/mailman/listinfo/python-list

Wild guess:
maybe when python exits they are called but sys.stdout has already been closed 
and nothing gets written on it anymore.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use Python well?

2011-02-19 Thread Jorgen Grahn
On Sat, 2011-02-19, Ben Finney wrote:
 Roy Smith r...@panix.com writes:
...
 HTML also gives you much greater formatting flexibility than what's
 still basically 35-year old nroff.

 Full agreement there.

Some disagreement here. There are typographical features in
nroff/troff today which you don't get in web browsers: ligatures and
hyphenation for example.

Then of course there's the argument that formatting flexibility
isn't a good thing for reference manuals -- you want them to look
similar no matter who wrote them. (Not that all man pages look similar
in reality, but there are some pretty decent conventions which most
follow).

/Jorgen

-- 
  // Jorgen Grahn grahn@  Oo  o.   .  .
\X/ snipabacken.se   O  o   .
-- 
http://mail.python.org/mailman/listinfo/python-list


Python-os. Command Execution

2011-02-19 Thread Ganesh Kumar
Hi,

I am new to python programing. I have created one small application ,

application developed in python Tkinter GUI, My application having
install button

when user click install, It will start one GUI installation script and
exit my application

This my task.. The problem was the installation script started but
control will be transfered to

other window ... when installation finished the GUI application will be closed..

code:

os.system(ls -l)  root.destroy

when execute a command ls -l  and application will be closed

But

os.system(top)  root.destroy

Control will the transferred to the other-window, top closed means
application will be closed.. plz..help me..

I checked also the command as background process.. like os.system(top
)  root.destroy


Advance thanks

Regards
Ganesh.




-- 
Did I learn something today? If not, I wasted it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python-os. Command Execution

2011-02-19 Thread ALAN GAULD


 when user click install, It will start one GUI  installation script and
 exit my application
 
 This my task.. The problem  was the installation script started but
 control will be transfered  to
 
 other window ... when installation finished the GUI application will  be 
closed..
 
 code:
 
 os.system(ls -l)   root.destroy
 

First question is, why are you using the bitwise and operator to manage 
execution status. This is Python not C. Use clear logic that erflects 
what you are trying to do.( Especially if you only post code fragments.)

if os.system('ls -l') != 0 : root.destroy()

Is much more obvious in intent.

 when execute a command ls -l  and application will be  closed

Only if os.system returns an error code

 os.system(top)  root.destroy
 
 Control will  the transferred to the other-window, top closed means
 application will be  closed.. plz..help me..

I have no idea what other window you are referring to. Is it the 
OS console that top runs in? Have you checked the return code 
of os.system to see if it returns cleanly (ie a 0) or if it returns an error?

You might find it better to use the subprocess module instead of 
os.system. There is more flexibilityy and control available there.

 I checked also the command as background  process.. like os.system(top
 )  root.destroy

And what happened?

We need a bit more context and you need to do a bity more debugging.
Starting with getting rid of the bitwise and trick from C. All it does 
here is make it hard to understand whats happening.

HTH,

Alan G.
Author of the Learn to Program web site
http://www.alan-g.me.uk/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problems of Symbol Congestion in Computer Languages

2011-02-19 Thread Nicholas Devenish

On 19/02/2011 07:41, Westley Martínez wrote:

Simply remove 'dvorak-' to get qwerty. It allows you to use the right
Alt key as AltGr. For example:
AltGr+' i = í
AltGr+c = ç
AltGr+s = ß

I don't work on Windows or Mac enough to have figured out how to do on
those platforms, but I'm sure there's a simple way.
Again, it's the funky symbols that would be difficult to input.


On mac, the acute accent is Alt-e + vowel, so Alt-e i.

This seems to work universally, regardless of gui application or 
terminal. I don't work with X applications enough to know if they work 
there, however.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Problems of Symbol Congestion in Computer Languages

2011-02-19 Thread Nicholas Devenish

On 18/02/2011 10:26, Steven D'Aprano wrote:


Agreed. I'd like Python to support proper mathematical symbols like ∞ for
float('inf'), ≠ for not-equal, ≤ for greater-than-or-equal, and ≥ for
less-than-or-equal.



This would be joyful! At least with the subset of operations that 
already exist/exist as operators, the possibility of using these 
wouldn't affect anyone not using them (like the set/intersection 
notation mentioned in another post).


I'm not very optimistic about anything like this ever being accepted 
into python main, however (I can't imagine it being terribly complicated 
to add to the accepted language, though).

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python leaks in cyclic garbage collection

2011-02-19 Thread moerchendiser2k3
Thanks for your answers! They really helped me out!! :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Making Line Graphs

2011-02-19 Thread jkn
Graphviz?

http://www.graphviz.org/

HTH
Jon N
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use Python well?

2011-02-19 Thread Roy Smith
In article slrnilv0ls.15e.grahn+n...@frailea.sa.invalid,
 Jorgen Grahn grahn+n...@snipabacken.se wrote:

 Some disagreement here. There are typographical features in
 nroff/troff today which you don't get in web browsers: ligatures and
 hyphenation for example.

Saying that HTML doesn't have ligatures and hyphenation is kind of like 
saying Python is a bad programming language because it doesn't come in 
purple.

Yes, n/troff does ligatures and hyphenation.  Are such things really 
essential for an on-line reference manual?  The ligatures, clearly not, 
since what most of us are talking about here are the plain-text 
renditions you get with the on-line man output.

Hyphenation?  I suppose it has some value for this kind of stuff, but it 
can also be a pain.  What happens when you're grepping the man page for 
egregious and can't find it because it got hyphenated?

No, those are things you want for typesetting documents, not for 
browsing on-line reference material.  And I can't imagine anybody using 
troff for typesetting today.  I'm sure there are a few people who will 
pop out of the woodwork insisting they do, but when it comes to 
typesetting, I want a tool, not a hobby.
-- 
http://mail.python.org/mailman/listinfo/python-list


QWebView: notify python when I clicked on a certain web eleemnt

2011-02-19 Thread Gelonida
I have a web page (existing page, can't modify it) and I would like
to browse it in a QtWebview. (This is already working)

Now I Wonder how I could achieve following behaviour:

When I click on a certain element e.g. span id=clickme/a
I would like to notify my python script.

What is important:
I don't want to change anything else in the web pages behaviour (This
means if clicking on this element will call some java script functions,
load a pag, then this should still happen.


What is the correct way to do it?


Thanks in advance for any suggestions

-- 
http://mail.python.org/mailman/listinfo/python-list


How to log certain web requests.

2011-02-19 Thread Gelonida
Hi,


I created a small browser with QWebview

I subclassed QNetworkAccessManager with a customized version and set it
as NetworAccessManager


By adding a print / log statement in the createRequestMethod I am able
to log, which requests are performed.

What I would be interested in is however to to write the of some post
requests and the data returned from the server into a log file.

How can I do this?

thanks in advance for any ideas?

-- 
http://mail.python.org/mailman/listinfo/python-list


QWebView: Get coordinates of an element and simulate a relative to this position.

2011-02-19 Thread Gelonida
WHht I wondered is following:

Let's assume I use a QWebView,

As soon as the page is loaded ( loadFinished signal)
I'd like to identify a certain element  with findFirstElement(), get
it's coordinates (and size) calculate some related coordinates (for
example 20 pixel above the top left corner of this element
and clcik there.


SO my questions:
- how can I get the coordinate of an element, that I found with
findFirstElement()
- how can I click in the  browser window relative to the coordinate
previously obtained



Thanks in advance for any suggestions ideas.

-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: python-ldap-2.3.13

2011-02-19 Thread Michael Ströder
Find a new release of python-ldap:

  http://pypi.python.org/pypi/python-ldap/2.3.13

python-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for
that purpose. Additionally it contains modules for other LDAP-related
stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema).

Note: This is the last release with this feature set. From now on only very
urgent fixes are going into release series 2.3.x.

Project's web site:

  http://www.python-ldap.org/

Ciao, Michael.


Released 2.3.13 2011-02-19

Changes since 2.3.12:

Modules/
* Correct #ifdef-statement for LDAP_OPT_X_TLS_CRLFILE in
  constants.c fixes build with older OpenLDAP libs
* Support for LDAP_OPT_DEFBASE (see SF#3072016, thanks to Johannes)

-- 
http://mail.python.org/mailman/listinfo/python-list


Hai Simple To Make Ideas and Earn Money

2011-02-19 Thread Vanitha
http://adf.ly/YOhx
http://adf.ly/YOhx
http://adf.ly/YOhx
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python-os. Command Execution

2011-02-19 Thread Stephen Hansen
On 2/19/11 1:44 AM, Ganesh Kumar wrote:
 os.system(ls -l)  root.destroy

 here doesn't do what you think it does. Its a bitwise AND operator,
which is not the same thing as you may be expecting from other languages.

In Python, you'd do something more like:

   os.system(ls -l) and root.destroy()

But that's bad Python. First, let's look at what os.system actually returns:

 import os
 help(os.system)
system(...)
system(command) - exit_status

Execute the command (a string) in a subshell.

Now, an exit status of 0 is actually generally considered a success,
while 1-200odd is a failure.

Now, if you want to run 'root.destroy()' if and only if the 'ls -l'
command fails, you could do the above with an 'and'. Python DOES
short-circuit its logical AND's, so the root.destroy() will NOT be run
if ls -l succeeds (returns 0)... but really.

That's _very_ cryptic.

Its much better to do:

   if os.system(ls -l) != 0:
root.destroy()

(You could simply say 'if not os.system(ls -l)', but in this context
where the more unusual behavior of '0 is true, 0 is false' which is
opposite of what is normal in Python, I prefer to explicitly spell it out)

If you instead mean the  to simply separate the statements, so that
after the os.system is done, then regardless of the outcome root.destroy
is called-- then... just separate the statements.

os.system(ls -l)
root.destroy()

You can use them on the same line with a semicolon if you really must.
But don't do that. :-)

Now, all of that said -- I'm not sure what exactly is going WRONG with
your program. You said GUI, and perhaps that's the problem? If you are
calling a unix interactive command line program from within a GUI
context, things are quite likely to go wrong unless you do a lot of
extra work. Are you expecting a new console window to pop up for 'top'
and for that to run on its own? If so -- that won't happen on its own or
with a single function call sort of easy way.

What OS are you on? What are you actually trying to do here?

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/



signature.asc
Description: OpenPGP digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Hello Friends

2011-02-19 Thread Ashraf Ali
Would you like to know about indian acttractive actresses.
You can know about their life.Would you like to remain informed about
latest News. So, just visit the following websites
www.newsbeam.blogspot.com
www.hotpics00.blogspot.com
www.onlinegames786.blogspot.com
www.tvlive00.blogspot.com
www.funnyvids00.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use Python well?

2011-02-19 Thread Westley Martínez
On Sat, 2011-02-19 at 07:40 -0500, Roy Smith wrote:
 In article slrnilv0ls.15e.grahn+n...@frailea.sa.invalid,
  Jorgen Grahn grahn+n...@snipabacken.se wrote:
 
  Some disagreement here. There are typographical features in
  nroff/troff today which you don't get in web browsers: ligatures and
  hyphenation for example.
 
 Saying that HTML doesn't have ligatures and hyphenation is kind of like 
 saying Python is a bad programming language because it doesn't come in 
 purple.
 
 Yes, n/troff does ligatures and hyphenation.  Are such things really 
 essential for an on-line reference manual?  The ligatures, clearly not, 
 since what most of us are talking about here are the plain-text 
 renditions you get with the on-line man output.
 
 Hyphenation?  I suppose it has some value for this kind of stuff, but it 
 can also be a pain.  What happens when you're grepping the man page for 
 egregious and can't find it because it got hyphenated?
 
 No, those are things you want for typesetting documents, not for 
 browsing on-line reference material.  And I can't imagine anybody using 
 troff for typesetting today.  I'm sure there are a few people who will 
 pop out of the woodwork insisting they do, but when it comes to 
 typesetting, I want a tool, not a hobby.

But you can't seriously say that authoring HTML is effective. Sure,
outputting HTML is fine, but as for writing the source, troff, docbook,
sphinx, even TeX, etc, is superior to HTML simply because HTML was
designed for web pages and those others were designed specifically for
documentation (not TeX, but that's another story). I hate writing HTML,
it's a pain in the neck.

But anyways, I find it easier to simply type man sigaction than to
search around on google all day for a handful of facts and a truckload
of opinions, as do I find it easier to type help(os.path) than have to
open my browser, click on the python doc bookmark, search for os.path,
wait for the search results, and click on it. This is just what I find
easier though, and I think using tools that output HTML, groff, LaTeX,
etc should continued to be used.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: newbie question about PYTHONPATH

2011-02-19 Thread Doug Epling
The best way I have found is to place that definition of your PYTHONPATH 
in your .bash_profile in your home directory and export it from there.


PYTHONPATH=/home/foo/prog/learning_python

export PYTHONPATH

  This way your PYTHONPATH is picked up each time you log on.  You 
might have to restart IDLE for the changes you mention below to take effect.



On 2/15/2011 12:49 PM, Tim Hanson wrote:

I am to the point in _Learning_Python_  where functions are introduced.

I decided to experiment by putting a function into  a file and importing it
into Idle.  Of course, Idle couldn't find it, so I executed the following
command in Bash:

PYTHONPATH=/home/foo/prog/learning_python
export PYTHONPATH
env | grep PYTHONPATH

~$PYTHONPATH=/home/foo/prog/learning_python

Idle still won't find it.  I'm doing something wrong?


--
http://mail.python.org/mailman/listinfo/python-list


Re: How to use Python well?

2011-02-19 Thread Roy Smith
In article mailman.218.1298135413.1189.python-l...@python.org,
 Westley Martínez aniko...@gmail.com wrote:

 But you can't seriously say that authoring HTML is effective.

By hand?  No of course not.  That's why we have things like wikis and 
CMS's, markup languages like ReST, TeX-to-HTML converters, and so on.

But, we're getting way off topic for a Python forum.  The original 
question was along the lines of How do I write good Python?.  I think 
we're all in agreement that somewhere in the answer to that has to be, 
Provide documentation which is useful to your users, and keep it 
updated as the code changes.  Beyond that, I think we need to move this 
to comp.text.religion.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: newbie question about PYTHONPATH

2011-02-19 Thread Andrea Crotti

Il giorno 19/feb/2011, alle ore 18.25, Doug Epling ha scritto:

 The best way I have found is to place that definition of your PYTHONPATH in 
 your .bash_profile in your home directory and export it from there.
 
   PYTHONPATH=/home/foo/prog/learning_python
 
   export PYTHONPATH
 
  This way your PYTHONPATH is picked up each time you log on.  You might have 
 to restart IDLE for the changes you mention below to take effect.

Yes but like this you overwrite it
export PYTHONPATH=/your/path:$PYTHONPATH

is much more safe to use
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: newbie question about PYTHONPATH

2011-02-19 Thread Westley Martínez
On Sat, 2011-02-19 at 19:22 +0100, Andrea Crotti wrote:
 Il giorno 19/feb/2011, alle ore 18.25, Doug Epling ha scritto:
 
  The best way I have found is to place that definition of your PYTHONPATH in 
  your .bash_profile in your home directory and export it from there.
  
  PYTHONPATH=/home/foo/prog/learning_python
  
  export PYTHONPATH
  
   This way your PYTHONPATH is picked up each time you log on.  You might 
  have to restart IDLE for the changes you mention below to take effect.
 
 Yes but like this you overwrite it
 export PYTHONPATH=/your/path:$PYTHONPATH
 
 is much more safe to use
It's even safer to use
export PYTHONPATH=$PYTHONPATH:/your/path

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: return an object of a different class

2011-02-19 Thread Piet van Oostrum
Richard Thomas chards...@gmail.com writes:

 If you don't want to use a factory function I believe you can do this:

 class MyNumber(object):
 def __new__(cls, n):
 if n = 100:
 cls = SmallNumbers
 else:
 cls = BigNumbers
 return object.__new__(cls, n)

But you have to be aware that the initializers are not called in this way.

-- 
Piet van Oostrum p...@vanoostrum.org
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Nu Fair Trade woonartikelen op http://www.zylja.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Making Line Graphs

2011-02-19 Thread Jeremy Sanders
spam head wrote:

 Does anybody have any recommendations for a good program from
 generating these simple graphs?

Have a look at Veusz, written in python: http://home.gna.org/veusz/

(I am the lead author).

Jeremy


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use Python well?

2011-02-19 Thread Cameron Simpson
On 18Feb2011 22:28, Roy Smith r...@panix.com wrote:
| In article 878vxcbudn@benfinney.id.au,
|  Ben Finney ben+pyt...@benfinney.id.au wrote:
| 
|  This collection of a great deal of documentation for the operating
|  system into a single ???manual??? is one reason why users like man pages so
|  much: we want to find anything installed on the system documented in
|  that one place.
| 
| What made man pages such a great technology back in the 70's was exactly 
| what Ben is saying.  Everything was on-line and instantly available for 
| quick reference.  Not to mention that you could use man as just another 
| cog in the unix toolset and do things like grep all of /usr/man for a 
| term (or an error message which appeared and you didn't know what had 
| produced it).  These were astonishing advances in usability vs. having 
| printed manuals (which may or may not have been available to you).
| 
| But, today we have such better tools available.  HTML, for example.  
| Whether it's a wiki or the generated output of sphinx/doxygen/etc, HTML 
| provides for a much richer presentation.  Which is more convenient: 
| having the signal(3) man page reference sigaction(2) textually, or 
| having it be a clickable link that can take me right there?  HTML also 
| gives you much greater formatting flexibility than what's still 
| basically 35-year old nroff.

But HTML is just presentation. There are _plenty_ of manual page
renderers that write HTML. (Example: http://www.FreeBSD.org/cgi/man.cgi)
Complete with clickable links to other manual pages etc. That can all
be done automatically. And has _nothing_ to do with the source being in
nroff format. And the source needn't be in nroff format, either. I have
a bunch of man pages in POD format, which renders to an assortment of
formats including nroff output.

Your argument above is a fine argument for saying that HTML is a very
valuable presentation format, especially if well cross referenced.
But it is irrelevant to the usefulness of man pages.

| If, for whatever reason, you're still wed to plain text, even info gives 
| you much better capabilities than man.  At least you get basic stuff 
| like menus, document hierarchy, cross-linking, and browsing history.

Any yet I (and others, based on stuff I've seen) find info to be a
disaster. Why?

 - it forces the reader to use a non-standard pager to look
   at info, typically the utterly weird one that comes with the info
   command. The user using a terminal _should_ get to use their own pager
   because their fingers know how to drive it. Info, in its tiny pieces
   of text linked to other tiny pieces of text form, does not lend itself
   to this and the browser it does offer on a terminal is arcane.

   But see below (*).

 - the info pages end up as a scattering of tiny cross linked (if
   you're lucky) pieces with little information on one place/page.
   So you can't, for example, stand at the top of the doco page and
   search for a term.

Frankly, info is usually a step backward, speaking as a reader.

* I grew enraged at the prevalence of GNU unix tools with only info
  for doco, and no manual pages or manual pages that said we don't put
  anything useful here, go read the info pages, the stuff here may not
  even be maintained (I'm serious - see the bottom of a lot of the
  rather trite manual pages that ship with GNU this/that/the-other).

  So enraged that I wrote a couple of tools called info2pod and
  info2man that read postcompiled info output (the
  binary-mixed-with-text stuff info files ship as, post install)
  and join it all up again into a single flat text output that _can_ be
  paged and searched. And a modified man command that can include info
  dirs in the $MANPATH and thus present info as a man page. It is a
  little ugly, but at least it clubs info into usability.
  Example:

% man screen
1:  /usr/share/man/man1/screen.1.bz2
2:  /usr/share/info/screen.info-2.bz2
3:  /usr/share/info/screen.info-4.bz2
4:  /usr/share/info/screen.info-5.bz2
5:  /usr/share/info/screen.info-1.bz2
6:  /usr/share/info/screen.info-3.bz2
7:  /usr/share/info/screen.info.bz2
which entry? 

  Choosing (1) gets you man screen as usual, choosing (7) gets you the
  whole screen info stuff flattened and presented as a single page, where
  you can _search_ for what you want.

  URL: http://www.cskk.ezoshosting.com/cs/css/#key-doc

| I'm not saying that help text is the be-all and end-all for 
| documentation.  I'm just saying that if you're going to do more than 
| help text, it's hard to imagine putting any effort into producing man 
| pages.

Hard for you, maybe. As someone whole consistently finds well written
(terse yet complete) man pages _much_ more useful than many other supposed
documentation, I find it hard to imagine lack of man pages as other than
a failure.

There are exceptions of course. The python doco at python.org is pretty
good. Wikipedia is often very good. But many wikis and 

Re: How to use Python well?

2011-02-19 Thread Cameron Simpson
On 19Feb2011 09:10, Westley Mart�nez aniko...@gmail.com wrote:
| But you can't seriously say that authoring HTML is effective. Sure,
| outputting HTML is fine, but as for writing the source, troff, docbook,
| sphinx, even TeX, etc, is superior to HTML simply because HTML was
| designed for web pages and those others were designed specifically for
| documentation (not TeX, but that's another story). I hate writing HTML,
| it's a pain in the neck.

Chuckle.

The basics of HTML (H1, H2, P, I etc) are Very Very closely based on the
[nt]roff -mm macro set. Quite useable, actually, for the basics. The tag
closing etc is a PITA, I agree. Of course, in nroff you'd be going:

  .H1 A Level One Heading
  paragraph blah blah ...

No tedious closing tags there!

CCheers,
-- 
Cameron Simpson c...@zip.com.au DoD#743
http://www.cskk.ezoshosting.com/cs/

(about SSSCA) I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy.
- H. Peter Anvin h...@hera.kernel.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use Python well?

2011-02-19 Thread Ben Finney
Westley Martínez aniko...@gmail.com writes:

 I hate writing HTML, it's a pain in the neck.

So do I. But I hate writing *roff markup even more. So I don't write
either of those formats directly if I can avoid it.

I write my man pages in either Docbook (using an XML editor) or reST (my
default markup format these days), then convert to *roff.

 But anyways, I find it easier to simply type man sigaction than to
 search around on google all day for a handful of facts and a truckload
 of opinions

Right. The Unix manual system allows a consistent place for operating
system documentation. That includes, but is not limited to, the commands
to be typed at the command line. Please preserve that consistency by
maintaining man pages for commands.

-- 
 \“I installed a skylight in my apartment. The people who live |
  `\ above me are furious!” —Steven Wright |
_o__)  |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


IDLE won't wrap lines of text

2011-02-19 Thread Richard D. Moores
Vista
Python 3.1.3

I can't figure out how to get IDLE to wrap text pasted in from, say, a
newspaper article. Usually, a each paragraph will appear as one long
unwrapped line, with no way to read the whole line, because no
horizontal bar is created. I haven't found anything about this in
either the options or the help.

Thanks,

Dick Moores
-- 
http://mail.python.org/mailman/listinfo/python-list


wxPython in the context of Eclipse

2011-02-19 Thread Fred Marshall

I asked earlier:

How do I use wxPython or wxGlade in the context of Eclipse?

A link to a howto would be great!

I guess nobody knows or cares to answer?

:-(
--
http://mail.python.org/mailman/listinfo/python-list


[issue11233] clarifying Availability: Unix

2011-02-19 Thread Georg Brandl

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

The Notes on availability bullet list at the top of 
docs.python.org/library/os should already say everything that there is to say 
here...

--
nosy: +georg.brandl
resolution:  - works for me
status: open - pending

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



[issue10709] Misc/AIX-NOTES needs updating

2011-02-19 Thread Georg Brandl

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

Committed as r88438.  Thanks!

Please indicate how much of this needs to be backported to 2.7 and 3.1.

--
resolution:  - fixed

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-19 Thread Georg Brandl

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

Committed as r88439 in py3k.

--
priority: release blocker - critical

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



[issue11184] Broken large file support on AIX

2011-02-19 Thread Georg Brandl

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

Okay, committed to py3k in r88440.  Does this need backporting?

--
resolution:  - fixed

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



[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build

2011-02-19 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue11184] Broken large file support on AIX

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Okay, committed to py3k in r88440.  Does this need backporting?

Certainly.

--

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



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-19 Thread yeswanth

yeswanth swamiyeswa...@yahoo.com added the comment:

I have gone through the source of mkcfg.py and though of implementing version 
check by calling distutils2.is_valid_version() and then if it results false , 
call suggest_normalized_version() to ask the user if he would like the 
suggested version or enter a new version ...if it returns none, prompting the 
version again . For this i need to create a new function say check_version() 
and call it just after version is asked for in the query_user() function call.

--

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



[issue11247] Error sending packets to multicast IPV4 address

2011-02-19 Thread Charles-Francois Natali

Charles-Francois Natali neolo...@free.fr added the comment:

Are you using a default gateway ?
Are you sure this gateway supports multicast ?
See for example http://www.sockets.com/err_lst1.htm#WSAENETUNREACH :

WSAENETUNREACH (10051) Network is unreachable. 

Berkeley description: A socket operation was attempted to an unreachable 
network. 

WinSock description: Almost same as Berkeley. For WinSock, this error is 
equivalent to Berkeley's EHOSTUNREACH error, the catch-all error for 
unreachable hosts. You can't get there from here. 

TCP/IP scenario: The local network system could generate this error if there 
isn't a default route configured. Typically, though, WinSock generates this 
error when it receives a host unreachable ICMP message from a router. The 
ICMP message means that a router can't forward the IP datagram, possibly 
because it didn't get a response to the ARP request (which might mean the 
destination host is down). Note: this error may also result if you are trying 
to send a multicast packet and the default gateway does not support multicast 
(check your interface configuration). 


By the way, when you submit this kind of issue, it's a lot easier to analyse if 
you provide a sample code.

--
nosy: +neologix

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



[issue11224] 3.2: tarfile.getmembers causes 100% cpu usage on Windows

2011-02-19 Thread Lars Gustäbel

Lars Gustäbel l...@gustaebel.de added the comment:

_FileInFile.read() does lots of unnecessary seeking and reads the same block 
again and again. The attached patch fixes that. Please try if it works for you.

--
assignee:  - lars.gustaebel
keywords: +patch
Added file: http://bugs.python.org/file20793/tarfile.diff

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



[issue11244] Negative tuple elements produce inefficient code.

2011-02-19 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Unassigning.  I don't think that r82043 is the *real* culprit here;  that 
bugfix just happened to expose a deficiency in the peepholer;  one that's 
already present in other situations:

 dis.dis(lambda: 2*(3*4))
  1   0 LOAD_CONST   1 (2)
  3 LOAD_CONST   4 (12)
  6 BINARY_MULTIPLY 
  7 RETURN_VALUE
 dis.dis(lambda: (2*3)*4)
  1   0 LOAD_CONST   5 (24)
  3 RETURN_VALUE

Antoine, does your patch take care of this case too?

--
assignee: mark.dickinson - 

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Greg Kochanski

New submission from Greg Kochanski g...@kochanski.org:

When you have a generator as an argument to zip(), code after the last yield 
statement may not get executed.  The problem is that zip() stops after it gets 
_one_ exception, i.e. when just one of the generators has finished.

As a result, if there were any important clean-up code at the end of a 
generator, it will not be executed.   Caches may not get flushed, et cetera.

At the least, this is a documentation bug that needs to be pointed out in both 
zip() and the definition of a generator().  More realistically, it is a severe 
wart on the language, because it violates the programmer's reasonable 
expectation that a generator executes until it falls off the end of the 
function.  It means that a generator becomes conceptually nasty: you cannot 
predict what it will do based just on an inspection of the code and the code it 
calls.

Likely, the same behavior happens in itertools, too.

--
components: None
files: bug312.py
messages: 128842
nosy: gpk-kochanski
priority: normal
severity: normal
status: open
title: Tails of generator get lost under zip()
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file20794/bug312.py

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Ezio Melotti

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

This behavior is documented[0]:
The returned list is truncated in length to the length of the shortest 
argument sequence.

You can use izip_longest instead[1].

[0]: http://docs.python.org/library/functions.html#zip
[1]: http://docs.python.org/library/itertools.html#itertools.izip_longest

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

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



[issue11244] Negative tuple elements produce inefficient code.

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Le samedi 19 février 2011 à 10:45 +, Mark Dickinson a écrit :
 Mark Dickinson dicki...@gmail.com added the comment:
 
 Unassigning.  I don't think that r82043 is the *real* culprit here;  that 
 bugfix just happened to expose a deficiency in the peepholer;  one that's 
 already present in other situations:
 
  dis.dis(lambda: 2*(3*4))
   1   0 LOAD_CONST   1 (2)
   3 LOAD_CONST   4 (12)
   6 BINARY_MULTIPLY 
   7 RETURN_VALUE
  dis.dis(lambda: (2*3)*4)
   1   0 LOAD_CONST   5 (24)
   3 RETURN_VALUE
 
 Antoine, does your patch take care of this case too?

It should. Can you test?

--

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Greg Kochanski

Greg Kochanski g...@kochanski.org added the comment:

(a) It is not documented for the symmetric (4, 4) case where the two generators 
are of equal length.

(b) Even for the asymmetric case, it is not documented in such a way that 
people are likely to see the implications.

(c) Documented or not, it's still a wart.

--

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



[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

I also got this now, it happens with and without the str() patch stuff.  (Note 
that message.py line numbers are off by 1-2 lines ..).  I don't know more about 
that in the moment, but the only thing that's changed is that i do:

   alln = self._msg.items()[:] # In fact - ensure all are header.Header
   # If any converted (str-Header) header names exist ...
   if len(alln):
# Delete *all* occurrences of h (doesn't throw)
for (n, b) in alln:
del self._msg[n]
# And append in order
for (n, b) in alln:
self._msg[n] = b


  Traceback (most recent call last):
File /Users/steffen/usr/bin/s-postman.py, line 953, in save_ticket
  mb.add(ticket.message())
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 595, in 
add
  self._toc[self._next_key] = self._append_message(message)
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 733, in 
_append_message
  offsets = self._install_message(message)
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 805, in 
_install_message
  self._dump_message(message, self._file, self._mangle_from_)
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 215, in 
_dump_message
  gen.flatten(message)
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/generator.py, line 
88, in flatten
  self._write(msg)
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/generator.py, line 
134, in _write
  self._dispatch(msg)
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/generator.py, line 
151, in _dispatch
  main = msg.get_content_maintype()
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/message.py, line 
528, in get_content_maintype
  ctype = self.get_content_type()
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/message.py, line 
516, in get_content_type
  ctype = _splitparam(value)[0].lower()
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/message.py, line 53, 
in _splitparam
  a, sep, b = param.partition(';')
  Exception: AttributeError: 'NoneType' object has no attribute 'partition'

--

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



[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

The latter one was my fault, i did LIST.append(name, HEADER.append(xy)), 
assuming that HEADER.append() returns self though it doesn't.  Sorry.  However 
- shouldn't Message.__setitem__ check for valid arguments (see msg128846 code 
snippet)?  It would have saved some anger...

--

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



[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

However, maybe that 5.1 message.py thing doesn't like header.Header instances.  
Also extending msg128846, this one is related to the str() issue - added an 
extended email_message.2.patch.

  Traceback (most recent call last):
File /Users/steffen/usr/bin/s-postman.py, line 953, in save_ticket
  mb.add(ticket.message())
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 595, in 
add
  self._toc[self._next_key] = self._append_message(message)
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 733, in 
_append_message
  offsets = self._install_message(message)
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 805, in 
_install_message
  self._dump_message(message, self._file, self._mangle_from_)
File /Users/steffen/usr/opt/py3k/lib/python3.2/mailbox.py, line 215, in 
_dump_message
  gen.flatten(message)
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/generator.py, line 
88, in flatten
  self._write(msg)
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/generator.py, line 
134, in _write
  self._dispatch(msg)
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/generator.py, line 
151, in _dispatch
  main = msg.get_content_maintype()
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/message.py, line 
530, in get_content_maintype
  ctype = self.get_content_type()
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/message.py, line 
518, in get_content_type
  ctype = _splitparam(value)[0].lower()
File /Users/steffen/usr/opt/py3k/lib/python3.2/email/message.py, line 53, 
in _splitparam
  a, sep, b = param.partition(';')
  Exception: AttributeError: 'Header' object has no attribute 'partition'

P.S.: i'm hard to take, and 'programming is an iterative task'...

--
Added file: http://bugs.python.org/file20795/email_message.2.patch

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



[issue11244] Negative tuple elements produce inefficient code.

2011-02-19 Thread Arfrever Frehtes Taifersar Arahesis

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


--
nosy: +Arfrever

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



[issue8300] Allow struct.pack to handle objects with an __index__ method.

2011-02-19 Thread Matt Joiner

Matt Joiner anacro...@gmail.com added the comment:

Why isn't this implemented to work with __int__ as well?

--
nosy: +anacrolix

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



[issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var)

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, it's up to Georg to decide if it goes before 3.2. But I don't see the 
hurry: the online docs are rebuilt daily anyway.

--
assignee: pitrou - georg.brandl

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Ezio Melotti

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

a) that's true, even if the behavior makes sense (when the first generator ends 
there's no reason to see what's next in the second). Georg, do you think it 
should be documented?

b) if you want to be sure that some clean-up is executed you should use a 
try/finally in the generator. Relying on the number of elements of another 
generator used together with zip() seems very fragile to determine when/if a 
clean-up should be done (what if the other generator has a different number of 
elements? what if an exception is raised before it's fully consumed? what if 
you use the generator in for/while loop and break the loop before reaching the 
end? ...).

c) even if you consider it as a wart, changing it for zip() will break 
compatibility and it's against the language moratorium. This behavior is also 
useful if e.g. you have the generators g1 that yields 1 2 3, g2 that yields 4 5 
6, and g3 that yields a b c d e f and you want to first zip(g1, g3) and get 1a 
2b 3c and then continue with zip(g2, g3) and get 4d 5e 6f. Checking in the 
first zip() if g3 reached its end or not would mean consuming the 'd', and that 
would be a worse wart imho.

--
nosy: +eric.araujo, georg.brandl

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



[issue10709] Misc/AIX-NOTES needs updating

2011-02-19 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Great!

I intend to check that branch 2.7 works fine on AIX once I will have finished 
with 3.x (which should be soon).
I will then update this file for Python 2.7 (there shouldn't be much changes 
hopefully).

--

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



[issue11071] What's New review comments

2011-02-19 Thread Éric Araujo

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

Attached patch adds a missing attribution, a missing bug number, fixes one typo 
(“content manager”) and five grammar issues.

I haven’t had time to make a full read-through during the last weeks, but here 
are a few comments about the overall structure of the file:
- The introduction is a bit scarce (compare that of 2.6);
- “Other Language Changes” sounds strange, given that the previous sections 
(PEPs) are language as well as library changes → name it something like “Small 
Language Changes”;
- “New, Improved, and Deprecated Modules” are not sorted nor grouped;
- Ditto for the bits of advice in the Porting section;
- The small sections about Unicode and codecs could be merged;
- What Antoine said about “Code repository”.

--
keywords: +patch
Added file: http://bugs.python.org/file20796/whatsnew-fixes.diff

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



[issue11233] clarifying Availability: Unix

2011-02-19 Thread R. David Murray

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

Yes, but when you jump directly to one of the functions, you don't see that 
bullet list.  Whereas if it were a footnote on the 'avaiability: unix 
statement, the natural thing would be to follow the footnote and thus learn the 
limitations on that statement.  Thus I think the footnote would be better than 
the bullet list at the top.

--
status: pending - open

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



[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso sdao...@googlemail.com:


Removed file: http://bugs.python.org/file20784/email_message.patch

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



[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

David, i'm going down now.  I'll raise the type to 'crash', because, in fact, 
EMail 5.1 doesn't really take care of header.Header objects in message.Message 
headers, which doesn't sound pretty useful to me!  The patch is sufficient for 
my broken thing (it doesn't produce a traceback at the moment - time to go for 
a sunday!), but since i don't really have a glue of mailbox.py / email/* it may 
not cover all places where a header.Header may occur but the code in fact 
assumes a str (and implicit conversion of Header to str doesn't work).

--
type: behavior - crash

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



[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

... as a last though of mine, here is a header of the well known spam mail:


From MAILER-DAEMON Sat Feb 19 15:58:47 2011
Date: =?latin1?q?Tue=2C_4_Jan_2011_17=3A37=3A26_+0100_=28CET=29?=
From: =?latin1?q?=22SAJATNAPTAR=2ECOM=22_=3Cinfo=40sajatnaptar=2Ecom=3E?=
To: =?latin1?q?source-changes=40cvs=2Eopenbsd=2Eorg?=
Subject: 
=?latin1?q?Falinapt=3Fr_ingyenes_h=3Fzhozsz=3Fll=3Ft=3Fssal=2E_M=3Fr_rendelt=3Fl=3F_Olvass_el!?=
Message-ID: =?latin1?q?=3C20110104053726system=40sajatnaptar=2Ecom=3E?=
Content-Type: =?latin1?q?text/plain=3B_charset=3Diso-8859-1?=


Shouldn't email/* be smart enough to know that Date:, Content-Type:, 
Message-ID:, plus some other well-known, RFC-documented header names need *not* 
be converted, whatever type of object is used to represent them?  This could be 
implemented with a simple {}.

Bye.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Martin v . Löwis

New submission from Martin v. Löwis mar...@v.loewis.de:

Currently, memory management for the Py_tp_doc slot in PyType_FromSpec is 
ill-defined. The doc string being passed is stored in the type object as-is, 
but later released with PyObject_Free. To make this consistent, PyType_FromSpec 
should copy the string, so that it's guaranteed that relasing the memory 
matches allocation.

Without this patch, users will have to hold onto the type objects they get from 
PyType_FromSpec forever.

--
files: tp_doc.diff
keywords: patch
messages: 128857
nosy: loewis
priority: release blocker
severity: normal
status: open
title: Memory mismanagement with Py_tp_doc
Added file: http://bugs.python.org/file20797/tp_doc.diff

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Sure it should be a blocker?

--
nosy: +georg.brandl, pitrou

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

If this isn't added, people using the API might see crashes. If they then work 
around crashes, they will see memory leaks in future releases.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, isn't Py_tp_doc characteristically bound to a constant char *, so that 
the problem doesn't manifest itself?

--

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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2011-02-19 Thread Mike Beachy

Mike Beachy mbea...@gmail.com added the comment:

I've been in contact w/ Barry Scott offline re: the monkey patch previously 
mentioned. I'm attaching a 2.7 maintenance branch patch that he has needed to 
extend, and plans to follow up on.

--
Added file: http://bugs.python.org/file20798/2_7_x.patch

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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2011-02-19 Thread Mike Beachy

Mike Beachy mbea...@gmail.com added the comment:

Attached to this comment (can you attach multiple files at once?) is the 
somewhat moldy 2.6.4 monkey patch, mercilessly ripped from my own code and 
probably not good for much.

--
Added file: http://bugs.python.org/file20799/monkey_2_6_4.py

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Georg Brandl

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

Sounds like a blocker to me.  Martin, will you be able to provide a patch 
before final?

--

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



[issue11233] clarifying Availability: Unix

2011-02-19 Thread Georg Brandl

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

That's a good point, indeed.

--

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



[issue11071] What's New review comments

2011-02-19 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Éric, go ahead an apply this patch except for the insertion of the in the 
codecs section.

I'm not making regrouping, reordering, merging or other stylistic changes at 
this point.

--

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



[issue11233] clarifying Availability: Unix

2011-02-19 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Greg Kochanski

Greg Kochanski g...@kochanski.org added the comment:

Yes, the current behaviour makes sense from a language designer's viewpoint, 
and maybe even from the user's viewpoint (if the user thinks about it a 
carefully).

But, that's not the point of a computer language.   The whole reason we program 
in languages like python instead of asm is to match the behaviour of the 
silicon to human capabilities and expectations.   So, documentation needs to go 
beyond the minimum from which an expert could deduce the system behaviour.  It 
needs to point out unexpected things that a competent programmer might miss, 
even if they could potentially have deduced that unexpected behaviour.

The trouble here is that the syntax of a generator is so much like a function 
that it's easy to think of it as being as safe and simple as a function.  It's 
not: the yield statement lets a lot of external complexity leak in that's not 
relevant to a function (unless you're writing multithreaded code).  So, the 
documentation needs to help the user avoid such problems.

--

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Greg Kochanski

Changes by Greg Kochanski g...@kochanski.org:


--
resolution: invalid - 
status: closed - open

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



[issue11071] What's New review comments

2011-02-19 Thread Éric Araujo

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

Applied in r88441.

I checked again that the issue numbers were right, and discovered that
the functions in site related to PEP 370 were actually new in 2.6, not
3.2, so you may want to remove that section.

--

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



[issue11071] What's New review comments

2011-02-19 Thread Éric Araujo

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

 I checked again that the issue numbers were right, and discovered that
 the functions in site related to PEP 370 were actually new in 2.6, not
 3.2, so you may want to remove that section.

Sorry: The functions are indeed new in 2.7/3.2, it’s the command-line
functionality (python -m site --user-base) that was already here in
previous versions.

--

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



[issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO')

2011-02-19 Thread Éric Araujo

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

The online docs are rebuilt, but people may read the version bundled with a 
tarball or installer and wonder at the discrepancy, if they notice it.

--
title: Possible error in What's new Python3.2(rc3) documentation 
(sysconfig.get_config_var) - Error in What's new 3.2rc3 with 
sysconfig.get_config_var('SO')

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



[issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO')

2011-02-19 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy:  -pitrou

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



[issue11071] What's New review comments

2011-02-19 Thread Éric Araujo

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

It appears that Misc/NEWS in 3.2 lists the new functions under the 3.1 section, 
among other strange differences.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Well, isn't Py_tp_doc characteristically bound to a constant char *

That's exactly the problem: PyType_FromSpec puts in this string literal.
When the type is later released, PyObject_Free is called in
type_dealloc, which segfaults.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Sounds like a blocker to me.  Martin, will you be able to provide a patch 
 before final?

The attached patch works fine for me.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  Sounds like a blocker to me.  Martin, will you be able to provide a patch 
  before final?
 
 The attached patch works fine for me.

Is there some documentation somewhere for all this?

--

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



[issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO')

2011-02-19 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Éric, go ahead and fix this please.

--
assignee: georg.brandl - eric.araujo

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



[issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO')

2011-02-19 Thread Éric Araujo

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

Done in r88442.  I found a missing closing quote and fixed it too.

--

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



[issue11244] Negative tuple elements produce inefficient code.

2011-02-19 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 It should. Can you test?

Ah, you're asking me to actually do some (minimal) work instead of just 
complaining?

Yep, the patch tests fine over here (OS X 10.6), and fixes the 2*(3*4) case.

--

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



[issue8300] Allow struct.pack to handle objects with an __index__ method.

2011-02-19 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Because (arguably) we don't want to be able to pack non-integral floats (or 
Decimal instances, or ...) using integer formats:

 import struct
[56090 refs]
 struct.pack('L', 2.3)
Traceback (most recent call last):
  File stdin, line 1, in module
struct.error: required argument is not an integer
[56125 refs]

--

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



[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-19 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Sorry, I'm unassigning myself from this;  I'm still following the issue, but 
just don't forsee having time to work on it at all.

--
assignee: mark.dickinson - 

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - docs@python
components: +Documentation -None
nosy: +docs@python
stage: committed/rejected - needs patch

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Sounds like a blocker to me.  Martin, will you be able to provide a patch 
 before final?

 The attached patch works fine for me.
 
 Is there some documentation somewhere for all this?

Can you please be more specific? What's all this?

That tp_doc will be copied is currently undocumented. PyType_FromSpec
is documented in the PEP.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  Sounds like a blocker to me.  Martin, will you be able to provide a patch 
  before final?
 
  The attached patch works fine for me.
  
  Is there some documentation somewhere for all this?
 
 Can you please be more specific? What's all this?
 
 That tp_doc will be copied is currently undocumented. PyType_FromSpec
 is documented in the PEP.

I meant all of py_tp_doc, limited api, restricted api show almost
zero hits in the API docs. A PEP is nice but I'm not sure many people
spontaneously read PEPs.

--

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 That tp_doc will be copied is currently undocumented. PyType_FromSpec
 is documented in the PEP.
 
 I meant all of py_tp_doc, limited api, restricted api show almost
 zero hits in the API docs. A PEP is nice but I'm not sure many people
 spontaneously read PEPs.

No, there is no documentation in the Doc directory. I *would* expect
that people interested in using the stable ABI do find the PEP and
read it. With the exception of this issue, I consider the PEP to be
complete and correct documentation (of course, it probably contains
errors that I'm unaware of).

However, documentation for the PEP 384 changes seems to be an
unrelated issue.

--

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue11249] Memory mismanagement with Py_tp_doc

2011-02-19 Thread Georg Brandl

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

OK, committed in r88443 (with error handling made more consistent).

BTW, the return from PyType_GenericAlloc isn't NULL-checked, which looks like a 
potential crasher to me.  Not release-critical though.

--
resolution:  - fixed
status: open - closed

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



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-19 Thread Éric Araujo

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

You don’t need a new function (and certainly not in the __init__ submodule, the 
right place would be the version module), just do something like this:

try:
NormalizedVersion(text)
except IrrationalVersionError:
# version is invalid

Alternative: use suggest_normalized_version, which returns a string or None, 
then display according text to prompt the user to accept the suggested version 
or type another.

--

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

This is not a bug.  It is an implementation specific detail and is not 
guaranteed behavior.  The submitted example bug is horrible code that makes 
unwarranted assumptions about the implementation -- it is an anti-pattern to 
write generators that assume that their consumers will run them to exhaustion 
so that cleanup code will be executed -- a number of tools violate this 
assumption.  If you're relying on this technique for cleanup, you're doing it 
wrong.

I'll look at this again after the 3.2 release.  When it was discussed before, 
the outcome was to introduce itertools.zip_longest() and to not over-document 
non-guaranteed implementation specific details (lest people rely on them and 
write code even worse than the OP's example).

--
assignee: docs@python - rhettinger
nosy: +rhettinger
priority: normal - low
type: behavior - feature request

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



[issue11250] 2to3 truncates files at formfeed character

2011-02-19 Thread Christoph Gohlke

New submission from Christoph Gohlke cgoh...@uci.edu:

Running Tools/Scripts/2to3.py on Python 3.2rc3 or 2.7.1 for Windows on a file 
that contains a formfeed character (0x0C, FF) results in a truncated file. 

E.g. a file (attached) with the content

print 1
FF
print 2

is incorrectly refactored:

@@ -1,4 +1,1 @@
-print 1
-
-
-print 2
+print(1)


Python 2.6.6 and 3.1.3 correctly refactor the file:

-print 1
+print(1)
 FF
-print 2
+print(2)

--
files: formfeedbug.py
messages: 128885
nosy: cgohlke
priority: normal
severity: normal
status: open
title: 2to3 truncates files at formfeed character
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file20800/formfeedbug.py

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



[issue11250] 2to3 truncates files at formfeed character

2011-02-19 Thread Christoph Gohlke

Changes by Christoph Gohlke cgoh...@uci.edu:


--
components: +2to3 (2.x to 3.0 conversion tool)

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



[issue11250] 2to3 truncates files at formfeed character

2011-02-19 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +benjamin.peterson

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



[issue11071] What's New review comments

2011-02-19 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

On Sun, Feb 20, 2011 at 4:22 AM, Éric Araujo rep...@bugs.python.org wrote:
 It appears that Misc/NEWS in 3.2 lists the new functions under the 3.1 
 section, among other strange differences.

new in 3.2 changes are relative to 3.1, while 2.7 is relative to
2.6. They're treated as separate streams of development. Since 3.1
came out well after 2.6, there are some things that were new in 2.7
that 3.1 already included.

--

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



[issue11071] What's New review comments

2011-02-19 Thread Éric Araujo

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

Thanks for the message, but I already knew that.  What I meant is that in the 
3.2 version of Misc/NEWS, the addition of the functions is listed under the 3.1 
section instead of 3.2.

--

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



[issue11251] cmd.Cmd tab completion treats dashes as spaces

2011-02-19 Thread Jon McKenzie

New submission from Jon McKenzie jcmc...@gmail.com:

I'm writing a cmd.Cmd module that operates on filenames. As such, I'm 
attempting to write tab completions that operate similar to bash. However, 
files that contain dashes (hyphens) appear to exhibit unexpected behavior.

It appears that somewhere along the line, dashes are converted into spaces for 
the purposes of tab completion.

So, for example..

(Cmd) edit blah-tabtab

Should print..

blah-1.0.0.txt  blah-2.0.0.txt

And..

(Cmd) edit blah-1tabtab

Should autocomplete to..

(Cmd) edit blah-1.0.0.txt

Instead, the following behavior occurs:

(Cmd) edit blah-tabtab

..becomes...

(Cmd) edit blah-blah

..and thus..

(Cmd) edit blah-blah-tabtab

..becomes, in turn..

(Cmd) edit blah-blah-blah

My completion function is absolutely standard, as far as I'm able to tell from 
looking at other examples (see attached)

--
files: completion.snip
messages: 12
nosy: Jon.McKenzie
priority: normal
severity: normal
status: open
title: cmd.Cmd tab completion treats dashes as spaces
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file20801/completion.snip

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Greg Kochanski

Greg Kochanski g...@kochanski.org added the comment:

The code (bug312.py) was not submitted as a pattern, but rather as an example 
of a trap into which it is easy to fall, at least for the 99% of programmers 
who are users of the language rather than its implementers.  


The basic difference is that while one can write a function that is guaranteed 
to execute to the end of its body[*]; one cannot do that with a generator 
function.   This point ought to be made in the documentation.
[* Neglecting SIGKILL and perhaps a few abnormal cases.]

The current documentation emphasizes the analogy to functions (which can be 
misleading) and (in section 6.8) explictly says that the normal behaviour of a 
generator function is to run all the way to completion.

--

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



[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-19 Thread Suresh Kalkunte

New submission from Suresh Kalkunte sskalku...@gmail.com:

Referring to URL for files used to build the Apache Portable Runtime Utilities 
library using Python 2.7.1(AMD64) or 2.6.5(Cygwin) on a Win32 system (Windows 
7), when apr/build/gen-build.py 
(http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/build/gen-build.py?revision=886996view=markup)
 parses '\' on line 96 and 97 in apr-util/build.conf 
(http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/build.conf?revision=886996view=markup),
 it recognizes them as separate tokens causing the script to fail on line 168 
assert file[-2:] == '.c'. If the line continuation notation ('\') is removed 
from build.conf, gen-build.py performs without errors. 

On a Redhat Linux, I have verified Python 2.5.5 (and trust 2.7.1 to provide the 
same behavior on Linux) handles '\' without errors leading me to believe that 
if this is a bug, it is only on Win32 platform (and instances where '\' is used 
for directory path separation).

I am new to Python, from searching the python bug database, I have not been 
able to find the above condition covered. If this bug has already been 
identified, please disregard.

--
components: Interpreter Core, Windows
messages: 128890
nosy: Suresh.Kalkunte
priority: normal
severity: normal
status: open
title: Handling statement OR assignment continuation '\' on Win32 platform
type: behavior
versions: Python 2.6, Python 2.7

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



[issue8300] Allow struct.pack to handle objects with an __index__ method.

2011-02-19 Thread Matt Joiner

Matt Joiner anacro...@gmail.com added the comment:

Thanks Mark for clearing that up. I found this link to be useful in explaining 
the purpose of __index__: 
http://docs.python.org/release/2.5.1/whatsnew/pep-357.html

I think the choice of allowing only __index__ was the right choice.

--

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



[issue11248] Tails of generator get lost under zip()

2011-02-19 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

I've looked at the docs again and think they're fine.  And in the 3.x docs, the 
iterator version of zip() specifies its implementation with a pure python 
equivalent that makes it clear that the iterator is not run to exhaustion.  

Note that zip() has existed since 2.0 and iterators/generators since 2.2.  The 
docs for them have worked just fine, so I wouldn't worry too much about their 
being a trap for 99% of programmers who aren't implementers.

GPK, I can see that you're wound-up about this, but you seem to have a profound 
misunderstanding about iterators/generators and have incorrectly assumed an 
implied contract for consumer functions to completely consume their inputs.  
Sorry, but I'm going to close this one.  For further discussion, I recommend 
the python tutor mailing list.

--
resolution:  - invalid
status: open - closed

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



[issue11253] autodocument first appearance of ctypes.wintypes constants

2011-02-19 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

I've just noticed that my application is incompatible with Python 2.5, because 
ctypes.wintypes is missing SHORT constants. However, I can't find the 
information when these symbols were introduced first. To prevent such confusion 
in future it would be nice to extract symbol information for each Python 
release and automatically include the version of the first appearance in 
documentation.

--
assignee: docs@python
components: Documentation
messages: 128893
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: autodocument first appearance of ctypes.wintypes constants
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



  1   2   >