[Click the star to watch this topic] HOT LINKS FOR YOUTH ONLY

2012-04-11 Thread e kartheeka
[Click the star to watch this topic]HOT LINKS FOR YOUTH ONLY -- http://mail.python.org/mailman/listinfo/python-list

Re: f python?

2012-04-11 Thread WJ
Xah Lee wrote: so recently i switched to a Windows version of python. Now, Windows version takes path using win backslash, instead of cygwin slash. This fucking broke my find/replace scripts that takes a dir level as input. Because i was counting slashes. Slashes can work under windows, up

Re: functions which take functions

2012-04-11 Thread Kiuhnm
On 4/10/2012 23:43, Eelco wrote: On Apr 10, 3:36 am, Kiuhnmkiuhnm03.4t.yahoo.it wrote: On 4/10/2012 14:29, Ulrich Eckhardt wrote: Am 09.04.2012 20:57, schrieb Kiuhnm: Do you have some real or realistic (but easy and self-contained) examples when you had to define a (multi-statement)

Re: functions which take functions

2012-04-11 Thread Dave Angel
On 04/11/2012 06:55 AM, Kiuhnm wrote: On 4/10/2012 23:43, Eelco wrote: On Apr 10, 3:36 am, Kiuhnmkiuhnm03.4t.yahoo.it wrote: On 4/10/2012 14:29, Ulrich Eckhardt wrote: Am 09.04.2012 20:57, schrieb Kiuhnm: Do you have some real or realistic (but easy and self-contained) examples when you

Webhosting, Domain Name, Data Center Cyprus, Hosting Services

2012-04-11 Thread Webhosting, Domain Name, Data Center Cyprus, Hosting Services
Webhosting – postcy - a leading web hosting company. We offer webhosting, domain name, hosting services, cyprus domain, domain names cyprus at affordable cost. for more details please contact : http://www.postcy.com/ -- http://mail.python.org/mailman/listinfo/python-list

Donald E. Knuth in Python, cont'd

2012-04-11 Thread Antti J Ylikoski
I wrote about a straightforward way to program D. E. Knuth in Python, and received an excellent communcation about programming Deterministic Finite Automata (Finite State Machines) in Python. The following stems from my Knuth in Python programming exercises, according to that very good

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread Grant Edwards
On 2012-04-11, Antti J Ylikoski antti.yliko...@tkk.fi wrote: I wrote about a straightforward way to program D. E. Knuth in Python, Yikes. I think if you're going to try to write AI in Pyton, you might want to start out programming something a bit simpler... ;) -- Grant Edwards

Re: f python?

2012-04-11 Thread Seymour J.
In 87wr5nl54w@sapphire.mobileactivedefense.com, on 04/10/2012 at 09:10 PM, Rainer Weikusat rweiku...@mssgmbh.com said: 'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the first/rest terminology can be sensibly applied to 'C strings' (which are similar to linked-lists in

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread Antti J Ylikoski
On 11.4.2012 16:23, Grant Edwards wrote: On 2012-04-11, Antti J Ylikoskiantti.yliko...@tkk.fi wrote: I wrote about a straightforward way to program D. E. Knuth in Python, Yikes. I think if you're going to try to write AI in Pyton, you might want to start out programming something a bit

Re: functions which take functions

2012-04-11 Thread Antti J Ylikoski
On 9.4.2012 21:57, Kiuhnm wrote: Do you have some real or realistic (but easy and self-contained) examples when you had to define a (multi-statement) function and pass it to another function? Thank you. Kiuhnm A function to numerically integrate another function comes as follows:

Re: f python?

2012-04-11 Thread Kaz Kylheku
[Followup-To: header set to comp.lang.lisp.] On 2012-04-11, Shmuel Metz spamt...@library.lspace.org.invalid wrote: In 87wr5nl54w@sapphire.mobileactivedefense.com, on 04/10/2012 at 09:10 PM, Rainer Weikusat rweiku...@mssgmbh.com said: 'car' and 'cdr' refer to cons cells in Lisp, not to

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread mwilson
Antti J Ylikoski wrote: I wrote about a straightforward way to program D. E. Knuth in Python, and received an excellent communcation about programming Deterministic Finite Automata (Finite State Machines) in Python. [ ... ] #You can adjust that for your needs. Sometimes I have the states

Re: f python?

2012-04-11 Thread Rainer Weikusat
Shmuel (Seymour J.) Metz spamt...@library.lspace.org.invalid writes: In 87wr5nl54w@sapphire.mobileactivedefense.com, on 04/10/2012 at 09:10 PM, Rainer Weikusat rweiku...@mssgmbh.com said: 'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the first/rest terminology can be

python module development workflow

2012-04-11 Thread Peng Yu
Hi, It is confusing to me what the best workflow is for python module development. There is setup.py, egg. Also, pip, easy_install. Could any expert suggest an authoritative and complete guide for developing python modules? Thanks! Regards, Peng --

Re: python module development workflow

2012-04-11 Thread John Gordon
In 2900f481-fbe9-4da3-a7ca-5485d1ceb...@m13g2000yqc.googlegroups.com Peng Yu pengyu...@gmail.com writes: It is confusing to me what the best workflow is for python module development. There is setup.py, egg. Also, pip, easy_install. It's unclear what you are asking. How to develop your own

Re: f python?

2012-04-11 Thread Pascal J. Bourguignon
Shmuel (Seymour J.) Metz spamt...@library.lspace.org.invalid writes: In 87wr5nl54w@sapphire.mobileactivedefense.com, on 04/10/2012 at 09:10 PM, Rainer Weikusat rweiku...@mssgmbh.com said: 'car' and 'cdr' refer to cons cells in Lisp, not to strings. How the first/rest terminology can be

Re: python module development workflow

2012-04-11 Thread Peng Yu
On Apr 11, 10:25 am, John Gordon gor...@panix.com wrote: In 2900f481-fbe9-4da3-a7ca-5485d1ceb...@m13g2000yqc.googlegroups.com Peng Yu pengyu...@gmail.com writes: It is confusing to me what the best workflow is for python module development. There is setup.py, egg. Also, pip, easy_install.

red-black tree data structure

2012-04-11 Thread Jabba Laci
Hi, It's not really a Python-related question, sorry for that. Does anyone know why red-black trees got these colors in their names? Why not blue-orange for instance? I'm just curious. Thanks, Laszlo -- http://mail.python.org/mailman/listinfo/python-list

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread Kurt Mueller
Am 11.04.2012 16:38, schrieb mwil...@the-wire.com: Antti J Ylikoski wrote: I wrote about a straightforward way to program D. E. Knuth in Python, Maybe it's godly coded... $ python Easter.py The year: 2012 (20, 'th ', 'APRIL, ', 2012) $ AFAIK it was the 8th of April 2012? Grüessli --

Re: red-black tree data structure

2012-04-11 Thread Ian Kelly
On Wed, Apr 11, 2012 at 11:14 AM, Jabba Laci jabba.l...@gmail.com wrote: Hi, It's not really a Python-related question, sorry for that. Does anyone know why red-black trees got these colors in their names? Why not blue-orange for instance? I'm just curious.

How to filter a dictionary ?

2012-04-11 Thread Wenhua Zhao
Hi, Nikhil Verma writes: In [9]: (k for k,v in for_patient_type.iteritems() if v == 'Real') You can use dict comprehension, just change () to {}. for_patient_type = {37: u'Test', 79: u'Real', 80: u'Real', 81: u'Real', 83: u'Real', 84: u'Real', 91: u'Real', 93: u'Real'} {k:v for k,v in

Re: red-black tree data structure

2012-04-11 Thread Jabba Laci
Hi, Thanks for the answer. I copy the solution here: According to wikipedia: The original structure was invented in 1972 by Rudolf Bayer and named symmetric binary B-tree, but acquired its modern name in a paper in 1978 by Leonidas J. Guibas and Robert Sedgewick. Answer from Professor Guidas:

Wing IDE 4.1.5 released

2012-04-11 Thread Wingware
Hi, Wingware has released version 4.1.5 of Wing IDE, an integrated development environment designed specifically for the Python programming language. Wing IDE is a cross-platform Python IDE that provides a professional code editor with vi, emacs, and other key bindings, auto-completion, call

Re: functions which take functions

2012-04-11 Thread Tim Chase
On 04/10/12 08:36, Kiuhnm wrote: On 4/10/2012 14:29, Ulrich Eckhardt wrote: Am 09.04.2012 20:57, schrieb Kiuhnm: That won't do. A good example is when you pass a function to re.sub, for instance. If that's a good example, then why not use it? I've used it on multiple occasions to do

[RELEASED] Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3

2012-04-11 Thread Benjamin Peterson
We're bursting with enthusiasm to announce the immediate availability of Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3. These releases included several security fixes. Note: Virtualenvs created with older releases in the 2.6, 2.7, 3.1, or 3.2 series may not work with these bugfix releases. Specifically,

Re: Python Library or Module for clipping audio files

2012-04-11 Thread Miki Tebeka
I'm trying to find a good python library/module that will allow me to clip audio files, preferably mp3/ogg format. Does anyone have any good suggestions? I never used it, but I think pymedia might fit the bill. -- http://mail.python.org/mailman/listinfo/python-list

Re: python module development workflow

2012-04-11 Thread Miki Tebeka
Could any expert suggest an authoritative and complete guide for developing python modules? Thanks! I'd start with http://docs.python.org/distutils/index.html -- http://mail.python.org/mailman/listinfo/python-list

Framework for a beginner

2012-04-11 Thread biofobico
I am new to python and only have read the Byte of Python ebook, but want to move to the web. I am tired of being a CMS tweaker and after I tried python, ruby and php, the python language makes more sense (if that makes any sense for the real programmers). I heard a lot of good things about

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread John Nagle
On 4/11/2012 6:03 AM, Antti J Ylikoski wrote: I wrote about a straightforward way to program D. E. Knuth in Python, and received an excellent communcation about programming Deterministic Finite Automata (Finite State Machines) in Python. The following stems from my Knuth in Python programming

Re: red-black tree data structure

2012-04-11 Thread Dan Stromberg
Bringing this back to Python a bit: http://newcenturycomputers.net/projects/rbtree.html http://pypi.python.org/pypi/bintrees/0.3.0 http://pypi.python.org/pypi/treap/0.995 Red-Black trees are supposed to be slower than treaps on average, but they're also supposed to have a lower standard

trac.util

2012-04-11 Thread cerr
Hi, I want to install some python driver on my system that requires trac.util (from Image.py) but I can't find that anywhere, any suggestions, anyone? Thank you very much, any help is appreciated! Error: File /root/weewx/bin/Image.py, line 32, in module from trac.util import escape

Re: trac.util

2012-04-11 Thread Benjamin Kaplan
On Wed, Apr 11, 2012 at 4:52 PM, cerr ron.egg...@gmail.com wrote: Hi, I want to install some python driver on my system that requires trac.util (from Image.py) but I can't find that anywhere, any suggestions, anyone? Thank you very much, any help is appreciated! Error: File

Re: Framework for a beginner

2012-04-11 Thread Micky Hulse
Hello, I've got more experience with PHP stuff, but for Python, I would recommend checking out Django getting started: https://docs.djangoproject.com/en/dev/intro/ ... to see if you like it. Having used a few PHP frameworks and CMSs, I really dig that Django has a built-in admin; I am in the

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread Dan Sommers
On Wed, 11 Apr 2012 13:20:29 -0700 John Nagle na...@animats.com wrote: You don't need those books as much as you used to. You don't have to write collections, hash tables, and sorts much any more. Those are solved problems and there are good libraries. Most of the basics are built into

RE: Framework for a beginner

2012-04-11 Thread Ed W LaHay
You may want to look at udacity.com CS101. This is a free web based training program. CS101 introduces Python the next sessions starts the week of April 16. During the 7 weeks of sessions you will build a web browser. Ed W LaHay +1 925 429 1958 -Original Message- From:

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread Antti J Ylikoski
On 11.4.2012 23:20, John Nagle wrote: On 4/11/2012 6:03 AM, Antti J Ylikoski wrote: I wrote about a straightforward way to program D. E. Knuth in Python, and received an excellent communcation about programming Deterministic Finite Automata (Finite State Machines) in Python. The following

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread Mark Lawrence
On 11/04/2012 22:03, Dan Sommers wrote: These days, every job interview includes (or should include!) questions regarding which structures and which algorithms are better (or worse) for which circumstances, not to mention questions about algorithm complexity and big-O-notation. I find that

[ANN] Distutils2 Sprint in Montreal

2012-04-11 Thread Éric Araujo
Hi all, The Montreal-Python user group (http://montrealpython.org/) is hosting a sprint on the 21st of April to work on Distutils2. I will lead the sprint and commit the patches into the main distutils2 and cpython repositories, with the help of a few local hackers. If you live in Montreal,

FrinzoO Themes | Download Premium WordPress Themes For Free

2012-04-11 Thread hazem dahab
FrinzoO Themes give you magento themes,magento extensions,joomla templates,joomla extensions,wordpress theme,web templates,graphic Visit us at http://www.frinzoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Framework for a beginner

2012-04-11 Thread Louis des Landes
A simpler version of Django or Pyramid is 'Flask' It's doco is great and aimed at a reasonably entry level. It's still quite powerful, but easier to set up to start with: http://flask.pocoo.org/ Louis. http://psykar.com -- http://mail.python.org/mailman/listinfo/python-list

Re: f python?

2012-04-11 Thread Tim Roberts
WJ w_a_x_...@yahoo.com wrote: Slashes can work under windows, up to a point: ALL Windows APIs accept forward slashes. The only place they are not accepted is command line commands that take options which can begin with forward slash. Also, most languages I use under windows allow you to use

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The doc for the html module was added in 5633af590057 (see #2830) and it was previously undocumented even if it was importable. Moving the versionadded under html.escape sounds good to me. As a side note, it would be better to do try:

[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-04-11 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: A minor detail of efficiency: _url_collapse_path_split is used only one place, from is_cgi. _url_collapse_path_split splits the path, and is_cgi now puts it back together. This seems inefficient. Would it not be better for

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: html is a package. The html.parser module, which was already in 3.0, cannot be importable without a html package, so in all 3.x versions there was at least an empty html/__init__.py. That said, I have no objection to Ezio's suggestion.

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +haypo status: open - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14532 ___ ___

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- status: - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14532 ___ ___

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: if response == digest: can be replaced by: if sum(x^y for x, y in itertools.zip_longest(response, digest, fillvalue=256)) == 0: I hope that zip_longest() does not depend too much on response and digest. --

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: A few comments: 1) with cv: make_an_item_available() + cv.notify() 2) one of the benefits of wait_for() is that it automates the tricky timekeeping needed if one wants an somewhat accurate timeout, you may want to

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com added the comment: Ezio, I appreciate the suggestion/tip. Thanks. Regarding Georg's clarification that 'html is a package,' I don't know if that was intended to correct my comment, Ezio's comment, the docs, or all of the above. In any case, that point

[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-04-11 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: I note that there is no test for tail_part == '.'. I suggest adding a couple, such as the following which I added to my local copy for testing of the next item: '/a/b/.': ('/a/b', ''),

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: The comment that html was a package was not meant as a correction, but as an explanation why it already exists previous to its status as an official module in 3.2. No correction to packageis needed. --

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: A few comments: 1) with cv: make_an_item_available() + cv.notify() Did I forget this? Ow. 2) one of the benefits of wait_for() is that it automates the tricky timekeeping needed if one wants an somewhat accurate timeout,

[issue14387] Include\accu.h incompatible with Windows.h

2012-04-11 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f91ecbc8bafc by Kristján Valur Jónsson in branch '3.2': Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers. http://hg.python.org/cpython/rev/f91ecbc8bafc --

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: But, once again, the condition may not yet hold true is false. In our current implementation, yes. But it is intentionally left undefined in the specification of the condition variable protocol, for very good reasons. While I'm

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le mercredi 11 avril 2012 à 10:50 +, Kristján Valur Jónsson a écrit : But, once again, the condition may not yet hold true is false. In our current implementation, yes. But it is intentionally left undefined in the specification of the

[issue8536] Support new features of ZLIB 1.2.4

2012-04-11 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- keywords: -easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8536 ___ ___ Python-bugs-list

[issue1522400] irda socket support

2012-04-11 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1522400 ___ ___

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: if response == digest: can be replaced by:    if sum(x^y for x, y in itertools.zip_longest(response, digest, fillvalue=256)) == 0: Yeah, sure, but is it useful at all? The digest changes at every connection attempt, so this should

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: [...] Disagreed. Unit tests should definitely protect against the introduction of bugs (willingly or not). And unpredictable behaviour is usually considered a bug. If you think the condition variable specification should be

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le mercredi 11 avril 2012 à 11:32 +, Charles-François Natali a écrit : One can imagine, for example, that another implementation (or maybe CPython in a later version) exposes native condition variables on POSIX, instead of emulating them

[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2012-04-11 Thread Yap Sok Ann
Yap Sok Ann sok...@gmail.com added the comment: On 64-bit Windows with Visual Studio 2008 Professional, I also need to apply vcvars4.diff to avoid getting the ValueError. Is this something to be expected? -- nosy: +sayap ___ Python tracker

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Rather than ensuring that f_tstate always points to the current frame, just remove it altogether. Patch attached -- nosy: +Mark.Shannon Added file: http://bugs.python.org/file25176/remove_f_tstate.patch

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Bill Jefferson
Bill Jefferson shagge...@yahoo.com added the comment: Eric. Thanks for answering, but I don't understand the difference between reversing a list and reversing it's current values. If I have a list containing elements: A, B, C, D and reverse the list's current values, I get: D, C, B, A,

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: According to PEP 384 (Defining a Stable ABI) the thread state object is opaque, so we should be free to add or remove fields. Nevertheless, I have added a new patch that simply moves the f_exc... fields from the frame object to the generator. It

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: According to PEP 384 (Defining a Stable ABI) the thread state object is opaque, so we should be free to add or remove fields. Mmh, be aware the stable ABI is only a restricted part of the official API. There are APIs which are not part of the

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Bill, list.reverse doesn't do any *sorting* at all; it merely *reverses* the list contents. x = [1, 3, 4, 2] x.reverse() x [2, 4, 3, 1] If you want to do a reverse sort, you can either first sort normally and then reverse the result,

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I have a possible suggestion about how to resolve this issue: The SysLogHandler will not do BOM insertion unless the message is Unicode. If it is Unicode, it will add the attribute 'UTF8BOM' to the LogRecord, with the value u'\ufeff'. The

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Thanks, Mark. Indeed, my answer as written is meaningless. I meant it doesn't sort in reverse, it just reverses. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14542

[issue1522400] irda socket support

2012-04-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1522400 ___ ___ Python-bugs-list

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide j...@oberheide.org added the comment: In fact, it'd probably be useful to have a time_independenct_comparison() helper function somewhere in general. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14532

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide j...@oberheide.org added the comment: Ah yeah, I suppose it's not be exploitable in this case due to the challenge nonce. However, it might still be a good thing to fix for to set an example for other hmac module users (internal or external) that might not have the same

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I don't see the point of obfuscating the code to avoid a vulnerability to which the code is not even vulnerable, just so that it can be used as example... There are *thousands* of ways to introduce security flaws, and the Python code

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide j...@oberheide.org added the comment: You call it obfuscating, I call it security correctness and developer education. Tomayto, tomahto. ;-) Anywho, your call of course, feel free to close. -- ___ Python tracker rep...@bugs.python.org

[issue14546] lll.py can't handle multiple parameters correctly

2012-04-11 Thread Carton He
New submission from Carton He carto...@gmail.com: Space errors in calling of lll(arg) of main() cause it only applies to the last parameter instead of all parameters. Patch attached for Python 3.1 -- components: Demos and Tools files: lll.py.patch keywords: patch messages: 158036

[issue14546] lll.py can't handle multiple parameters correctly

2012-04-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the patch. Do you have any interest in writing a test for this? Tests for tools go in Lib/test/test_tools.py. -- nosy: +r.david.murray stage: - test needed type: - behavior versions: +Python 3.2, Python 3.3 -Python

[issue14547] Python symlink to script behaves unexpectedly

2012-04-11 Thread Johannes Buchner
New submission from Johannes Buchner buchner.johan...@gmx.at: If I have a script foo/bar.py import baz and create a symlink to it, called barhere.py ln -s foo/bar.py barhere.py when I run it, it behaves unexpectedly, specifically it behaves differently than if I had copied it here. It

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: You call it obfuscating, I call it security correctness and developer education. Tomayto, tomahto. ;-) Well, I'd be prompt to changing to a more robust digest check algorithm if the current one had a flaw, but AFAICT, it's not the

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread sbt
sbt shibt...@gmail.com added the comment: I think it would be reasonable to add a safe comparison function to hmac. Its documentation could explain briefly when it would be preferable to ==. -- ___ Python tracker rep...@bugs.python.org

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Bill Jefferson
Bill Jefferson shagge...@yahoo.com added the comment: Mark and Eric.. Wonderful! I got it now. I used x.sort(reverse=True) and x.sort(reverse=False) and it works just fine. Thanks for your help. Bill..   Regards from: William Jefferson Photography 514 Daniels St., #211 Raleigh, NC

[issue14341] sporadic (?) test_urllib2 failures

2012-04-11 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 751c7b81f6ee by Senthil Kumaran in branch 'default': use assertWarns instead of check_warnings - Issue14341 http://hg.python.org/cpython/rev/751c7b81f6ee -- nosy: +python-dev

[issue14341] sporadic (?) test_urllib2 failures

2012-04-11 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Hi Antoine, I saw that check_warnings was commonly used ( and perhaps I had used to earlier without any problems) and overlooked assertWarns. But I think, it is good to remove support.check_warnings dependency here and just use

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It would also be reasonable to add a comment to the code mentioning why this particular (security) comparison is *not* vulnerable to a timing attack, which would serve the education purpose if someone does look at the code. --

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide j...@oberheide.org added the comment: One thing that could definitely be interesting is to look through the code base and example to see if a similar - but vulnerable - pattern is used, and fix such occurrences. Based on some quick greps, I didn't see many internal users of

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: But why on earth would one want a BOM in UTF-8-encoded data? It is byte-order independent! -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14452

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: It's used by some systems (Windows Notepad does this if you save as UTF8) to indicate that the byte stream *is* UTF8-encoded. It's not so much a BOM as a magic cookie. I can't speak for syslog, I'm afraid TJG -- nosy: +tim.golden

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: But why on earth would one want a BOM in UTF-8-encoded data? It is byte-order independent! Lord only knows, but the RFC does call for it - msg157572 has an actual excerpt from RFC 5424. --

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread sbt
New submission from sbt shibt...@gmail.com: When running test_multiprocessing on Linux I occasionally see a stream of errors caused by ignored weakref callbacks: Exception AssertionError: AssertionError() in Finalize object, dead ignored These do not cause the unittests to fail. Finalizers

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2776ccf003cc by Georg Brandl in branch '3.2': Closes #14545: make clearer what was added. http://hg.python.org/cpython/rev/2776ccf003cc New changeset f5f8a7fd881c by Georg Brandl in branch 'default': #14545: merge

[issue13903] New shared-keys dictionary implementation

2012-04-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I don't really understand your objection to changing the method-cache size. As I said, I can remove the change, but that will cause the performance regression that Antoine noticed. -- ___ Python

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Disabling gc during fork seems to prevent the errors. Sounds reasonable to me. -- components: +Library (Lib) nosy: +neologix, pitrou type: - behavior versions: +Python 2.7, Python 3.2, Python 3.3

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: For projects with more than a few packages, it is tedious to list all subpackages manually in setup.cfg. There was once a find_packages in distutils2.util (copied from distribute), but when we moved away from setup.py it was removed (I don’t

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14548 ___ ___

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Erik Bray
Erik Bray erik.m.b...@gmail.com added the comment: +1 for the wildcard syntax. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14549 ___ ___

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Erik Bray
Erik Bray erik.m.b...@gmail.com added the comment: Potential downside: Say I have foo, foo.bar, and foo.tests. I want to install foo and foo.bar, but not foo.tests. Then I have to manually list all the packages I do want: packages = foo foo.bar That's fine, but one nice thing about

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Craig Sawyer
New submission from Craig Sawyer csaw...@yumaed.org: we have os.path.abspath() and os.path.realpath(). the difference according to the documentation is realpath() returns the physical path (i.e. no symlinks in the path). while abspath() uses getcwd() but because of POSIX.1-2008 (IEEE Std

[issue14547] Python symlink to script behaves unexpectedly

2012-04-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The content of a symbolic symlink is a symbolic reference to another location in the file system. If you had used a hard link it would certainly work as you expected. The behavior with respect to symbolic links ought to be documented

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: while abspath() uses getcwd() but because of POSIX.1-2008 (IEEE Std 1003.1-2008) says os.getcwd() returns without symbolic links as well, so os.path.abspath() == os.path.realpath() near as I can tell. Just because getcwd() doesn't contain any

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: IMO the best behavior would be to always recurse and have an option to exclude specific submodules. When the Django devs want to package their code, they think about a Python package named django, docs and scripts, not about django,

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Craig Sawyer
Craig Sawyer csaw...@yumaed.org added the comment: Antoine, I see your point about getcwd() not having symlinks, doesn't mean any path outside of getcwd() might have symlinks, and I agree this is true. I apologize. As for which one to choose, it should choose based on PWD (i.e. the current

[issue14550] os.path.abspath() should have an option to use PWD

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, reformulating the title a bit. -- components: +Library (Lib) -None title: os.path.abspath() returns physical path, not logical path. - os.path.abspath() should have an option to use PWD versions: -Python 2.6, Python 2.7, Python 3.1,

  1   2   >