Re: How to get number of bytes written to nonblocking FIFO when EAGAIN is raised?

2011-07-21 Thread Aaron Staley
On Jul 19, 8:15 pm, Adam Skutt ask...@gmail.com wrote: On Jul 19, 9:19 pm, Aaron Staley usaa...@gmail.com wrote: However, if interpreter 1 overfills the FIFO, we get an error (EAGAIN) f.write('a'*7) IOError: [Errno 11] Resource temporarily unavailable However interpreter 2 still

Convert '165.0' to int

2011-07-21 Thread Frank Millman
Hi all I want to convert '165.0' to an integer. The obvious method does not work - x = '165.0' int(x) Traceback (most recent call last): File stdin, line 1, in module ValueError: invalid literal for int() with base 10: '165.0' If I convert to a float first, it does work - int(float(x))

Re: Convert '165.0' to int

2011-07-21 Thread Leo Jay
On Thu, Jul 21, 2011 at 5:31 PM, Frank Millman fr...@chagford.com wrote: Hi all I want to convert '165.0' to an integer. The obvious method does not work - x = '165.0' int(x) Traceback (most recent call last):  File stdin, line 1, in module ValueError: invalid literal for int() with

Re: Convert '165.0' to int

2011-07-21 Thread Thomas Jollans
On 21/07/11 11:31, Frank Millman wrote: Hi all I want to convert '165.0' to an integer. Well, it's not an integer. What does your data look like? How do you wish to convert it to int? Do they all represent decimal numbers? If so, how do you want to round them? What if you get '165.xyz' as

Re: Convert '165.0' to int

2011-07-21 Thread Frank Millman
On Jul 21, 11:47 am, Leo Jay python.leo...@gmail.com wrote: On Thu, Jul 21, 2011 at 5:31 PM, Frank Millman fr...@chagford.com wrote: Hi all I want to convert '165.0' to an integer. The obvious method does not work - x = '165.0' int(x) Traceback (most recent call last):  File

Re: Convert '165.0' to int

2011-07-21 Thread Frank Millman
On Jul 21, 11:53 am, Thomas Jollans t...@jollybox.de wrote: On 21/07/11 11:31, Frank Millman wrote: Hi all I want to convert '165.0' to an integer. Well, it's not an integer. What does your data look like? How do you wish to convert it to int? Do they all represent decimal numbers? If

Re: Convert '165.0' to int

2011-07-21 Thread Frank Millman
[1] See separate thread on apparent inconsisteny in timeit timings.- Hide quoted text - I must have done something wrong - it is consistent now. Here are the results - C:\Python32\Libtimeit.py int(float('165.0')) 10 loops, best of 3: 3.51 usec per loop C:\Python32\Libtimeit.py

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
On Jul 19, 11:14 am, Thomas Jollans t...@jollybox.de wrote: I thought I'd have some fun with multi-processing: Nice joke. ☺ Here's a sane version: https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e hi thomas, i still cant get your code to work. I have a dir named

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
On Jul 19, 11:07 am, Thomas Jollans t...@jollybox.de wrote: On 19/07/11 18:54, Xah Lee wrote: On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote: On Jul 17, 12:47 am, Xah Lee xah...@gmail.com wrote: i hope you'll participate. Just post solution here. Thanks.

Re: a little parsing challenge ☺

2011-07-21 Thread Thomas Jollans
On 21/07/11 14:29, Xah Lee wrote: On Jul 19, 11:14 am, Thomas Jollans t...@jollybox.de wrote: I thought I'd have some fun with multi-processing: Nice joke. ☺ Here's a sane version: https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e hi thomas, i still cant get

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
2011-07-21 On Jul 18, 12:09 am, Rouslan Korneychuk rousl...@msn.com wrote: I don't know why, but I just had to try it (even though I don't usually use Perl and had to look up a lot of stuff). I came up with this: /(?|      (\()(?matched)([\}\]”›»】〉》」』]|$) |      

Re: Convert '165.0' to int

2011-07-21 Thread Billy Mays
On 07/21/2011 08:46 AM, Web Dreamer wrote: If you do not want to use 'float()' try: int(x.split('.')[0]) This is right. But, the problem is the same as with int(float(x)), the integer number is still not as close as possible as the original float value. I would in fact consider doing

Re: Convert '165.0' to int

2011-07-21 Thread Grant Edwards
On 2011-07-21, Web Dreamer webdrea...@nospam.fr wrote: Leo Jay a ?crit ce jeudi 21 juillet 2011 11:47 dans int(x.split('.')[0]) But, the problem is the same as with int(float(x)), the integer number is still not as close as possible as the original float value. Nobody said that close as

Re: a little parsing challenge ☺

2011-07-21 Thread Ian Kelly
On Thu, Jul 21, 2011 at 6:58 AM, Xah Lee xah...@gmail.com wrote: Thanks a lot for the fix Raymond. That fix was from Thomas Jollans, not Raymond Hettinger. Though, the code seems to have a minor problem. It works, but the report is wrong. e.g. output: 30068:

Re: I am fed up with Python GUI toolkits...

2011-07-21 Thread Kevin Walzer
On 7/20/11 9:05 AM, rantingrick wrote: On Jul 19, 9:44 pm, Kevin Walzerk...@codebykevin.com wrote: 2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python has a standard library!) Again, so? This isn't applicable to Tk, by the way. It's a GUI toolkit specifically designed for

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
Ok. Here's a preliminary report. 〈Lisp, Python, Perl, Ruby … Code to Validate Matching Brackets〉 http://xahlee.org/comp/validate_matching_brackets.html it's taking too much time to go thru. right now, i consider only one valid code, by Raymond Hettinger (with minor edit from others). right

Re: a little parsing challenge ☺

2011-07-21 Thread python
Xah, 1. Is the following string considered legal? [ { ( ] ) } Note: Each type of brace opens and closes in the proper sequence. But inter-brace opening and closing does not make sense. Or must a closing brace always balance out with the most recent opening brace like so? [ { ( ) } ] 2. If

Scikits.timeseries for 2.7

2011-07-21 Thread JB
I'm currently using python 2.7, with numpy and scipy already installed, but I can't seem to install Scikits.timeseries. I've downloaded the windows installer from sourceforge, but when I run it, it checks for a 2.6 installation, and obviously doesn't find the 2.7 folder. Anyone know of a 2.7

Can someone help please

2011-07-21 Thread Gary
Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but would like to fix the code. Thanks total = ' '

Re: Can someone help please

2011-07-21 Thread woooee
On Jul 21, 10:02 am, Gary woody...@sky.com wrote: For some reason it will not send me the first text file in the directory. You have to print an unsorted list of the directory to know the name or the first file in the directory. Files are not stored on disk in alphabetical order, but are many

Re: Can someone help please

2011-07-21 Thread Billy Mays
On 07/21/2011 01:02 PM, Gary wrote: Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but would like to fix the code. Thanks total =

Re: Can someone help please

2011-07-21 Thread Gary Herron
On 07/21/2011 10:02 AM, Gary wrote: Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but would like to fix the code. Thanks total

Re: Scikits.timeseries for 2.7

2011-07-21 Thread Vlastimil Brom
2011/7/21 JB jamie_brews...@hotmail.com: I'm currently using python 2.7, with numpy and scipy already installed, but I can't seem to install Scikits.timeseries. I've downloaded the windows installer from sourceforge, but when I run it, it checks for a 2.6 installation, and obviously doesn't

Re: Can someone help please

2011-07-21 Thread Gary Herron
On 07/21/2011 10:23 AM, Billy Mays wrote: On 07/21/2011 01:02 PM, Gary wrote: Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but

Re: Can someone help please

2011-07-21 Thread Gary Wood
Hi Thanks for your reply's and sorry guys for not explaining properly ok the problem with the code, which i never realised before, is it sends the first txt file as the header or subject field in an email and the rest in the body of the email which i don't want. I would like all the txt files in

PEP 8 and extraneous whitespace

2011-07-21 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I found a couple things that I think should be tweaked in PEP 8. I don't agree with everything in PEP 8, but I'm not going to debate /those/ points; rather I'm bringing up a couple examples that violate PEP 8, but don't apply to the reasons given

Re: Can someone help please

2011-07-21 Thread Billy Mays
On 07/21/2011 01:41 PM, Gary Herron wrote: On 07/21/2011 10:23 AM, Billy Mays wrote: On 07/21/2011 01:02 PM, Gary wrote: Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing

Re: Can someone help please

2011-07-21 Thread D'Arcy J.M. Cain
On Thu, 21 Jul 2011 18:43:48 +0100 Gary Wood python...@sky.com wrote: Hi Thanks for your reply's and sorry guys for not explaining properly ok the problem with the code, which i never realised before, is it sends the first txt file as the header or subject field in an email and the rest in

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Thomas Jollans
On 21/07/11 19:51, Andrew Berg wrote: Looks nice all lined up, but it violates PEP 8 because of those extra spaces, which is only because extra spaces look bad in one-line assignments that have nothing to do with lists/tuples or dictionaries. This is one of those times not to follow PEP 8 to

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Andrew Berg
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.21 01:32 PM, Thomas Jollans wrote: So, the PEP says: do not align operators. End of story. I'm pretty sure that colons, commas and equals signs are not operators. - -- CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Brandon Harris
I don't really think lining things up makes them any easier to read. In fact, the consistency in a single space on either side of an operator keeps things neat and clean. Also easier to maintain in any editor. Always lining up columns of stuff requires readjusting text every time you add a new

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Neil Cerutti
On 2011-07-21, Brandon Harris brandon.har...@reelfx.com wrote: I don't really think lining things up makes them any easier to read. In fact, the consistency in a single space on either side of an operator keeps things neat and clean. Also easier to maintain in any editor. Always lining up

Re: a little parsing challenge ☺

2011-07-21 Thread Xah Lee
On Jul 21, 9:43 am, pyt...@bdurham.com wrote: Xah, 1. Is the following string considered legal? [ { ( ] ) } Note: Each type of brace opens and closes in the proper sequence. But inter-brace opening and closing does not make sense. nu! Or must a closing brace always balance out with the

Re: Convert '165.0' to int

2011-07-21 Thread Terry Reedy
On 7/21/2011 10:13 AM, Grant Edwards wrote: On 2011-07-21, Web Dreamerwebdrea...@nospam.fr wrote: Leo Jay a ?crit ce jeudi 21 juillet 2011 11:47 dans int(x.split('.')[0]) But, the problem is the same as with int(float(x)), the integer number is still not as close as possible as the

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread rantingrick
On Jul 21, 1:46 pm, Andrew Berg bahamutzero8...@gmail.com wrote: [snip PGP noise!] On 2011.07.21 01:32 PM, Thomas Jollans wrote: So, the PEP says: do not align operators. End of story. I'm pretty sure that colons, commas and equals signs are not operators. 'au contraire mon frere'. Colons

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread bruno.desthuilli...@gmail.com
On 21 juil, 20:46, Andrew Berg bahamutzero8...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.21 01:32 PM, Thomas Jollans wrote: So, the PEP says: do not align operators. End of story. I'm pretty sure that colons, commas and equals signs are not operators.

Re: Crazy what-if idea for function/method calling syntax

2011-07-21 Thread ΤΖΩΤΖΙΟΥ
Thanks for your input, everyone. -- http://mail.python.org/mailman/listinfo/python-list

Re: a little parsing challenge ☺

2011-07-21 Thread Rouslan Korneychuk
On 07/21/2011 09:23 AM, Xah Lee wrote: Thanks for the code. are you willing to make it complete and standalone? i.e. i can run it like this: perl Rouslan_Korneychuk.pl dirPath and it prints any file that has mismatched pair and line/column number or the char position? Since you asked, I

// about building python //

2011-07-21 Thread victor lucio
Hi All, I'd like to embbed a thin python in one application of mine i'm developing so I need to know the module dependencies because I'm going to remove some modules. I also need to know the best way to rebuild the python core once these modules have been removed. So, could you provide me some

tab completion

2011-07-21 Thread Chess Club
Could someone help me change the tab completion setting in iPython on a Windows machine? I would like it to cycle through the available completions Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: a little parsing challenge ☺

2011-07-21 Thread Terry Reedy
On 7/21/2011 2:53 PM, Xah Lee wrote: had hopes that parser expert would show some proper parser solutions… in particular i think such can be expressed in Parsing Expression Grammar in just a few lines… but so far no deity came forward to show the light. lol I am not a parser expert but 20

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Terry Reedy
On 7/21/2011 2:46 PM, Andrew Berg wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 2011.07.21 01:32 PM, Thomas Jollans wrote: So, the PEP says: do not align operators. End of story. I'm pretty sure that colons, commas and equals signs are not operators. Whether or not they are

Re: // about building python //

2011-07-21 Thread Thomas Jollans
On 22/07/11 00:13, victor lucio wrote: Hi All, I'd like to embbed a thin python in one application of mine i'm developing so I need to know the module dependencies because I'm going to remove some modules. I also need to know the best way to rebuild the python core once these modules have

Re: I am fed up with Python GUI toolkits...

2011-07-21 Thread Gregory Ewing
sturlamolden wrote: Or should modern deskop apps be written with something completely different, such as HTML5? I hope not! HTML is great for web pages, but not everything should be a web page. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: I am fed up with Python GUI toolkits...

2011-07-21 Thread Gregory Ewing
Andrew Berg wrote: It has quite a few external dependencies, though (different dependencies for each platform, so it requires a lot to be cross-platform). I think that's a bit of an exaggeration -- there's only one major dependency on each platform, and it's a very widely used one (currently

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Roy Smith
In article mailman.1336.1311288320.1164.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: Whether or not they are intended, the rationale is that lining up does not work with proportional fonts. There are very few things I am absolutely religious about, but programming in a fixed

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Dan Sommers
On Thu, 21 Jul 2011 13:28:52 -0700, bruno.desthuilli...@gmail.com wrote: 1/ you can consider the equal sign ('=') is the binding operator. 2/ since {'key':'val'} is equivalent to dict(key=val), you can consider colons as a binding operator here But PEP 8 (under Other Recommendations)

WindowsError: exception: access violation

2011-07-21 Thread Sathish S
Hi Ppl, I have been trying to call a C DLL built in GCC with cygwin and Eclipse IDE from python. Since this DLL was built using cygwin it had the following two DLL's as dependency. cygwin1.dll and cyggcc_s-1.dll I'm calling the cygwin_dll_init method in the cygwin1.dll before accessing my DLL.

Re: turtles slowing down

2011-07-21 Thread Lee Harr
  there was a steady slowing down of turtles as time goes The problem is that when the turtle draws it does not just put marks on the canvas, it actually creates new canvas items. Canvas items aren't just pixels on the canvas, they are full-fledged objects which (if you wanted to) you could

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Thomas 'PointedEars' Lahn
Dan Sommers wrote: bruno.desthuilli...@gmail.com wrote: 1/ you can consider the equal sign ('=') is the binding operator. 2/ since {'key':'val'} is equivalent to dict(key=val), you can consider colons as a binding operator here But PEP 8 (under Other Recommendations) indicates spaces

Re: WindowsError: exception: access violation

2011-07-21 Thread Benjamin Kaplan
On Thu, Jul 21, 2011 at 6:42 PM, Sathish S sath...@solitontech.com wrote: Hi Ppl,  I have been trying to call a C DLL built in GCC with cygwin and Eclipse IDE from python. Since this DLL was built using cygwin it had the following two DLL's as dependency. cygwin1.dll and cyggcc_s-1.dll I'm

Re: Convert '165.0' to int

2011-07-21 Thread Thomas 'PointedEars' Lahn
Billy Mays wrote: On 07/21/2011 08:46 AM, Web Dreamer wrote: If you do not want to use 'float()' try: int(x.split('.')[0]) This is right. Assuming that the value of `x' is in the proper format, of course. Else you might easily cut to the first one to three digits of a string

Re: A little complex usage of Beautiful Soup Parsing Help!

2011-07-21 Thread Thomas 'PointedEars' Lahn
SAKTHEESH wrote: I am using Beautiful Soup to parse a html to find all text that is Not contained inside any anchor elements I came up with this code which finds all links within href _anchors_ _with_ `href' _attribute_ (commonly: links.) but not the other way around. What would that be

reportlab import error after dundled using py2exe

2011-07-21 Thread SANKAR .
Hi all, I bundled a small script written in python using py2exe. The script uses many packages and one of them is reportlab. After bundling using py2exe I tried to run the exe file and it is returning following error: C:\Python26\distDELchek.exe Traceback (most recent call last): File

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Ed Leafe
Religious fervor is one thing; freedom of religion is another! ;-) We strive for readability in our code, yet every printed material designed to be read, such as books, newspapers, etc., uses a proportional font. I switched to proportional fonts years ago, and am only reluctantly using fixed

[PyWart 1001] Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread rantingrick
I may have found the mother of all inconsitency warts when comparing the zipfile and tarfile modules. Not only are the API's different, but the entry and exits are differnet AND zipfile/tarfile do not behave like proper file objects should. import zipfile, tarfile import os

[PyWart 1001] Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread rantingrick
I may have found the mother of all inconsitency warts when comparing the zipfile and tarfile modules. Not only are the API's different, but the entry and exits are differnet AND zipfile/tarfile do not behave like proper file objects should. import zipfile, tarfile import os

[PyWart 1001] Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread rantingrick
I may have found the mother of all inconsitency warts when comparing the zipfile and tarfile modules. Not only are the API's different, but the entry and exits are differnet AND zipfile/tarfile do not behave like proper file objects should. import zipfile, tarfile import os

Python Game Programming Challenge 13 (September 2011) is coming!

2011-07-21 Thread Richard Jones
The 13th Python Game Programming Challenge (PyWeek) is coming. It'll run from the 11th to the 18th of September. The PyWeek challenge: - Invites entrants to write a game in one week from scratch either as an individual or in a team, - Is intended to be challenging and fun, - Will hopefully

Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Corey Richardson
Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011: I may have found the mother of all inconsitency warts when comparing the zipfile and tarfile modules. Not only are the API's different, but the entry and exits are differnet AND zipfile/tarfile do not behave like proper

Re: WindowsError: exception: access violation

2011-07-21 Thread Sathish S
Benjamin thanks for replying. i'm not using the python that comes with cygwin. Its the regular python 2.7.2 To add more info I'm opening up a zip file within the DLL. The zip file is located in the same directory. arg1 is the file name arg2 is zip password Thanks, Sathish On Fri, Jul 22, 2011

Re: Convert '165.0' to int

2011-07-21 Thread Billy Mays
On 7/21/2011 10:40 PM, Thomas 'PointedEars' Lahn wrote: Billy Mays wrote: On 07/21/2011 08:46 AM, Web Dreamer wrote: If you do not want to use 'float()' try: int(x.split('.')[0]) This is right. Assuming that the value of `x' is in the proper format, of course. Else you might easily cut

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread rantingrick
On Jul 21, 11:13 pm, Corey Richardson kb1...@aim.com wrote: Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011: I may have found the mother of all inconsitency warts when comparing the zipfile and tarfile modules. Not only are the API's different, but the entry and exits

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Corey Richardson
Excerpts from rantingrick's message of Fri Jul 22 00:48:37 -0400 2011: On Jul 21, 11:13pm, Corey Richardson kb1...@aim.com wrote: I agree, actually. Maybe i can offer a solution. A NEW module called archive.py (could even be a package!) which exports both the zip and tar file classes.

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Terry Reedy
On 7/22/2011 12:48 AM, rantingrick wrote: On Jul 21, 11:13 pm, Corey Richardsonkb1...@aim.com wrote: Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011: I may have found the mother of all inconsitency warts when comparing the zipfile and tarfile modules. Not only are the

Re: Inconsistencies between zipfile and tarfile APIs

2011-07-21 Thread Ryan Kelly
On Fri, 2011-07-22 at 01:45 -0400, Terry Reedy wrote: On 7/22/2011 12:48 AM, rantingrick wrote: On Jul 21, 11:13 pm, Corey Richardsonkb1...@aim.com wrote: Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011: I may have found the mother of all inconsitency warts when

[issue10271] warnings.showwarning should allow any callable object

2011-07-21 Thread lekma
lekma lekma...@gmail.com added the comment: Thank you very much for your help -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10271 ___ ___

[issue11629] Reference implementation for PEP 397

2011-07-21 Thread Mark Hammond
Mark Hammond skippy.hamm...@gmail.com added the comment: The most recent version of PEP397 has removed all mentioned of this reference implementation - the C implementation at https://bitbucket.org/vinay.sajip/pylauncher/ is now the reference. -- resolution: - out of date status:

[issue11435] Links to source code should now point to hg repo

2011-07-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 79d2682c4fc5 by Ezio Melotti in branch '3.2': #11435: link to the correct branch. http://hg.python.org/cpython/rev/79d2682c4fc5 New changeset 3028b5ab92c0 by Ezio Melotti in branch 'default': #11435: dummy merge

[issue11435] Links to source code should now point to hg repo

2011-07-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I fixed the URL in 3.2. The 2.7 docs link to the Subversion repo. Can I update them? 2.7 doesn't have the source directive, do you want to replace all the svn links manually? If so, either reopen this issue or create a new one.

[issue12568] Add functions to get the width in columns of a character

2011-07-21 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12568 ___ ___

[issue6820] Redefinition of HAVE_STRFTIME can cause compiler errors.

2011-07-21 Thread rgpitts
rgpitts richard.pi...@cdl.co.uk added the comment: As Python 2.6 is now security only and 2.7 is last major release I've patched this against Python 3.2 because pyconfig.h hadn't changed much since 2.6. I've done as Amaury suggested and changed the HAVE_XXX symbols to define 1 like autoconf.

[issue12601] Spelling error in the comments in the webbrowser module.

2011-07-21 Thread maniram maniram
New submission from maniram maniram maniandra...@gmail.com: At line 235 there is a comment which contains secons which should be changed to seconds. -- components: Library (Lib) messages: 140793 nosy: maniram.maniram priority: normal severity: normal status: open title: Spelling error

[issue12601] Spelling error in the comments in the webbrowser module.

2011-07-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3bc80b6f7cd8 by Ezio Melotti in branch '3.2': #12601: fix typo. http://hg.python.org/cpython/rev/3bc80b6f7cd8 New changeset d26c7b18fc9d by Ezio Melotti in branch 'default': #12601: merge with 3.2.

[issue12601] Spelling error in the comments in the webbrowser module.

2011-07-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! -- assignee: - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12590] First line and cursor not visible when opening files

2011-07-21 Thread Tal Einat
Changes by Tal Einat talei...@gmail.com: -- nosy: +taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12590 ___ ___ Python-bugs-list mailing

[issue12266] str.capitalize contradicts oneself

2011-07-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: I think it would be better to use this code: if (!Py_UNICODE_ISUPPER(*s)) { *s = Py_UNICODE_TOUPPER(*s); status = 1; } s++; while (--len 0) { if (Py_UNICODE_ISLOWER(*s)) { *s =

[issue12583] More detailed ImportError messages

2011-07-21 Thread Ram Rachum
Ram Rachum cool...@cool-rr.com added the comment: Thanks for explaining, I guess it's too complicated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12583 ___

[issue12266] str.capitalize contradicts oneself

2011-07-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Do you mean if (!Py_UNICODE_ISLOWER(*s)) { (with the '!')? This sounds fine to me, but with this approach all the uncased characters will go through a Py_UNICODE_TO* macro, whereas with the current code only the cased ones are

[issue12266] str.capitalize contradicts oneself

2011-07-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ezio Melotti wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: Do you mean if (!Py_UNICODE_ISLOWER(*s)) { (with the '!')? Sorry, here's the correct version: if (!Py_UNICODE_ISUPPER(*s)) { *s =

[issue12601] Spelling error in the comments in the webbrowser module.

2011-07-21 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: Thanks for the fast response. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12601 ___

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-21 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: It seems currently that in python 3.2 sys.platform is linux2 even though it is running linux 3 -- nosy: +maniram.maniram ___ Python tracker rep...@bugs.python.org

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It seems currently that in python 3.2 sys.platform is linux2 even though it is running linux 3 It's maybe because you ran ./configure with Linux 2.x.y (see msg138254). Try make distclean ./configure --with-debug make.

[issue11669] Clarify Lang Ref Compound statements footnote

2011-07-21 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11669 ___ ___ Python-bugs-list

[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12589 ___ ___

[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Is HAVE_DECL_ISINF defined in pyconfig.h? PyLong_FromDouble() uses Py_IS_INFINITY(x): -- /* Py_IS_INFINITY(X) * Return 1 if float or double arg is an infinity, else 0. * Caution: *X is

[issue12576] urlib.request fails to open some sites

2011-07-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12576 ___ ___

[issue7897] Support parametrized tests in unittest

2011-07-21 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Well, pyflakes will tell you about name clashes within a TestCase (unless you're shadowing a test on a base class which I guess is rarely the case)... When we generate the tests we could add the parameter reprs to the docstring. A

[issue12556] Disable size checks in mmap.mmap()

2011-07-21 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: I don't like the idea of adding an argument which doesn't have a counterpart in the POSIX version (especially to address such corner cases). Indeed, it seems rather messy for a corner case that may well not exist. If there are

[issue12556] Disable size checks in mmap.mmap()

2011-07-21 Thread Sergei Lebedev
Sergei Lebedev superbo...@gmail.com added the comment: Do you have an example of a /proc entry with st_size == 0 that can be mmapped (mapping /proc/sys/debug/exception-trace fails with EACCESS)? Yes, I've ran into the issue, while trying to mmap /proc/xen/xsd_kva, which is an interface to

[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-21 Thread Kuberan Naganathan
Kuberan Naganathan kubi...@gmail.com added the comment: Hi. I'm unable ( or have to jump through lots of hoops ) to submit this patch myself for regulatory reasons. Can someone else submit this please? Thanks. -- ___ Python tracker

[issue12600] Support parameterized TestCases in unittest

2011-07-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Note that this is fairly simple to do now via subclassing, so any proposed API would need to show a clear benefit over that approach to be worth the extra complexity in the unittest code base. --

[issue7897] Support parametrized tests in unittest

2011-07-21 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Note that name clashes *would* result in non-unique testcase ids, so we need to prevent that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7897

[issue7879] Too narrow platform check in test_datetime

2011-07-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Please implement name+argtuple first and build auto-naming on top of that. Nick's approach would not allow me to specify a custom (hand coded) name for each set of arguments, which is my normal use case. I also would not like the

[issue7879] Too narrow platform check in test_datetime

2011-07-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- Removed message: http://bugs.python.org/msg140810 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7879 ___

[issue7897] Support parametrized tests in unittest

2011-07-21 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Please implement name+argtuple first and build auto-naming on top of that. Nick's approach would not allow me to specify a custom (hand coded) name for each set of arguments, which is my normal use case. I also would not like the

[issue12556] Disable size checks in mmap.mmap()

2011-07-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12556 ___ ___

[issue12602] Missing using docs cross-references

2011-07-21 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: General untidiness in the anchor names (and lack of same for entries like script) Missing incoming: - from Invoking the Interpreter in the tutorial - direct link from runpy.run_module to -m switch - direct link from runpy.run_path to script

[issue12602] Missing using docs cross-references

2011-07-21 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12602

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-21 Thread higery
Changes by higery shoulderhig...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file22711/6382acfb1685.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

  1   2   >