ANN: SfePy 2010.2 released

2010-05-10 Thread Robert Cimrman
I am pleased to announce release 2010.2 of SfePy. Description --- SfePy (simple finite elements in Python) is a software for solving systems of coupled partial differential equations by the finite element method. The code is based on NumPy and SciPy packages. It is distributed under the

Re: Picking a license

2010-05-10 Thread Carl Banks
On May 9, 10:08 am, Paul Boddie p...@boddie.org.uk wrote: On 9 Mai, 09:05, Carl Banks pavlovevide...@gmail.com wrote: Bottom line is, GPL hurts everyone: the companies and open source community.  Unless you're one of a handful of projects with sufficient leverage, or are indeed a petty

Re: Fastest way to calculate leading whitespace

2010-05-10 Thread Stefan Behnel
dasacc22, 08.05.2010 19:19: This is a simple question. I'm looking for the fastest way to calculate the leading whitespace (as a string, ie ''). Here is an (untested) Cython 0.13 solution: from cpython.unicode cimport Py_UNICODE_ISSPACE def leading_whitespace(unicode ustring):

Re: Fastest way to calculate leading whitespace

2010-05-10 Thread Stefan Behnel
Stefan Behnel, 10.05.2010 08:54: dasacc22, 08.05.2010 19:19: This is a simple question. I'm looking for the fastest way to calculate the leading whitespace (as a string, ie ' '). Here is an (untested) Cython 0.13 solution: from cpython.unicode cimport Py_UNICODE_ISSPACE def

Re: solve a newspaper quiz

2010-05-10 Thread Francesco Bochicchio
On 9 Mag, 11:20, superpollo ute...@esempio.net wrote: if a b c are digits, solve ab:c=a*c+b solved in one minute with no thought: for a in range(10):      for b in range(10):          for c in range(10):              try:                  if (10.*a+b)/c==a*c+b:                      print

Extract all words that begin with x

2010-05-10 Thread Jimbo
Hello I am trying to find if there is a string OR list function that will search a list of strings for all the strings that start with 'a' return a new list containing all the strings that started with 'a'. I have had a search of Python site I could not find what I am looking for, does a

Re: Extract all words that begin with x

2010-05-10 Thread Xavier Ho
Have I missed something, or wouldn't this work just as well: list_of_strings = ['2', 'awes', '3465sdg', 'dbsdf', 'asdgas'] [word for word in list_of_strings if word[0] == 'a'] ['awes', 'asdgas'] Cheers, Xav On Mon, May 10, 2010 at 6:40 PM, Jimbo nill...@yahoo.com wrote: Hello I am trying

Re: Extract all words that begin with x

2010-05-10 Thread superpollo
Jimbo ha scritto: Hello I am trying to find if there is a string OR list function that will search a list of strings for all the strings that start with 'a' return a new list containing all the strings that started with 'a'. I have had a search of Python site I could not find what I am

Re: unable to get Hudson to run unit tests

2010-05-10 Thread Jean-Michel Pichavant
Stefan Behnel wrote: j vickroy, 07.05.2010 20:44: I apologize if this is not the appropriate forum for a question about Hudson (http://hudson-ci.org/), but I did not know where else to ask and my web searches have not been fruitful. Certainly nice to read something about Hudson in this forum,

NFL NBA MLB NHL jersey free shipping paypal payment

2010-05-10 Thread world-trade
AAA quality clothes cheap wholesale . (http:// www.jordanonline06.com/) NFL jersey wholesale (http://www.jordanonline06.com/) NFL NBA MLB NHL soccer soccer jerseys (http:// www.jordanonline06.com/) nike brand,MLB jerseys china supplier (http:// www.jordanonline06.com/) MLB jerseys china

Re: Extract all words that begin with x

2010-05-10 Thread James Mills
On Mon, May 10, 2010 at 6:50 PM, Xavier Ho cont...@xavierho.com wrote: Have I missed something, or wouldn't this work just as well: list_of_strings = ['2', 'awes', '3465sdg', 'dbsdf', 'asdgas'] [word for word in list_of_strings if word[0] == 'a'] ['awes', 'asdgas'] I would do this for

Re: Extract all words that begin with x

2010-05-10 Thread superpollo
superpollo ha scritto: Jimbo ha scritto: Hello I am trying to find if there is a string OR list function that will search a list of strings for all the strings that start with 'a' return a new list containing all the strings that started with 'a'. I have had a search of Python site I could

Re: idiomatic way to collect and report multiple exceptions?

2010-05-10 Thread Jean-Michel Pichavant
Ben Cohen wrote: Apologies for the TABs -- I wrote that example for demonstration purposes in my mail client -- I'll copy and paste from a real code editor in the future. Ben There's nothing to apologies for. Be wary of those trying to get you out of the right path, they will lie to you

Re: Picking a license

2010-05-10 Thread Paul Boddie
On 10 Mai, 03:09, Patrick Maupin pmau...@gmail.com wrote: On May 9, 6:39 pm, Paul Boddie p...@boddie.org.uk wrote: but if they aren't pitching it directly at you, why would you believe that they are trying to change your behaviour? Because I've seen people specifically state that their

Re: accessing superclass methods from subclass

2010-05-10 Thread Jean-Michel Pichavant
ben wrote: Ok, thanks for the info. What would be a better way to do this? What I'm trying to do is treat things in a reasonable OOP manner (all fairly new to me, esp. in Python). Here's a made-up example with a little more context. Let's say you're making a drawing program that can draw

Re: Kindly show me a better way to do it

2010-05-10 Thread Jean-Michel Pichavant
Oltmans wrote: On May 9, 1:53 am, superpollo ute...@esempio.net wrote: add = lambda a,b: a+b for i in reduce(add,a): print i This is very neat. Thank you. Sounds like magic to me. Can you please explain how does that work? Many thanks again. shorter nicer IMO. Those

Re: Python is cool!!

2010-05-10 Thread lkcl
On Mar 23, 4:55 pm, Jose Manuel jfernan...@gmail.com wrote: I have been learning Python, and it is amazing I am using the tutorial that comes with the official distribution. At the end my goal is to develop applied mathematic in engineering applications to be published on the Web,

Is Python a functional programming language?

2010-05-10 Thread Samuel Williams
Dear Friends, Is Python a functional programming language? Is this a paradigm that is well supported by both the language syntax and the general programming APIs? I heard that lambdas were limited to a single expression, and that other functional features were slated for removal in Python

unittest not being run

2010-05-10 Thread John Maclean
hi, can some one explain why the __first__ test is not being run? #!/usr/bin/env python import unittest # {{{ class T1TestCase(unittest.TestCase): def setUp(self): pass # can we use global variables here? def tearDown(self): pass # garbage collection def

Re: Picking a license

2010-05-10 Thread Paul Boddie
On 10 Mai, 08:31, Carl Banks pavlovevide...@gmail.com wrote: On May 9, 10:08 am, Paul Boddie p...@boddie.org.uk wrote: Oh sure: the GPL hurts everyone, like all the companies who have made quite a lot of money out of effectively making Linux the new enterprise successor to Unix, plus all

Upgrade Python 2.6.4 to 2.6.5

2010-05-10 Thread Werner F. Bruhin
Just upgraded on my Windows 7 machine my copy of 2.6.4 to 2.6.5. However doing sys.version still shows 2.6.4 even so python.exe is dated 19. March 2010 with a size of 26.624 bytes. Is this a known issue? Or did I do something wrong? If I install to a new folder all is well, but I would have

Re: unittest not being run

2010-05-10 Thread Joe Riopel
On Mon, May 10, 2010 at 8:38 AM, John Maclean jaye...@gmail.com wrote: hi, can some one explain why the __first__ test is not being run? It looks like you defined test_T1 inside of the tearDown method. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python a functional programming language?

2010-05-10 Thread Stefan Behnel
Samuel Williams, 10.05.2010 14:24: Is Python a functional programming language? No. Python is a multi-paradigm language. But it does have functions (and methods) as first-class objects. Is this a paradigm that is well supported by both the language syntax and the general programming APIs?

Re: Is Python a functional programming language?

2010-05-10 Thread Bruno Desthuilliers
Samuel Williams a écrit : Dear Friends, Is Python a functional programming language? Depends on your definition of functional programming language, but well, not really. It's mostly an imperative, object-oriented (but not pure-object) language. It has some restricted support for some

Re: unable to get Hudson to run unit tests

2010-05-10 Thread j vickroy
Stefan Behnel wrote: j vickroy, 07.05.2010 20:44: I apologize if this is not the appropriate forum for a question about Hudson (http://hudson-ci.org/), but I did not know where else to ask and my web searches have not been fruitful. Certainly nice to read something about Hudson in this forum,

Re: unable to get Hudson to run unit tests

2010-05-10 Thread j vickroy
Jean-Michel Pichavant wrote: Stefan Behnel wrote: j vickroy, 07.05.2010 20:44: I apologize if this is not the appropriate forum for a question about Hudson (http://hudson-ci.org/), but I did not know where else to ask and my web searches have not been fruitful. Certainly nice to read

Re: unittest not being run

2010-05-10 Thread J. Cliff Dyer
My guess is you mixed tabs and spaces. One tab is always treated by the python interpreter as being equal to eight spaces, which is two indentation levels in your code. Though if it were exactly as you show it, you'd be getting a syntax error, because even there, it looks like the indentation of

HTTP Post Request

2010-05-10 Thread kak...@gmail.com
Hi to all, i want to ask you a question, concerning the best way to do the following as a POST request: There is server-servlet that accepts xml commands It had the following HTTP request headers: Host: somehost.com User-Agent: Jakarta Commons-HttpClient

INCREF DECREF manually

2010-05-10 Thread moerchendiser2k3
Hi, just a small question. Is it possible to change the refcount of a reference manually? For debugging / ... Thanks! moerchendiser2k3 -- http://mail.python.org/mailman/listinfo/python-list

Re: INCREF DECREF manually

2010-05-10 Thread Jean-Michel Pichavant
moerchendiser2k3 wrote: Hi, just a small question. Is it possible to change the refcount of a reference manually? For debugging / ... Thanks! moerchendiser2k3 Why don't you just create a global reference to the object ? Unless this one is removed, the object will be kept in memory. JM

Re: unittest not being run

2010-05-10 Thread John Maclean
On 10/05/2010 14:38, J. Cliff Dyer wrote: My guess is you mixed tabs and spaces. One tab is always treated by the python interpreter as being equal to eight spaces, which is two indentation levels in your code. Though if it were exactly as you show it, you'd be getting a syntax error, because

Re: HTTP Post Request

2010-05-10 Thread Kushal Kumaran
On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com kak...@gmail.com wrote: Hi to all, i want to ask you a question, concerning the best way to do the following as a POST request: There is server-servlet that accepts xml commands It had the following HTTP request headers:            Host:

Re: unable to get Hudson to run unit tests

2010-05-10 Thread Jean-Michel Pichavant
j vickroy wrote: Stefan Behnel wrote: j vickroy, 07.05.2010 20:44: I apologize if this is not the appropriate forum for a question about Hudson (http://hudson-ci.org/), but I did not know where else to ask and my web searches have not been fruitful. Certainly nice to read something about

Re: INCREF DECREF manually

2010-05-10 Thread moerchendiser2k3
Do to some debugging if a version contains a bug and needs to be fixed there manually. -- http://mail.python.org/mailman/listinfo/python-list

Re: HTTP Post Request

2010-05-10 Thread kak...@gmail.com
On May 10, 10:22 am, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com kak...@gmail.com wrote: Hi to all, i want to ask you a question, concerning the best way to do the following as a POST request: There is server-servlet that accepts

Re: Picking a license

2010-05-10 Thread Patrick Maupin
On May 10, 6:01 am, Paul Boddie p...@boddie.org.uk wrote: On 10 Mai, 03:09, Patrick Maupin pmau...@gmail.com wrote: On May 9, 6:39 pm, Paul Boddie p...@boddie.org.uk wrote: but if they aren't pitching it directly at you, why would you believe that they are trying to change your

Re: Picking a license

2010-05-10 Thread Aahz
In article 074b412a-c2f4-4090-a52c-4d69edb29...@d39g2000yqa.googlegroups.com, Paul Boddie p...@boddie.org.uk wrote: Actually, the copyleft licences don't force anyone to give back changes: they oblige people to pass on changes. IMO, that's a distinction without a difference, particularly if you

Re: INCREF DECREF manually

2010-05-10 Thread Antoine Pitrou
On Mon, 10 May 2010 07:26:42 -0700 (PDT) moerchendiser2k3 googler.1.webmas...@spamgourmet.com wrote: Do to some debugging if a version contains a bug and needs to be fixed there manually. This is certainly the wrong approach. To know if your Python code is leaking references, use either

Wholesale Sports Shoes Clear Air Force One AAA++quality(www.cnnshoe.com)

2010-05-10 Thread xiao wu
supply sports shoes. The brand Sports shoes basketball shoes, Boot, walling shoes, Athletic shoes, Jogging shoes, running shoes, leather shoes, football, shoe sports shoe Footwear Sneaker, Shox Max Rift T- shirts, womens t-shirts, Clothing womens clothing, wear hats Caps Jersey jeans Sock Jacks,

Re: Picking a license

2010-05-10 Thread Aahz
[we have previously been using MIT-style and BSD-style licensing in this thread for the most part -- given the poster who suggested that Apache makes more sense these days, I'm switching to that terminology] In article 99386b28-1636-4f81-beec-3756970d3...@11g2000prv.googlegroups.com, Carl Banks

Re: unable to get Hudson to run unit tests

2010-05-10 Thread j vickroy
Jean-Michel Pichavant wrote: j vickroy wrote: Stefan Behnel wrote: j vickroy, 07.05.2010 20:44: I apologize if this is not the appropriate forum for a question about Hudson (http://hudson-ci.org/), but I did not know where else to ask and my web searches have not been fruitful. Certainly

Re: Sphinx hosting

2010-05-10 Thread Michele Simionato
On May 5, 8:00 am, James Mills prolo...@shortcircuit.net.au wrote: On Wed, May 5, 2010 at 3:35 PM, Michele Simionato michele.simion...@gmail.com wrote: I am sure it has, but I was talking about just putting in the repository an index.html file and have it published, the wayI hear  it

Re: Extract all words that begin with x

2010-05-10 Thread Aahz
In article mailman.2840.1273484131.23598.python-l...@python.org, James Mills prolo...@shortcircuit.net.au wrote: On Mon, May 10, 2010 at 6:50 PM, Xavier Ho cont...@xavierho.com wrote: Have I missed something, or wouldn't this work just as well: list_of_strings = ['2', 'awes', '3465sdg',

Re: Picking a license

2010-05-10 Thread Paul Boddie
On 10 Mai, 17:06, a...@pythoncraft.com (Aahz) wrote: In article 074b412a-c2f4-4090-a52c-4d69edb29...@d39g2000yqa.googlegroups.com, Paul Boddie  p...@boddie.org.uk wrote: Actually, the copyleft licences don't force anyone to give back changes: they oblige people to pass on changes. IMO,

Re: Is Python a functional programming language?

2010-05-10 Thread Paul Rubin
Samuel Williams space.ship.travel...@gmail.com writes: Is Python a functional programming language? It supports some aspects of functional programming but I wouldn't go as far as to call it an FPL. Is this a paradigm that is well supported by both the language syntax and the general

Re: Is Python a functional programming language?

2010-05-10 Thread Aahz
In article 7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin no.em...@nospam.invalid wrote: If your goal is to engage in functional programming, you're better off using a language designed for that purpose. Python is a pragmatic language from an imperative tradition, that has some functional

Turbogears 2 training this weekend in Washington, DC USA

2010-05-10 Thread Alex Clark
Hi all, Sorry for the short notice. We (the Zope/Python Users Group of DC) are having a TurboGears 2 training class this weekend in Washington, DC USA taught by core developer Chris Perkins. Please consider attending! And, I would appreciate you spreading the word to anyone you think may be

Re: Picking a license

2010-05-10 Thread Patrick Maupin
On May 10, 12:37 pm, Paul Boddie p...@boddie.org.uk wrote: On 10 Mai, 17:06, a...@pythoncraft.com (Aahz) wrote: In article 074b412a-c2f4-4090-a52c-4d69edb29...@d39g2000yqa.googlegroups.com, Paul Boddie  p...@boddie.org.uk wrote: Actually, the copyleft licences don't force anyone to give

Re: Is Python a functional programming language?

2010-05-10 Thread Nobody
On Tue, 11 May 2010 00:24:22 +1200, Samuel Williams wrote: Is Python a functional programming language? Not in any meaningful sense of the term. Is this a paradigm that is well supported by both the language syntax and the general programming APIs? No. I heard that lambdas were limited to

Hex String

2010-05-10 Thread Anthony Cole
How can I concatenate 2 hex strings (e.g. '\x16' and '\xb9') then convert the answer to an integer? When I try i always end up with the ASCII equivalent! Thanks, Anthony -- http://mail.python.org/mailman/listinfo/python-list

How to measure speed improvements across revisions over time?

2010-05-10 Thread Matthew Wilson
I know how to use timeit and/or profile to measure the current run-time cost of some code. I want to record the time used by some original implementation, then after I rewrite it, I want to find out if I made stuff faster or slower, and by how much. Other than me writing down numbers on a piece

Re: Hex String

2010-05-10 Thread Chris Rebert
On Mon, May 10, 2010 at 12:55 PM, Anthony Cole anthony.c...@gmail.com wrote: How can I concatenate 2 hex strings (e.g. '\x16' and '\xb9') then convert the answer to an integer? When I try i always end up with the ASCII equivalent! I think you want the `struct` module: struct — Interpret

Re: Hex String

2010-05-10 Thread MRAB
Anthony Cole wrote: How can I concatenate 2 hex strings (e.g. '\x16' and '\xb9') then convert the answer to an integer? When I try i always end up with the ASCII equivalent! Those are just bytestrings (assuming you're using Python 2.x), ie strings using 1 byte per character. You can convert

Re: Upgrade Python 2.6.4 to 2.6.5

2010-05-10 Thread Martin v. Loewis
Werner F. Bruhin wrote: Just upgraded on my Windows 7 machine my copy of 2.6.4 to 2.6.5. However doing sys.version still shows 2.6.4 even so python.exe is dated 19. March 2010 with a size of 26.624 bytes. Is this a known issue? Or did I do something wrong? Look at the copy of

[Epydoc-devel] How to? epydoc --top=README

2010-05-10 Thread Phlip
Pythonistas: I have a question to epydoc-devel, but it might be languishing: http://sourceforge.net/mailarchive/forum.php?thread_name=l2n860c114f1005061707k1ccf68cdz277a3d875b99fe04%40mail.gmail.comforum_name=epydoc-devel How do you populate the index.html output with your (insanely clever)

Re: [Epydoc-devel] How to? epydoc --top=README

2010-05-10 Thread Chris Rebert
On Mon, May 10, 2010 at 1:29 PM, Phlip phlip2...@gmail.com wrote: Pythonistas: snip The question for the rest of Python-Land: Should I be using a better documentation extractor? (pydoc is too mundane so far.) Sphinx is in vogue right now: http://sphinx.pocoo.org/ It's used for the official

Re: How to? epydoc --top=README

2010-05-10 Thread Phlip
On May 10, 1:39 pm, Chris Rebert c...@rebertia.com wrote: Sphinx is in vogue right now:http://sphinx.pocoo.org/ It's used for the official docs and its results are quite pretty. The manager said to hold off on Sphinx until the next phase - then ran off to get married or something. But yet I

Problem displaying jpgs in Tkinter via PIL

2010-05-10 Thread Armin
Hi everyone, I'm new to Python and have been playing around with it using the Enthought Python distribution for Mac OS X 10.6.3 (EPD academic license, version 6.1 with python 2.6.4). It's been great learning the basics, but I've started running into problems when I'm trying to use the PIL

lame sphinx questions [Was: lame epydoc questions]

2010-05-10 Thread Phlip
On May 10, 1:51 pm, Phlip phlip2...@gmail.com wrote: On May 10, 1:39 pm, Chris Rebert c...@rebertia.com wrote: Sphinx is in vogue right now:http://sphinx.pocoo.org/ Okay, we have ten thousand classes to document. How to add them all to index.rst? --

Re: unittest not being run

2010-05-10 Thread cjw
On 10-May-10 10:21 AM, John Maclean wrote: On 10/05/2010 14:38, J. Cliff Dyer wrote: My guess is you mixed tabs and spaces. One tab is always treated by the python interpreter as being equal to eight spaces, which is two indentation levels in your code. Though if it were exactly as you show

Difference between 'is not' and '!=' ?

2010-05-10 Thread AON LAZIO
As subject says, what is the differences of 'is not' and '!='. Confusing.. -- Passion is my style -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between 'is not' and '!=' ?

2010-05-10 Thread Chris Rebert
On Mon, May 10, 2010 at 4:25 PM, AON LAZIO aonla...@gmail.com wrote: As subject says, what is the differences of 'is not' and '!='. Confusing.. != checks value inequality, `is not` checks object identity / pointer inequality Unless you're doing `foo is not None`, you almost always want !=. By

Re: Difference between 'is not' and '!=' ?

2010-05-10 Thread Christian Heimes
AON LAZIO wrote: As subject says, what is the differences of 'is not' and '!='. Confusing.. is not checks if two objects are not identical. != checks if two objects are not equal. Example: Two apples may be equal in size, form and color but they can never be identical because they are made

Re: unittest not being run

2010-05-10 Thread Joe Riopel
On Mon, May 10, 2010 at 5:17 PM, cjw c...@ncf.ca wrote: PyScripter and PythonWin permit the user to choose the equivalence of tabs and spaces.  I like two spaces = on tab, it's a matter of taste.  I feel that eight spaces is too much. While it is a matter of taste, PEP 8 recommends 4 spaces

Re: Is Python a functional programming language?

2010-05-10 Thread Luis M . González
On 10 mayo, 09:24, Samuel Williams space.ship.travel...@gmail.com wrote: Dear Friends, Is Python a functional programming language? Is this a paradigm that is well supported by both the language syntax and the general programming APIs? I heard that lambdas were limited to a single

Re: Picking a license

2010-05-10 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: Paul Boddie p...@boddie.org.uk wrote: Actually, the copyleft licences don't force anyone to give back changes: they oblige people to pass on changes. IMO, that's a distinction without a difference, particularly if you define give back as referring to the

Re: HTTP Post Request

2010-05-10 Thread Kushal Kumaran
On Mon, May 10, 2010 at 8:26 PM, kak...@gmail.com kak...@gmail.com wrote: On May 10, 10:22 am, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: On Mon, May 10, 2010 at 7:30 PM, kak...@gmail.com kak...@gmail.com wrote: Hi to all, i want to ask you a question, concerning the best way to do

Re: How to measure speed improvements across revisions over time?

2010-05-10 Thread Steven D'Aprano
On Mon, 10 May 2010 20:13:44 +, Matthew Wilson wrote: I know how to use timeit and/or profile to measure the current run-time cost of some code. I want to record the time used by some original implementation, then after I rewrite it, I want to find out if I made stuff faster or slower,

Re: Is Python a functional programming language?

2010-05-10 Thread Samuel Williams
Thanks to everyone for their great feedback, it is highly appreciated. Kind regards, Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Extract all words that begin with x

2010-05-10 Thread Terry Reedy
On 5/10/2010 5:35 AM, James Mills wrote: On Mon, May 10, 2010 at 6:50 PM, Xavier Hocont...@xavierho.com wrote: Have I missed something, or wouldn't this work just as well: list_of_strings = ['2', 'awes', '3465sdg', 'dbsdf', 'asdgas'] [word for word in list_of_strings if word[0] == 'a']

Re: Extract all words that begin with x

2010-05-10 Thread Tycho Andersen
On Mon, May 10, 2010 at 10:23 PM, Terry Reedy tjre...@udel.edu wrote: On 5/10/2010 5:35 AM, James Mills wrote: On Mon, May 10, 2010 at 6:50 PM, Xavier Hocont...@xavierho.com  wrote: Have I missed something, or wouldn't this work just as well: list_of_strings = ['2', 'awes', '3465sdg',

Re: virtualenvwrapper for Windows (Powershell)

2010-05-10 Thread Lawrence D'Oliveiro
In message 22cf35af-44d1-43fe-8b90-07f2c6545...@i10g2000yqh.googlegroups.com, Guillermo wrote: If you've ever missed it on Windows and you can use Powershell ... I thought the whole point of Windows was to get away from this command-line stuff. Not such a good idea after all? --

Re: shortcut for large amount of global var declarations?

2010-05-10 Thread Lawrence D'Oliveiro
In message mailman.2771.1273327690.23598.python-l...@python.org, Alex Hall wrote: ... I have about fifteen vars in a function which have to be global. Why not make them class variables, e.g. class my_namespace : var1 = ... var2 = ... #end my_namespace def

Re: fast regex

2010-05-10 Thread Lawrence D'Oliveiro
In message d46338a8-d08c-449b-b656-a6cf9f6a6...@l28g2000yqd.googlegroups.com, james_027 wrote: I was working with regex on a very large text, really large but I have time constrained. “Fast regex” is a contradiction in terms. You use regexes when you want ease of definition and application,

[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

2010-05-10 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: 2010/5/9 Filip Gruszczyński rep...@bugs.python.org: So, is there any decision here, so that I could get down to providing better patch? I guess I'd like to hear from someone about how these things work in zsh. If we're going to add a

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Ronald Oussoren
New submission from Ronald Oussoren ronaldousso...@mac.com: I got a build error when building the 2.7b2 installers because the MacOS module couldn't be build. That turns out to be caused by an issue in the configure script: for some reason the check for the 10.5 SDK gives the wrong answer

[issue8510] update to autoconf2.65

2010-05-10 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: I don't have access to source so my comment will be based only on diffs from above mentioned revisions. r80969: - AC_LANG_PROGRAM ... with main function in body . It is legal as I don't know C compiler that fail to compile code like

[issue8577] test_distutils fails if srcdir != builddir

2010-05-10 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: Hmm, this issue was fixed before. My be restore of 2.6 distutils ignore those fixes. It is good to compare current Lib/distutils/sysconfig.py with version from Dec 2009 . -- nosy: +rpetrov

[issue8577] test_distutils fails if srcdir != builddir

2010-05-10 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I intend to forward port the fix to 3.2 in the near future, to avoid missing real issues when I do updates to the platform support for OSX. -- ___ Python tracker rep...@bugs.python.org

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I think this was fixed in r80969, but confirmation would be good. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8673

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Sorry; r81004, rather. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8673 ___ ___

[issue8673] configure script doesn't recognize 10.5 SDK correctly

2010-05-10 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Cool, thanks. I'll check this later this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8673 ___

[issue7879] Too narrow platform check in test_datetime

2010-05-10 Thread Andrej Krpic
Changes by Andrej Krpic akrpi...@gmail.com: -- components: +Windows type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7879 ___ ___

[issue3704] cookielib doesn't handle URLs with / in parameters

2010-05-10 Thread John J Lee
John J Lee jj...@users.sourceforge.net added the comment: I'll upload a patch when I'm back home (bugs.python.org went down yesterday). Will turn docstring into comment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3704

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Tomas Hoger
New submission from Tomas Hoger tho...@redhat.com: SVN commit r64114 added integer overflow checks to multiple modules. Checks added to audioop module are incorrect and can still be bypassed: http://svn.python.org/view/python/trunk/Modules/audioop.c?r1=64114r2=64113 - audioop_tostereo -

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Victor, you've been dealing with Python's default encoding lately, care to render an opinion on the correct fix for this bug? @Filip: the patch will need a unit test, which will also help with assessing the validity of the fix.

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I'll try to code a small test this evening. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8256 ___

[issue8618] test_winsound fails when no playback devices configured

2010-05-10 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- title: test_winsound failing on Windows Server 2008 - test_winsound fails when no playback devices configured ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8618

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the patch. I agree that undefined behaviour (e.g., from signed overflow) should be avoided where at all possible. Do you have any Python examples that failed to trigger the overflow on your platform? If so, it would be useful

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Unless you have an explicit exploit, I think the 'type' should be 'behavior' rather than 'security'. -- stage: - unit test needed type: security - behavior versions: +Python 2.7, Python 3.1, Python 3.2

[issue8256] TypeError: bad argument type for built-in operation

2010-05-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch is wrong: _PyUnicode_AsString(Py_None) should not return utf8! I suggest that since PyOS_Readline() write the prompt to stderr, the conversion uses the encoding of stderr. -- nosy: +amaury.forgeotdarc

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: This is now committed as r81041. I've also removed the long description from what's new file, as you were suggesting. The other two patches should be adapted for 3.2. -- ___ Python tracker

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Okay, it looks to me as though all those 'int' lengths should really be 'Py_ssize_t'. I don't think that's something we can change in 2.6, though; probably not in 2.7 either, since we're getting too close to the release. It can and

[issue4256] optparse/argparse: provide a simple way to get a programmatically useful list of options

2010-05-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: zsh's completion system is completely programmable. I looks like it would be pretty easy to add generic 'python script' support widgets(*) using this hidden option, and probably other neat tricks as well. Something that would make it

[issue8674] audioop: incorrect integer overflow checks

2010-05-10 Thread Tomas Hoger
Tomas Hoger tho...@redhat.com added the comment: Do you have any Python examples that failed to trigger the overflow on your platform? No, I've not really tried to create some, as I found it while looking into similar checks added to rgbimg module (which is dead and removed upstream now) in

[issue8490] asyncore test suite

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Committed in r81043 (trunk) and r81044 (3.2). Thanks for your comments. -- assignee: josiahcarlson - giampaolo.rodola components: +Tests resolution: - fixed stage: - committed/rejected versions: +Python 2.7, Python 3.2

[issue8490] asyncore test suite

2010-05-10 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8490 ___ ___

[issue7040] test_smtplib fails on os x 10.6

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Closed as duplicate of issue7037. -- nosy: +giampaolo.rodola resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7040

[issue8666] Allow ConfigParser.get*() to take a default value

2010-05-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: what is this raise_on_bad additional argument? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8666 ___

[issue2982] more tests for pyexpat

2010-05-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I'm not a xml* modules user but I've tried to apply the patch against the trunk and it seems it still works. -- nosy: +effbot, giampaolo.rodola, loewis versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0

  1   2   >