Re: [newbie] advice and comment wanted on first tkinter program

2014-01-27 Thread Jean Dupont
Op woensdag 22 januari 2014 16:43:21 UTC+1 schreef Alister: On Wed, 22 Jan 2014 06:45:53 -0800, Jean Dupont wrote: Op maandag 20 januari 2014 10:17:15 UTC+1 schreef Alister: On Sun, 19 Jan 2014 20:04:05 -0800, Jean Dupont wrote: Op zaterdag 18 januari 2014 16:12:41 UTC+1 schreef Oscar

Re: [newbie] advice and comment wanted on first tkinter program

2014-01-27 Thread Jean Dupont
Op woensdag 22 januari 2014 15:45:53 UTC+1 schreef Jean Dupont: Op maandag 20 januari 2014 10:17:15 UTC+1 schreef Alister: On Sun, 19 Jan 2014 20:04:05 -0800, Jean Dupont wrote: Op zaterdag 18 januari 2014 16:12:41 UTC+1 schreef Oscar Benjamin: On 18 January 2014 14:52, Jean Dupont

Re: Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2

2014-01-27 Thread Tim Golden
On 26/01/2014 22:30, Luis Marsano wrote: I've installed python for all users with full permissions to all users (see picture). Python runs for all users. However, scripts only work when I run as Administrator. Running a script always results in an ImportError: cannot import name error. As

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Peter Otten
me wrote: Not me, you ;) Since this code is for a personal research project I'm not as concerned about code quality as I would be if I was getting paid to write production code...and if it was production code I'd only prototype a proof-of-concept in python and then rewrite in c++. Another

Re: Lists inside dictionary and how to look for particular value

2014-01-27 Thread Peter Otten
mick verdu wrote: ThanK you. It solved my problem. Can someone tell me how can i print particular value inside list of key. I know how to print J['PC2'][1] means will print IP. but I want the user to input some element and I will print element just before that element. e.g. if user

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Chris Angelico
On Mon, Jan 27, 2014 at 6:44 PM, me no...@all.net wrote: On Sun, 26 Jan 2014 23:17:29 -0800, Ethan Furman wrote: On 01/26/2014 10:46 PM, me wrote: [...] I'm satisfied that the except: syntax yields undefined behavior, and in my mind it shouldn't be syntactically allowed then. Two

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread me
On Mon, 27 Jan 2014 20:01:33 +1100, Chris Angelico wrote: On Mon, Jan 27, 2014 at 6:44 PM, me no...@all.net wrote: On Sun, 26 Jan 2014 23:17:29 -0800, Ethan Furman wrote: On 01/26/2014 10:46 PM, me wrote: [...] I'm satisfied that the except: syntax yields undefined behavior, and in my

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread Lele Gaifax
Skip Montanaro s...@pobox.com writes: I think this might have value, especially if to could bounce back and forth between both schemes. Is anyone aware of tools like this for Python? Bonus points for pointers to an Emacs implementation. There has been a recent thread on some emacs group about

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Alister
O My python stuff is all rapid application development for personal projects. If I need to do anything serious I take the time to do it in C+ +. Many people Prototype in python then re-factor into a compiled language later if needed (often it turns out there is not really any need :-) )

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Neil Cerutti
On 2014-01-27, me no...@all.net wrote: The thread is done so lets give it a rest. The condescending attitude about proper USENET tech help is just as annoying as perhaps my opinions seem. If someone is so sensitive as to not be able to discuss a technical matter without making it personal

Re: Remove unwanted characters from column

2014-01-27 Thread matt . s . marotta
On Monday, 27 January 2014 00:24:11 UTC-5, Dave Angel wrote: matt.s.maro...@gmail.com Wrote in message: School assignment is to create a tab separated output with the original given addresses in one column and then the addresses split into other columns (ex, columns for city, postal

Re: Unwanted Spaces and Iterative Loop

2014-01-27 Thread Mark Lawrence
On 27/01/2014 01:58, matt.s.maro...@gmail.com wrote: On Sunday, 26 January 2014 20:56:01 UTC-5, Chris Angelico wrote: On Mon, Jan 27, 2014 at 12:15 PM, matt.s.maro...@gmail.com wrote: I`m not reading and writing to the same file, I just changed the actual paths to directory. For next

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread Mark Lawrence
On 27/01/2014 01:46, Skip Montanaro wrote: What it is doing is color coding user-supplied identifiers, with different color for each one. I found that confusing to read. I think it would take some time to get used to, and I don't think it would be the only way I'd like to view my program. I

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Mark Lawrence
On 27/01/2014 07:17, me wrote: My python stuff is all rapid application development for personal projects. If I need to do anything serious I take the time to do it in C+ +. For me at least you'll fit in extremely well here with a sense of humour like that. -- My fellow Pythonistas, ask

Re: [RELEASED] Python 3.3.4 release candidate 1

2014-01-27 Thread Mark Lawrence
On 27/01/2014 07:36, Georg Brandl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm reasonably happy to announce the Python 3.3.4 release candidate 1. Reasonably happy? Is there a smiley missing there, or what? :) -- My fellow Pythonistas,

Re: Remove unwanted characters from column

2014-01-27 Thread Steven D'Aprano
On Mon, 27 Jan 2014 05:32:08 -0800, matt.s.marotta wrote: The code that I used is the proper way that we were supposed to complete the assignment. All I need now is an 'if...then' statement to get rid of the unwanted FarmID at the end of the addresses. I just don't know what will come after

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Steven D'Aprano
On Mon, 27 Jan 2014 09:32:43 +, some guy who calls himself me wrote: On Mon, 27 Jan 2014 20:01:33 +1100, Chris Angelico wrote: On Mon, Jan 27, 2014 at 6:44 PM, me no...@all.net wrote: On Sun, 26 Jan 2014 23:17:29 -0800, Ethan Furman wrote: On 01/26/2014 10:46 PM, me wrote: [...] I'm

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Rick Johnson
On Monday, January 27, 2014 3:32:43 AM UTC-6, me wrote: On Mon, 27 Jan 2014 20:01:33 +1100, Chris Angelico wrote: [snip chris reply] You feel better now that you too have vented? I had a productive discussion with a couple of top level posters who helped me solve my problem and they

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread Ethan Furman
On 01/26/2014 06:54 PM, Roy Smith wrote: Chris Angelico wrote: That said, though, I grew up without syntax highlighting of any sort, and didn't think it particularly important; but now that I have editors with all those sorts of features, I do find them handy. Same here, except I'd replace

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 2:33 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: You can kindly ignore Chris, he is just one of our well known *resident* lonely individuals, seeking attention yet again! And his constant blabbing about and idol worship of REXX is more annoying than all of xah

Re: [RELEASED] Python 3.3.4 release candidate 1

2014-01-27 Thread William Ray Wing
On Jan 27, 2014, at 8:55 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 27/01/2014 07:36, Georg Brandl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm reasonably happy to announce the Python 3.3.4 release candidate 1.

Re: Remove unwanted characters from column

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 2:03 AM, matt.s.maro...@gmail.com wrote: On Monday, 27 January 2014 09:57:32 UTC-5, Chris Angelico wrote: On Tue, Jan 28, 2014 at 1:23 AM, matt.s.maro...@gmail.com wrote: If the farmID 10: remove one character from the address column Elif farmID 10: remove

Re: Remove unwanted characters from column

2014-01-27 Thread matt . s . marotta
On Monday, 27 January 2014 08:54:20 UTC-5, Steven D'Aprano wrote: On Mon, 27 Jan 2014 05:32:08 -0800, matt.s.marotta wrote: The code that I used is the proper way that we were supposed to complete the assignment. All I need now is an 'if...then' statement to get rid of the

Re: Remove unwanted characters from column

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 1:23 AM, matt.s.maro...@gmail.com wrote: If the farmID 10: remove one character from the address column Elif farmID 10: remove two characters from the address column What if farmID == 10? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Remove unwanted characters from column

2014-01-27 Thread matt . s . marotta
On Monday, 27 January 2014 09:57:32 UTC-5, Chris Angelico wrote: On Tue, Jan 28, 2014 at 1:23 AM, matt.s.maro...@gmail.com wrote: If the farmID 10: remove one character from the address column Elif farmID 10: remove two characters from the address column What if farmID == 10?

Re: Remove unwanted characters from column

2014-01-27 Thread Mark Lawrence
On 27/01/2014 14:23, matt.s.maro...@gmail.com wrote: On Monday, 27 January 2014 08:54:20 UTC-5, Steven D'Aprano wrote: On Mon, 27 Jan 2014 05:32:08 -0800, matt.s.marotta wrote: The code that I used is the proper way that we were supposed to complete the assignment. All I need now is an

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Mark Lawrence
On 27/01/2014 15:53, Chris Angelico wrote: Frankly, I don't idol worship *any* language. I worship English because it's so easy to learn. Ducks and runs :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Zachary Ware
On Mon, Jan 27, 2014 at 1:17 AM, me no...@all.net wrote: It's the intendation specific requirements that throw me. I haven't seen such a hork since RPG. ;^) Best I can tell, the only thing RPG and Python have in common is the fact that they're programming languages, though I'm being a little

EncodedFile/StreamRecoder

2014-01-27 Thread Mark Lawrence
I'd never heard of these and personally have no use for them, but came across them here http://bugs.python.org/issue20405#msg209430 and thought they might be of use to some of you. Quoting from the message:- The purpose of EncodedFile/StreamRecoder was to convert an externally used encoding

Re: Remove unwanted characters from column

2014-01-27 Thread Denis McMahon
On Sun, 26 Jan 2014 19:49:01 -0800, matt.s.marotta wrote: School assignment is to create a tab separated output with the original given addresses in one column and then the addresses split into other columns (ex, columns for city, postal code, street suffix). If you're trying to create fixed

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Dan Sommers
On Mon, 27 Jan 2014 10:23:49 -0600, Zachary Ware wrote: Understood, except that some parameters take multiple elements...thus why I manually reference the indexes. Try this on for size, then: a_iter = iter(a) for arg in a_iter: print('current', arg) if arg == '-#':

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Mark Lawrence
On 27/01/2014 07:17, me wrote: It's the intendation specific requirements that throw me. I haven't seen such a hork since RPG. ;^) Programming with a rocket propelled grenade is vastly superior to programming in C++. -- My fellow Pythonistas, ask not what our language can do for you, ask

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Michael Torrie
On 01/27/2014 02:32 AM, me wrote: You feel better now that you too have vented? Sorry but the emotional intent you're reading in to Chris's post is completely misplaced. I don't know why you chose to be offended by it. Chris's comments about C++ are accurate, but not intended to be a personal

Run python script with CMD error

2014-01-27 Thread raedtjr
Hi everyone; Im new with python and i just installed it and added it to the path.I have already a script that i want to execute(run) but every time i do this commend python client.py in CMD to execute it,i got this error. Any solutions please? File , line 29 except Exception, e: ^

Re: Run python script with CMD error

2014-01-27 Thread Peter Otten
raed...@gmail.com wrote: Hi everyone; Im new with python and i just installed it and added it to the path.I have already a script that i want to execute(run) but every time i do this commend python client.py in CMD to execute it,i got this error. Any solutions please? File , line

Re: Run python script with CMD error

2014-01-27 Thread Joel Goldstick
Look at lines around 29 On Jan 27, 2014 2:45 PM, raed...@gmail.com wrote: Hi everyone; Im new with python and i just installed it and added it to the path.I have already a script that i want to execute(run) but every time i do this commend python client.py in CMD to execute it,i got

Re: Run python script with CMD error

2014-01-27 Thread FalaG
I m using Python 3.3 and the script is not written by me therefore i'm gonna try to install 2.7 instead and i will let you know the result. Thank you Peter -- https://mail.python.org/mailman/listinfo/python-list

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Rick Johnson
On Monday, January 27, 2014 9:53:37 AM UTC-6, Chris Angelico wrote: Heh. If you'd said Pike instead of REXX, I might have believed you :) I've said more about Pike than is perhaps appropriate, but of late, I've actually not been the one to most often quote REXX code. Yes in my haste to inject

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Chris Angelico
On Tue, Jan 28, 2014 at 7:22 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: maintain a consistency between them input (reads a string from stdin) print (writes a string to stdout) It is my strong believe that defining an input method that magically evals the input string is

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Steven D'Aprano
On Mon, 27 Jan 2014 12:22:22 -0800, Rick Johnson wrote: input is only used by neophytes, so who cares about breaking that one, but print is almost everywhere! Heh heh heh, how very Ranting Rick to think that a function for listening to input is unimportant, while a function for spraying

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread Vito De Tullio
Skip Montanaro wrote: My son sent me a link to an essay about highlighting program data instead of keywords: https://medium.com/p/3a6db2743a1e/ I think this might have value, especially if to could bounce back and forth between both schemes. Is anyone aware of tools like this for Python?

Need help with pushing technology ... and a bit more ...

2014-01-27 Thread Mario R. Osorio
Background: === We are studying the possibility of creating a system that will have the following entities: Customer(s) (appCustomer) Service Provider(s) (appProviders) and Manager(s) Server(s) appCustomers will have all appServices available to them and appServices will have at least

Re: Help with my 8-year old son's first program. I'm stuck

2014-01-27 Thread john pierce
First, forget about the def a() statement. def is for defining a function and this is not a function. Second, research the difference between == (logical test) and = (assignment operator). Third, take a look at the length of op just after the readline(). You can add a line that says

Web service in Python

2014-01-27 Thread yiitest123
I installed rapidsms in local for send messages. The application tested with local server. Now i would like to store the incoming messages in another database via a php application. Means when a message received in rapidsms (Django-Python) app, i want to call a php application function and

Re: Highlighting program variables instead of keywords?

2014-01-27 Thread wxjmfauth
Different, but a little bit related. The work which is done actually on the possibility (not implemented but alreay realized) to colorize (style) the different graphemes of a glyph is very interesting. Python with its absurd Flexible String Representation just become a no go for the kind of task.

Re: Web service in Python

2014-01-27 Thread dieter
yiitest...@gmail.com writes: I installed rapidsms in local for send messages. The application tested with local server. Now i would like to store the incoming messages in another database via a php application. Means when a message received in rapidsms (Django-Python) app, i want to call a

Re: Need Help with Programming Science Project

2014-01-27 Thread alex23
On 24/01/2014 8:05 PM, theguy wrote: I have a science project that involves designing a program which can examine a bit of text with the author's name given, then figure out who the author is if another piece of example text without the name is given. This sounds like exactly the sort of

[issue20394] Coverity complains on audioop

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0a406b6fe61f by Christian Heimes in branch 'default': I forgot to add a Misc/NEWS entry for issue #20394 http://hg.python.org/cpython/rev/0a406b6fe61f -- ___ Python tracker rep...@bugs.python.org

[issue20394] Coverity complains on audioop

2014-01-27 Thread Christian Heimes
Christian Heimes added the comment: The commit has silenced coverity's warning. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20394 ___ ___

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 791b69f9f96d by Victor Stinner in branch '3.3': Issue #20367: Fix behavior of concurrent.futures.as_completed() for duplicate http://hg.python.org/cpython/rev/791b69f9f96d -- ___ Python tracker

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-27 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: remind - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20367 ___

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 323cb02abfc6 by Gregory P. Smith in branch '2.7': Issue #19081: Remove the zipimporter.files reference as the zip TOC http://hg.python.org/cpython/rev/323cb02abfc6 -- ___ Python tracker

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for sha512module after changes from Larry to clinic. -- Added file: http://bugs.python.org/file33742/clinic_sha512module_v3.patch ___ Python tracker rep...@bugs.python.org

[issue19077] More robust TemporaryDirectory cleanup

2014-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yeah, I thought about it. Only flag should be false in shutdown mode, because it will be None when a module will be cleaned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19077

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for md5module after changes from Larry to clinic. -- Added file: http://bugs.python.org/file33743/clinic_md5module_v3.patch ___ Python tracker rep...@bugs.python.org

[issue18321] Multivolume support in tarfile module

2014-01-27 Thread Eduardo Robles Elvira
Eduardo Robles Elvira added the comment: Do we have any news on this patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___ ___

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for resource module based on Zachary's comment. -- Added file: http://bugs.python.org/file33744/clinic_resource_v2.patch ___ Python tracker rep...@bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Status: Modules/sha1module.c: done Modules/sha256module.c: done Modules/sha512module.c: done Modules/md5module.c: done All of them are ready for Python 3.4. /* AC 3.5: optional positional arguments */ Modules/_codecsmodule --

[issue20399] Comparison of memoryview

2014-01-27 Thread Mark Lawrence
Mark Lawrence added the comment: Some discussion here https://groups.google.com/forum/#!topic/dev-python/1D_iExlsva8 -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20399

[issue19077] More robust TemporaryDirectory cleanup

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50aa9e3ab9a4 by Serhiy Storchaka in branch '3.3': Issue #19077: tempfile.TemporaryDirectory cleanup is now most likely http://hg.python.org/cpython/rev/50aa9e3ab9a4 New changeset d792eb3afa58 by Serhiy Storchaka in branch 'default': Issue #19077:

[issue20395] Extract generated clinic code in Modules/_pickle.c to separate file

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1aa8ea187560 by Serhiy Storchaka in branch 'default': Issue #20395: Extract generated clinic code in Modules/_pickle.c to separate file. http://hg.python.org/cpython/rev/1aa8ea187560 -- nosy: +python-dev

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2014-01-27 Thread Wim
Wim added the comment: Ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17088 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19077] More robust TemporaryDirectory cleanup

2014-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patch Antoine. And thank you for your excellent idea Richard. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue20395] Extract generated clinic code in Modules/_pickle.c to separate file

2014-01-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20395

[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: That doesn't sound terribly useful indeed. The hex example is a toy example. Real-world examples would involve compression (zlib...) but then it is probably much more efficient to have a dedicated implementation (GzipFile) rather than blindly call

[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread STINNER Victor
STINNER Victor added the comment: I agree with Antoine, I dislike the idea of BinaryTransformWrapper, it remembers me the evil codecs.EncodedFile thing. What are the usecases? -- ___ Python tracker rep...@bugs.python.org

[issue20406] Use application icon for IDLE

2014-01-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently IDLE use default Tk icon. The proposed patch sets special application icon for IDLE. -- components: IDLE files: idle_appicon.patch keywords: patch messages: 209428 nosy: kbk, roger.serwy, serhiy.storchaka, terry.reedy priority: normal

[issue15189] tkinter.messagebox does not use the application's icon

2014-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Mark's recipe works pretty well (requires Tk 8.5+). And you can use special method for this: app.wm_iconphoto(True, icon). What we can made more? We can set Python-related application icon for IDLE (issue20406). But for user applications their authors are

[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 27.01.2014 11:00, STINNER Victor wrote: STINNER Victor added the comment: I agree with Antoine, I dislike the idea of BinaryTransformWrapper, it remembers me the evil codecs.EncodedFile thing. What are the usecases? Ever used recode ? The

[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nobody talks to the console using hex_codec. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20405 ___ ___

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for type module based on Zachary's comment. However, I can not convert this method. {__subclasshook__, object_subclasshook, METH_CLASS | METH_VARARGS, object_subclasshook_doc}, static PyObject * object_subclasshook(PyObject *cls,

[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Nick Coghlan
Nick Coghlan added the comment: I only used hex as the example because it was trivial to generate test data for. The stackable streaming IO model is an extremely powerful one - the approach we already use in the io module has some similarities to the one Texas Instruments use in DSP/BIOS

[issue20405] Add io.BinaryTransformWrapper and a transform parameter to open()

2014-01-27 Thread Nick Coghlan
Nick Coghlan added the comment: Note that this is something that could (and should) start life as a module on PyPI, which would also provide cross version support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20405

[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Larry Hastings
New submission from Larry Hastings: The documentation for heapq.nsmallest and heapq.nlargest: http://docs.python.org/3.3/library/heapq.html#heapq.nlargest claim that they accept three arguments: n, iterable, and key=None. In fact, the implementations of both these functions only accept two

[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20407 ___ ___ Python-bugs-list

[issue18321] Multivolume support in tarfile module

2014-01-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: Lars, would you like to take a look? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___ ___

[issue20408] memoryview() constructor documentation error

2014-01-27 Thread Larry Hastings
New submission from Larry Hastings: The documentation for the memoryview constructor says it takes memoryview(obj). Oddly, memoryview accepts keyword arguments (for its one required value), and the name of the argument is object, not obj. -- messages: 209436 nosy: georg.brandl, larry

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-01-27 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch checks the requested encoding is a valid text encoding in TextIOWrapper.__init__. Two additional test changes were needed: - the one that checks handling of non-text-encodings at runtime now tweaks quopri to lie about being a text encoding when

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-27 Thread Larry Hastings
Larry Hastings added the comment: For what it's worth: I figured out how this happened. Maybe it's obvious to you, but this behavior baffled me until I went back and looked at the revision history. In revision e260d6daf784, the argument parsing for itertools.repeat looks like this:

[issue20319] concurrent.futures.wait() can block forever even if Futures have completed

2014-01-27 Thread Glenn Langford
Glenn Langford added the comment: Revised patch; I don't think there is a need to sort the keys when waiters are being removed since only one lock is acquired at a time. Stress tests on both wait() and as_completed() work with this approach. -- Added file:

[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-27 Thread Brett Cannon
Brett Cannon added the comment: Technically you should only have one title at the very top of the heading hierarchy. That's why the patch changed the title to use top+bottom asterisks. You could have just as easily used equal signs as reST doesn't care, just that you are consistent.

[issue20398] stem crashes python

2014-01-27 Thread lothar
lothar added the comment: i have the current cygwin python3 package: http://mirrors.kernel.org/sourceware/cygwin/x86_64/release/python3/ i have no intention to build python myself. -- ___ Python tracker rep...@bugs.python.org

[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Georg Brandl
Georg Brandl added the comment: Yes. Probably someone wished they would implement it :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20407 ___

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-27 Thread Brett Cannon
Brett Cannon added the comment: Just to answer Nick's question: I read the extension import code just last month to see if I could update it for PEP 451 fast enough (obviously the answer was no =). As for zipimport, I read that (and the extension import code yet again) in the 3.3 timeframe

[issue20398] stem crashes python

2014-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you try with a standard Windows build? http://python.org/download/releases/3.3.3/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20398 ___

[issue20398] stem crashes python

2014-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: (note that stem.util.system at least uses ctypes) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20398 ___ ___

[issue20399] Comparison of memoryview

2014-01-27 Thread Stefan Krah
Stefan Krah added the comment: For integer sequences I think non-equality comparisons will be somewhat confusing. Are the sequences little or big endian? If we start to view bytes more like latin-1 again (PEP 461), it would make sense for the 'B' and 'c' formats. --

[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Georg Brandl
Georg Brandl added the comment: I see, there are two def nsmallest in heapq.py. Tricky! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20407 ___

[issue20407] heapq.nsmallest and heapq.nlargest don't accept a key parameter

2014-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: The docs are correct as-is. This is a documented and tested behavior. from heapq import nsmallest list(nsmallest(3, ['larry', 'georg', 'raymond', 'guido', 'tim'], key=len)) ['tim', 'larry', 'georg'] The C implementation doesn't have a

[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2014-01-27 Thread Tal Einat
Tal Einat added the comment: Attached is a complete AC conversion of itertools. This is a large conversion, so I was extra careful. I even went over the entire diff manually to check for any errors. Compilation runs without warnings and the entire test suite passes. Notes: * I didn't convert

[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2014-01-27 Thread Tal Einat
Tal Einat added the comment: And at that, I've finished the conversion of this entire Derby group! Woohoo! (except for itertools.repeat which is pending discussion) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20180

[issue20409] .readline() returned garble text

2014-01-27 Thread Xiaoqing Rong
New submission from Xiaoqing Rong: I'm using Windows 8. I created file 'weird1.txt' (attached) from an Excel worksheet using save as Unicode Text (*.txt). And this happened when I used Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit (AMD64)] on win32: handle =

[issue20409] .readline() returned garble text

2014-01-27 Thread R. David Murray
R. David Murray added the comment: The file use different encodings. In the first case, the first two bytes (which don't appear in the second example) I believe are the BOM. I'm not an expert, but I believe it is a utf-16 file (thus all the \x00 bytes). The second file is presumably utf-8,

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2014-01-27 Thread Glenn Langford
Glenn Langford added the comment: Updated patch with change to Doc/library/concurrent.futures.rst. -- Added file: http://bugs.python.org/file33751/issue20369.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20369

[issue20378] Implement `Signature.__repr__`

2014-01-27 Thread Ram Rachum
Ram Rachum added the comment: If you'd like to expand this issue's scope to all the objects related to Signature, I think that'll be good. All objects need good introspection strings. -- ___ Python tracker rep...@bugs.python.org

[issue20378] Implement `Signature.__repr__`

2014-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: Ram, yes, I agree. Something like 'Signature f: alpha, beta=3, *args, **kwargs' should work. -- assignee: - yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20378

[issue20410] Argument Clinic: add 'self' return converter

2014-01-27 Thread Zachary Ware
New submission from Zachary Ware: It would be nice to have a 'self' return converter for simple functions like winreg.HKEYType.__enter__ (which is implemented as Py_XINCREF(self); return self;). With the typedef and type_object specifications now required for the class directive, 'self' is

[issue20372] inspect.getfile should raise a TypeError if C object does not have __module__

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50706164c38f by Yury Selivanov in branch 'default': inspect.getfile: Don't crash on classes without '__module__' attribute #20372 http://hg.python.org/cpython/rev/50706164c38f -- nosy: +python-dev ___

[issue20372] inspect.getfile should raise a TypeError if C object does not have __module__

2014-01-27 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20372 ___ ___

[issue20380] __defaults__ changed by *args

2014-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: Though perhaps a note in the documentation would be helpful for future confused people. I agree. Also, __kwdefaults__ wasn't documented. Please take a look at the attached patch. -- keywords: +patch nosy: +yselivanov Added file:

  1   2   >