Announce: Windows version of LDTP - GUI test automation tool

2012-04-19 Thread Nagappan Alagappan
Hello, I'm excited to announce Windows version of Linux Desktop Testing Porject (WinLDTP) !!! Special thanks: VMware Inc permitting me to open source my work VMware Desktop Engineering QE team to test it extensively David Connet dcon...@vmware.com for creating the WinLDTP installer Existing

Re: A case for real multiline comments

2012-04-19 Thread Cameron Simpson
On 19Apr2012 15:13, Chris Angelico ros...@gmail.com wrote: | On Thu, Apr 19, 2012 at 2:29 PM, Cameron Simpson c...@zip.com.au wrote: | On 18Apr2012 22:07, Jordan Perr jor...@jperr.com wrote: | | I came across this case while debugging some Python code that contained an | | error stemming from

Regular expressions, help?

2012-04-19 Thread Sania
Hi, So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty sure my regex is correct, I think it's the group part that's the problem. I am using nltk by python.

Re: how do i merge two sequence

2012-04-19 Thread Ervin Hegedüs
hi, On Wed, Apr 18, 2012 at 10:41:00PM +0200, Peter Otten wrote: Python Email wrote: how do i merge two seqs alernative; (xyz, 7890) output: x7y8z90 import itertools .join(a+b for a, b in itertools.izip_longest(xyz, 7890, fillvalue=)) 'x7y8z90' why is this better than simple

Re: Regular expressions, help?

2012-04-19 Thread Peter Otten
Sania wrote: Hi, So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty sure my regex is correct, I think it's the group part that's the problem. No. A

Re: Regular expressions, help?

2012-04-19 Thread Peter Otten
Sania wrote: So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty sure my regex is correct, I think it's the group part that's the problem. No. A regex

Re: Regular expressions, help?

2012-04-19 Thread Cameron Simpson
On 18Apr2012 23:11, Sania fantasyblu...@gmail.com wrote: | So I am trying to get the number of casualties in a text. After 'death | toll' in the text the number I need is presented as you can see from | the variable called text. Here is my code | I'm pretty sure my regex is correct, I think it's

Re: Regular expressions, help?

2012-04-19 Thread Jussi Piitulainen
Sania writes: So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty sure my regex is correct, I think it's the group part that's the problem. I am using

Re: how do i merge two sequence

2012-04-19 Thread Peter Otten
Ervin Hegedüs wrote: On Wed, Apr 18, 2012 at 10:41:00PM +0200, Peter Otten wrote: Python Email wrote: how do i merge two seqs alernative; (xyz, 7890) output: x7y8z90 import itertools .join(a+b for a, b in itertools.izip_longest(xyz, 7890, fillvalue=)) 'x7y8z90' why is

Re: A case for real multiline comments

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 4:04 PM, Cameron Simpson c...@zip.com.au wrote: Bah! To get into a function's docstring they need to be parsed by the Python compiler. Ergo, not comments. Calling them comments in disguise is a bit of a stretch. They're fundamentally the same thing as

Re: md5 check

2012-04-19 Thread contro opinion
import hashlib f=open('c:\gpg4win-2.1.0.exe','rb') print hashlib.md5(f.read()).hexdigest() ad6245f3238922bb7afdc4a6d3402a65 print hashlib.sha1(f.read()).hexdigest() da39a3ee5e6b4b0d3255bfef95601890afd80709 i get it with md5,why the sha1 is wrong? the sha1 right is

Re: md5 check

2012-04-19 Thread Peter Otten
contro opinion wrote: import hashlib f=open('c:\gpg4win-2.1.0.exe','rb') print hashlib.md5(f.read()).hexdigest() ad6245f3238922bb7afdc4a6d3402a65 print hashlib.sha1(f.read()).hexdigest() da39a3ee5e6b4b0d3255bfef95601890afd80709 i get it with md5,why the sha1 is wrong? You get the

Re: md5 check

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 5:46 PM, contro opinion contropin...@gmail.com wrote: import hashlib f=open('c:\gpg4win-2.1.0.exe','rb') print  hashlib.md5(f.read()).hexdigest() ad6245f3238922bb7afdc4a6d3402a65 print  hashlib.sha1(f.read()).hexdigest() da39a3ee5e6b4b0d3255bfef95601890afd80709 i

Re: how do i merge two sequence

2012-04-19 Thread Hegedüs Ervin
Hello, On Thu, Apr 19, 2012 at 08:54:28AM +0200, Peter Otten wrote: Have a second look at the desired output. Your suggestion doesn't produce that. oh', I'm really sorry, I was distracted... thanks: a. -- I � UTF-8 -- http://mail.python.org/mailman/listinfo/python-list

Re: Whither paramiko?

2012-04-19 Thread Richard Shea
On Apr 16, 1:42 am, Bryan bryanjugglercryptograp...@yahoo.com wrote: Paramiko is a Python library for SSH (Secure Shell). Over about the last year, I've grown dependent upon it. Its home page is still easy to search up, but the links to its mailing list and repository don't work. Paramiko

Re: Whither paramiko?

2012-04-19 Thread Richard Shea
On Apr 19, 8:28 pm, Richard Shea shearich...@gmail.com wrote: On Apr 16, 1:42 am, Bryan bryanjugglercryptograp...@yahoo.com wrote: Paramiko is a Python library for SSH (Secure Shell). Over about the last year, I've grown dependent upon it. Its home page is still easy to search up, but the

Re: A case for real multiline comments

2012-04-19 Thread Alek Storm
I think docstrings should look like strings, because they're essentially data: they end up as the __doc__ attribute of whatever class or function they're documenting. Conversely, they shouldn't be used as multi-line comments that aren't data (in the middle of functions) - the parser should

Re: A case for real multiline comments

2012-04-19 Thread Jean-Michel Pichavant
Chris Angelico wrote: [snip] Since Python doesn't have multiline comments, triple-quoted strings are sometimes pressed into service. [snip] Chris Angelico Let the triple quotes where they're meant to be. Use your text editor, any decent one will allow you to comment uncomment a block of

Re: A case for real multiline comments

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 8:17 PM, Alek Storm alek.st...@gmail.com wrote: comment def ... parser completely ignores these lines ... comment break I believe the more Pythonic syntax would be: comment:     ...some     ...indented     ...lines God help us if that ever happens. Certainly

Re: Framework for a beginner

2012-04-19 Thread Kiuhnm
On 4/19/2012 6:21, lkcl wrote: yeah, it does :) python is... the best word i can describe it is: it's beautiful. it has an elegance of expression that is only marred by the rather silly mistake of not taking map, filter and reduce into the list object itself: l.map(str) for example would be

Re: Framework for a beginner

2012-04-19 Thread Alek Storm
On Wed, Apr 18, 2012 at 11:21 PM, lkcl luke.leigh...@gmail.com wrote: On Apr 11, 9:11 pm, biofob...@gmail.com wrote: 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

Re: Framework for a beginner

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 9:14 PM, Kiuhnm kiuhnm03.4t.yahoo...@mail.python.org wrote: There are many things I don't like about Python. The first flaw is the absence of anonymous code blocks, but I've already solved this problem. You mean lambdas? Yeah, they're a lot more limited in Python than in

Re: Bug in Python

2012-04-19 Thread Kiuhnm
On 4/18/2012 3:08, Kiuhnm wrote: I'm using Python 3.2.2, 64 bit on Windows 7. Consider this code: --- print(1) print(2) print(3) with open('test') as f: data = f.read() with open('test') as f: data = f.read() --- If I debug this code with python -m pdb script.py and I issue the command j 7

Re: Framework for a beginner

2012-04-19 Thread Roy Smith
In article 4f8ff38c$0$1381$4fafb...@reader1.news.tin.it, Kiuhnm kiuhnm03.4t.yahoo.it wrote: I don't like when a community imposes style on a programmer. For instance, many told me that I shouldn't use camelCase and I should adhere to PEP8. Well, that's not me. I write my code the way I

Re: Regular expressions, help?

2012-04-19 Thread Sania
On Apr 19, 2:48 am, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Sania writes: So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty sure my

Re: Framework for a beginner

2012-04-19 Thread lkcl luke
On Thu, Apr 19, 2012 at 12:20 PM, Alek Storm alek.st...@gmail.com wrote: On Wed, Apr 18, 2012 at 11:21 PM, lkcl luke.leigh...@gmail.com wrote: On Apr 11, 9:11 pm, biofob...@gmail.com wrote: I am new to python and only have read the Byte of Python ebook, but want to move to the web. I am

Re: A case for real multiline comments

2012-04-19 Thread Devin Jeanpierre
On Thu, Apr 19, 2012 at 2:56 AM, Chris Angelico ros...@gmail.com wrote: So, here's a proposal. (Maybe I should take this part to another list or the Python issue tracker.) Introduce a new keyword or reuse existing keywords to form a marker that unambiguously says Ignore these lines and then

Re: Framework for a beginner

2012-04-19 Thread Alek Storm
On Thu, Apr 19, 2012 at 7:12 AM, lkcl luke luke.leigh...@gmail.com wrote: On Thu, Apr 19, 2012 at 12:20 PM, Alek Storm alek.st...@gmail.com wrote: Why not use list comprehension syntax? because it's less characters to type, and thus less characters to read. i find that syntax incredibly

Re: python kinterbasdb - check default charset of db or table

2012-04-19 Thread Marglix
On Wednesday, April 18, 2012 9:08:59 PM UTC+8, miamia wrote: Hello, I am using python 2.7 and kinterbasdb. How could I find out default charset used by database? I need to check it and then according to used charset decode returned strings. thank you You could use a tool like flamerobin and

How do you refer to an iterator in docs?

2012-04-19 Thread Roy Smith
Let's say I have a function which takes a list of words. I might write the docstring for it something like: def foo(words): Foo-ify words (which must be a list) What if I want words to be the more general case of something you can iterate over? How do people talk about that in docstrings?

Re: Framework for a beginner

2012-04-19 Thread Neil Cerutti
On 2012-04-19, Kiuhnm kiuhnm03.4t.yahoo.it wrote: I don't like when a community imposes style on a programmer. For instance, many told me that I shouldn't use camelCase and I should adhere to PEP8. Well, that's not me. I write my code the way I like it and if that is frowned upon by some

Re: A case for real multiline comments

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:15 PM, Devin Jeanpierre jeanpierr...@gmail.com wrote: Why don't you allow nested multiline comments? Many languages (e.g. ML, Scheme, Haskell, etc.) allow you to nest multi-line comments. It's mostly the C family of languages that refuse to do this, AFAIK. Allowing

Re: Bug in Python

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:01 PM, Kiuhnm kiuhnm03.4t.yahoo...@mail.python.org wrote: I read that bug fix releases have a 6-month cycle :( It seems that I'll have to work around the problem... If a fix has been committed, the easiest thing to do is clone the Mercurial repository and build Python

Re: Python Gotcha's?

2012-04-19 Thread Albert van der Horst
In article 4f7de152$0$29983$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 05 Apr 2012 08:32:10 -0400, Roy Smith wrote: In article 4f7d896f$0$29983$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info

Re: Regular expressions, help?

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:02 PM, Sania fantasyblu...@gmail.com wrote: So now my regex is    dead=re.match(r.*death toll.{0,20}(\d[,\d\.]*), text) But I only find 7 not 657. How is it that the group is only matching the last digit? The whole thing is parenthesis not just the last part. ?

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:21 PM, Roy Smith r...@panix.com wrote: def foo(words):   Foo-ify words (which must be a list) What if I want words to be the more general case of something you can iterate over?  How do people talk about that in docstrings?  Do you say something which can be

Re: Python Gotcha's?

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 11:11 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: I still think the doubling convention of Algol68 is superior: Help me Obiwan, she said, You're my only hope! No special treatment of any other symbol than the quote itself. A quoting symbol is such a

Re: Framework for a beginner

2012-04-19 Thread lkcl luke
On Thu, Apr 19, 2012 at 1:21 PM, Alek Storm alek.st...@gmail.com wrote: On Thu, Apr 19, 2012 at 7:12 AM, lkcl luke luke.leigh...@gmail.com wrote: On Thu, Apr 19, 2012 at 12:20 PM, Alek Storm alek.st...@gmail.com wrote: Why not use list comprehension syntax?  because it's less characters to

Re: Framework for a beginner

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:12 PM, lkcl luke luke.leigh...@gmail.com wrote:  that's what i meant about beauty and elegance.  the bang per buck ratio in python, results obtained for the number of characters used, is higher, and that's something that i personally find to be a priority over speed.

Re: Regular expressions, help?

2012-04-19 Thread azrazer
Le 19/04/2012 14:02, Sania a écrit : On Apr 19, 2:48 am, Jussi Piitulainenjpiit...@ling.helsinki.fi [...] text=accounts put the death toll at 637 and those missing at 653 , but the total number is likely to be much bigger dead=re.match(r.*death toll.*(\d[,\d\.]*), text)

Re: Framework for a beginner

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 10:56 PM, lkcl luke luke.leigh...@gmail.com wrote: i'm belabouring the point (not entirely intentionally) but you see how clumsy that is?  it's probably just as complex in the actual lexer/grammar file in the http://python.org source code itself, as it is to think about

Re: Regular expressions, help?

2012-04-19 Thread Jussi Piitulainen
Sania writes: On Apr 19, 2:48 am, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Sania writes: So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code

Request META Help

2012-04-19 Thread Gabriel Novaes
I have a system that uses request.META ['HTTP_HOST'] to identify which will run APPLICATION. The domains testes1.xyz.com.br, tes.xyzk.com.br, xx.xyzk.com.br through a DNS redirect TYPE A link to the server IP. In most cases I get the request.META ['HTTP_HOST'] with the URL in the request

Re: Regular expressions, help?

2012-04-19 Thread Jon Clements
On Thursday, 19 April 2012 07:11:54 UTC+1, Sania wrote: Hi, So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text. Here is my code I'm pretty sure my regex is correct, I think it's

Re: Framework for a beginner

2012-04-19 Thread Kiuhnm
On 4/19/2012 14:02, Roy Smith wrote: In article4f8ff38c$0$1381$4fafb...@reader1.news.tin.it, Kiuhnmkiuhnm03.4t.yahoo.it wrote: I don't like when a community imposes style on a programmer. For instance, many told me that I shouldn't use camelCase and I should adhere to PEP8. Well, that's not

Re: Regular expressions, help?

2012-04-19 Thread Sania
On Apr 19, 9:52 am, Jon Clements jon...@googlemail.com wrote: On Thursday, 19 April 2012 07:11:54 UTC+1, Sania  wrote: Hi, So I am trying to get the number of casualties in a text. After 'death toll' in the text the number I need is presented as you can see from the variable called text.

Re: Regular expressions, help?

2012-04-19 Thread Chris Angelico
On Fri, Apr 20, 2012 at 1:07 AM, Sania fantasyblu...@gmail.com wrote: Azrazer what you suggested works but I need to make sure that it catches numbers like 6,370 as well as 637. And I tried tweaking the regex around from the one you said in your reply but It didn't work (probably would have if

Re: Request META Help

2012-04-19 Thread Chris Angelico
On Thu, Apr 19, 2012 at 11:32 PM, Gabriel Novaes semprobl...@gmail.com wrote: The domains testes1.xyz.com.br, tes.xyzk.com.br, xx.xyzk.com.br through a DNS redirect TYPE A link to the server IP. In most cases I get the request.META ['HTTP_HOST'] with the URL in the request header, but today

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 5:21:20 AM UTC-7, Roy Smith wrote: Let's say I have a function which takes a list of words. I might write the docstring for it something like: def foo(words): Foo-ify words (which must be a list) What if I want words to be the more general case of

Re: Framework for a beginner

2012-04-19 Thread Terry Reedy
On 4/19/2012 7:14 AM, Kiuhnm wrote: On 4/19/2012 6:21, lkcl wrote: yeah, it does :) python is... the best word i can describe it is: it's beautiful. it has an elegance of expression that is only marred by the rather silly mistake of not taking map, filter and reduce into the list object

Re: Framework for a beginner

2012-04-19 Thread Terry Reedy
On 4/19/2012 7:20 AM, Alek Storm wrote: Why not use list comprehension syntax? For 3.x, that should be shortened to Why not use comprehension syntax?, where comprehensions by default become generator expressions. These: Map: [val+1 for val in some_list] Filter: [val for val in some_list

Re: Framework for a beginner

2012-04-19 Thread Grzegorz Staniak
On 19.04.2012, Kiuhnm kiuhnm03.4t.yahoo.it wroted: When you know more than 30 languages you stop thinking that way and you also don't try to defend your language against infidels. Then again, even when you know more than 100 languages, you may find some that fit your brain and some that just

Re: Framework for a beginner

2012-04-19 Thread Terry Reedy
On 4/19/2012 8:12 AM, lkcl luke wrote: you don't *have* to use lambdas with map and reduce, you just have touse a function, where a lambda happens to be a nameless function. Abbreviated statements like the above sometimes lead people to think that there is more difference between def

Re: with statement

2012-04-19 Thread Kiuhnm
On 4/19/2012 20:02, Jacob MacDonald wrote: On Thursday, April 19, 2012 10:15:23 AM UTC-7, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. Am I forgetting something? Kiuhnm That sounds about right to me. However,

Re: os.system()

2012-04-19 Thread MRAB
On 19/04/2012 19:09, Yigit Turgut wrote: When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and keep on with the next execution after os.system() ? Try using the

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Terry Reedy
On 4/19/2012 11:51 AM, Jacob MacDonald wrote: When I talk about an iterable, I say iterable. Ditto. Examples from manual: filter(function, iterable) Construct an iterator from those elements of iterable for which function returns true. (I would work this differently.) map(function,

pyjamas-desktop running under python 2.6... on wine (!)

2012-04-19 Thread lkcl
i think this is so hilarious and just such a stunning achievement by the wine team that i had to share it with people. the writeup's here: http://appdb.winehq.org/objectManager.php?sClass=versioniId=25765 but, to summarise: * python2.6 runs under wine (the win32 emulator) * so does

Re: os.system()

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 11:09:22 AM UTC-7, Yigit Turgut wrote: When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and keep on with the next execution after

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Jon Clements
On Thursday, 19 April 2012 13:21:20 UTC+1, Roy Smith wrote: Let's say I have a function which takes a list of words. I might write the docstring for it something like: def foo(words): Foo-ify words (which must be a list) What if I want words to be the more general case of something

can I overload operators like =, - or something like that?

2012-04-19 Thread dmitrey
hi all, can I somehow overload operators like =, - or something like that? (I'm searching for appropriate overload for logical implication if a then b) Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Passing a object to my test case from mainthread using unittest

2012-04-19 Thread venkat
i am new to python and just now started developing an linux application automation. scenario i am trying is thread.py --- will invoke all primary device threads and load test from testcase admincase.py --- hold my tests for the case.. what i am unable to do is i want to pass certain

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread Jacob MacDonald
On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: hi all, can I somehow overload operators like =, - or something like that? (I'm searching for appropriate overload for logical implication if a then b) Thank you in advance, D. I don't believe that you could overload those

Re: os.system()

2012-04-19 Thread Steve
Yigit Turgut wrote in message news:b9a8bb28-3003-4a36-86fb-339ef697b...@i2g2000vbd.googlegroups.com... When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and

*.sdf database access

2012-04-19 Thread Page3D
Hi, I am trying to connect and access data in a *.sdf file on Win7 system using Python 2.7. I have three questions: 1. What python module should I use? I have looked at sqlite3 and pyodbc. However, I can seem to get the connection to the database file setup properly. 2. How can I determine the

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Cameron Simpson
On 19Apr2012 14:32, Terry Reedy tjre...@udel.edu wrote: | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: | When I talk about an iterable, I say iterable. | | Ditto. I used to, but find myself saying sequence these days. It reads better, but is it the same thing? Cheers, -- Cameron Simpson

Re: with statement

2012-04-19 Thread Terry Reedy
On 4/19/2012 1:15 PM, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. This is true, I believe, of all statements. Am I forgetting something? Comprehensions (in Py3) and lambda expressions also introduce new

Re: Regular expressions, help?

2012-04-19 Thread Andy
If you plan on doing more work with regular expressions in the future and you have access to a Windows machine you may want to consider picking up a copy of RegxBuddy. I don't have any affiliation with the makers but I have been using the software for a few years and it has saved me a lot of

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Terry Reedy
On 4/19/2012 5:32 PM, Cameron Simpson wrote: On 19Apr2012 14:32, Terry Reedytjre...@udel.edu wrote: | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: | When I talk about an iterable, I say iterable. | | Ditto. I used to, but find myself saying sequence these days. It reads better, but is it the

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Cameron Simpson
On 19Apr2012 18:07, Terry Reedy tjre...@udel.edu wrote: | On 4/19/2012 5:32 PM, Cameron Simpson wrote: | On 19Apr2012 14:32, Terry Reedytjre...@udel.edu wrote: | | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: | | When I talk about an iterable, I say iterable. | | | | Ditto. | | I used

Re: with statement

2012-04-19 Thread Ian Kelly
On Thu, Apr 19, 2012 at 3:33 PM, Terry Reedy tjre...@udel.edu wrote: On 4/19/2012 1:15 PM, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. This is true, I believe, of all statements. Am I forgetting

Re: Suggest design to accomodate non-unix platforms ?

2012-04-19 Thread Dan Stromberg
On Wed, Apr 18, 2012 at 5:16 PM, Miki Tebeka miki.teb...@gmail.com wrote: So I'm interested in suggestions/examples where a user can update a config file to specify by which means they want (in this case) the ssh functionality to be supplied. You can do something like that (it's called a

Re: with statement

2012-04-19 Thread Ethan Furman
Ian Kelly wrote: On Thu, Apr 19, 2012 at 3:33 PM, Terry Reedy tjre...@udel.edu wrote: On 4/19/2012 1:15 PM, Kiuhnm wrote: A with statement is not at the module level only if it appears inside a function definition or a class definition. This is true, I believe, of all statements. Am I

Re: Suggest design to accomodate non-unix platforms ?

2012-04-19 Thread Chris Angelico
On Fri, Apr 20, 2012 at 8:35 AM, Dan Stromberg drsali...@gmail.com wrote: It's not nearly as adaptive as scaning $PATH for ssh, falling back on putty if necessary - this is analogous to GNU autoconf.  You'd probably have a small class you genericize this with - with one instance for each such

Re: How do you refer to an iterator in docs?

2012-04-19 Thread Terry Reedy
On 4/19/2012 6:16 PM, Cameron Simpson wrote: On 19Apr2012 18:07, Terry Reedytjre...@udel.edu wrote: | On 4/19/2012 5:32 PM, Cameron Simpson wrote: | On 19Apr2012 14:32, Terry Reedytjre...@udel.edu wrote: | | On 4/19/2012 11:51 AM, Jacob MacDonald wrote: | | When I talk about an

Twisted: UDP socket not closed.

2012-04-19 Thread Luther Edwards
Did anyone in the group ever have an answer to Kevac's question, I'm having a similar issue? Thanks in advance, Luther [Python] Twisted: UDP socket not closed. [cid:image001.png@01CD1E6B.15DF6BB0]http://grokbase.com/user/Kevac-Marko/tTjuHcXzmQtuttsnhLfi5e Kevac

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread alex23
On Apr 20, 5:54 am, Jacob MacDonald jaccar...@gmail.com wrote: On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: can I somehow overload operators like =, - or something like that? I don't believe that you could overload those particular operators, since to my knowledge they do

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread Chris Angelico
On Fri, Apr 20, 2012 at 2:38 PM, alex23 wuwe...@gmail.com wrote: On Apr 20, 5:54 am, Jacob MacDonald jaccar...@gmail.com wrote: On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: can I somehow overload operators like =, - or something like that? I don't believe that you could

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread Karl Knechtel
On Thu, Apr 19, 2012 at 3:28 PM, dmitrey dmitre...@gmail.com wrote: hi all, can I somehow overload operators like =, - or something like that? (I'm searching for appropriate overload for logical implication if a then b) Thank you in advance, D. --

Re: can I overload operators like =, - or something like that?

2012-04-19 Thread Karl Knechtel
On Fri, Apr 20, 2012 at 12:43 AM, Chris Angelico ros...@gmail.com wrote: On Fri, Apr 20, 2012 at 2:38 PM, alex23 wuwe...@gmail.com wrote: On Apr 20, 5:54 am, Jacob MacDonald jaccar...@gmail.com wrote: On Thursday, April 19, 2012 12:28:50 PM UTC-7, dmitrey wrote: can I somehow overload

[issue14591] Value returned by random.random() out of valid range

2012-04-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a modification of Serhiy's patch that assures that the new state is nonzero. (Just to clarify the nonzero requirement: the MT state is formed from bit 31 of mt[0] together with all the bits of mt[i], 1 = i 624. At least one of

[issue14591] Value returned by random.random() out of valid range

2012-04-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The latest patch has the disadvantage that it'll often change the behaviour of jumpahead for people on 32-bit platforms, which may lead to unnecessary breakage. Here's a better version that only fixes mt[0] in the unlikely (but possible)

[issue14590] ConfigParser doesn't strip inline comment when delimiter occurs earlier without preceding space.

2012-04-19 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: INI files won't go away and there will come a time where 3.3 is old. Since 3.2 inline comments are turned off by default which mitigates the problem. Fixing this parser bug for the 3.3 release seems safe enough for me as long as you clearly

[issue14619] Enhanced variable substitution for databases

2012-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I agree this would be very handy, but the database engines I know which accept bind variables (Oracle, MySQL, JDBC) only accept simple types. So to handle ?? it would be necessary to modify the SQL statement passed to the database

[issue13959] Re-implement parts of imp in pure Python

2012-04-19 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Looking it over, I'm confident that tokenizer.detect_encoding() does not raise a SyntaxError where PyTokenizer_FindEncodingFilename() does. I've run out of time tonight, but I'll look at it more tomorrow. Once find_module() is done,

[issue14601] PEP sources not available as documented

2012-04-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Not sure how it was supposed to be fixed in the past, as the docutils formatter would happily use whatever URL the docutils release had in place. I now fixed it for real (I hope) in 34076bfed420 --

[issue14620] Fatal Python error: Cannot recover from stack overflow.

2012-04-19 Thread Florian Bruhin
New submission from Florian Bruhin python@the-compiler.org: Hey, I just got the error message in the title when trying to run a script with python. You can find the coredump, stacktrace, and the scripts I ran at http://the-compiler.org/tmp/pythoncrash/ The command line I ran: python -u

[issue14619] Enhanced variable substitution for databases

2012-04-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Raymond, the variable substitution is normally done by the database and not the Python database modules, so you'd have to ask the database maintainers for assistance. The qmark ('?') parameter style is part of the ODBC standard, so it's

[issue7980] time.strptime not thread safe

2012-04-19 Thread Cédric Krier
Changes by Cédric Krier cedric.kr...@b2ck.com: -- nosy: +ced ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing

[issue14611] inspect.getargs fails on some anonymous tuples

2012-04-19 Thread Stefano Taschini
Stefano Taschini tasch...@ieee.org added the comment: I think this should do. inspect.getargs is now looking for STORE_DEREF besides STORE_FAST, and is making sure that the appropriate namespace (locals vs cell + free vars) is selected depending on the opcode. The only changes to the test

[issue14381] Intern certain integral floats for memory savings and performance

2012-04-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Why do you think it isn't safe, Antoine? It violates C's strict aliasing rules; Google for 'C strict aliasing' or 'C type punning' for more information. This isn't just a theoretical concern: gcc is known to make optimizations based on

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-19 Thread Esben Agerbæk Black
Esben Agerbæk Black esbe...@gmail.com added the comment: 2) I get errors for all my test when I build my python and run ./python.exe -m test.datetimetester -j3 I asume this is because I have yet to implement the c version in Modules/_datetimemodule.c is this the correct assumption?

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-19 Thread sbt
sbt shibt...@gmail.com added the comment: Up to date patch. -- Added file: http://bugs.python.org/file25270/mp_pickle_conn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4892 ___

[issue14381] Intern certain integral floats for memory savings and performance

2012-04-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: We only support IEEE platforms. I don't think that's true, BTW. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14381 ___

[issue11618] Locks broken wrt timeouts on Windows

2012-04-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here is a new patch. This uses critical sections and condition variables to avoid kernel mode switches for locks. Windows mutexes are expensive and for uncontented locks, this offers a big win. It also adds an internal set of

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-19 Thread sbt
sbt shibt...@gmail.com added the comment: A couple of minor changes based on Antoine's earlier review (which I did not notice till now). -- Added file: http://bugs.python.org/file25272/mp_pickle_conn.patch ___ Python tracker rep...@bugs.python.org

[issue14428] Implementation of the PEP 418

2012-04-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@gmail.com added the comment: Please leave the pybench default timers unchanged in case the new APIs are not available. Ok, done in the new patch: perf_counter_process_time-2.patch.

[issue5118] '%.2f' % 2.545 doesn't round correctly

2012-04-19 Thread Zeev Rotshtein
Zeev Rotshtein zee...@gmail.com added the comment: Well this IS a bug. There is a certain globally accepted manner in which rounding work and python does something else. P.S.: A bug is when something doesn't do what it's supposed to do the way it's supposed to do it. This definition does not

[issue5118] '%.2f' % 2.545 doesn't round correctly

2012-04-19 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Well this IS a bug. I assume that you're referring to behaviour like this: Python 2.7.2 (default, Jan 13 2012, 17:11:09) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license for more information.

[issue14538] HTMLParser: parsing error

2012-04-19 Thread Michel Leunen
Michel Leunen michel.leu...@gmail.com added the comment: Thanks guys for your comments and for solving this issue. Great work! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14538 ___

[issue14032] test_cmd_line_script prints undefined 'data' variable

2012-04-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c4c67c2d8ffc by Nick Coghlan in branch '3.2': Close #14032: fix incorrect variable reference in test_cmd_line_script http://hg.python.org/cpython/rev/c4c67c2d8ffc -- nosy: +python-dev resolution: - fixed

  1   2   >