Re: File Read issue by using module binascii
Tim Roberts wrote: Jimmie He jimmie...@gmail.com wrote: When I run the readbmp on an example.bmp(about 100k),the Shell is become to No respose,when I change f.read() to f.read(1000),it is ok,could someone tell me the excat reason for this? Thank you in advance! Python Code as below!! import binascii def read_bmp(): f = open('example.bmp','rb') rawdata = f.read() #f.read(1000) is ok hexstr = binascii.b2a_hex(rawdata) #Get an HEX number bsstr = bin (int(hexstr,16))[2:] I suspect the root of the problem here is that you don't understand what this is actually doing. You should run this code in the command-line interpreter, one line at a time, and print the results. The read instruction produces a string with 100k bytes. The b2a_hex then produces a string with 200k bytes. Then, int(hexstr,16) takes that 200,000 byte hex string and converts it to an integer, roughly equal to 10 to the 240,000 power, a number with some 240,000 decimal digits. You then convert that integer to a binary string. That string will contain 800,000 bytes. You then drop the first two characters and print the other 799,998 bytes, each of which will be either '0' or '1'. I am absolutely, positively convinced that's not what you wanted to do. What point is there in printing out the binary equavalent of a bitmap? Even if you did, it would be much quicker for you to do the conversion one byte at a time, completely skipping the conversion to hex and then the creation of a massive multi-precision number. Example: Hm, if you fix the long integer arithmetic problem you should also attack the unbounded memory consumption problem in general ;) f = open('example.bmp','rb') rawdata = f.read() bsstr = [] for b in rawdata: bsstr.append( bin(ord(b)) ) bsstr = ''.join(bsstr) or even: f = open('example.bmp','rb') bsstr = ''.join( bin(ord(b))[2:] for b in f.read() ) Yes, the original is horrible newbie code ;) but that's what you tend to write while learning to program -- and python can handle it alright. On the other hand, Idle becomes unresponsive when I do print(a*10**6) in its shell. I'm still investigating, but the problem seems to be that it's a single line. print((a*100+\n) * 10**4) takes under 7 secs. Not as good as konsole (KDE's terminal emulation) which finishes in 0.5 secs, but acceptable. -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: Is there the place to open a ticket for Python developers? bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
Cannot reproduce on windows 7 ultimate Steps taken: Start cmd cd to Desktop where I have a GUI application run python on the console import os os.execl('exe.exe', 'exe.exe') python stops at this point and starts GUI application as expected On Sun, Apr 28, 2013 at 8:51 AM, Terry Jan Reedy tjre...@udel.edu wrote: On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: Is there the place to open a ticket for Python developers? bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list -- Fábio Santos -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
Is this executable freely available, or something you can share? If you can send me that executable I can try to reproduce the bug with it. -- http://mail.python.org/mailman/listinfo/python-list
Re: File Read issue by using module binascii
Tim Roberts t...@probo.com wrote: Jimmie He jimmie...@gmail.com wrote: When I run the readbmp on an example.bmp(about 100k),the Shell is become to No respose,when I change f.read() to f.read(1000),it is ok,could someone tell me the excat reason for this? Thank you in advance! Python Code as below!! import binascii def read_bmp(): f = open('example.bmp','rb') rawdata = f.read() #f.read(1000) is ok hexstr = binascii.b2a_hex(rawdata) #Get an HEX number bsstr = bin (int(hexstr,16))[2:] I suspect the root of the problem here is that you don't understand what this is actually doing. You should run this code in the command-line interpreter, one line at a time, and print the results. The read instruction produces a string with 100k bytes. The b2a_hex then produces a string with 200k bytes. Then, int(hexstr,16) takes that 200,000 byte hex string and converts it to an integer, roughly equal to 10 to the 240,000 power, a number with some 240,000 decimal digits. You then convert that integer to a binary string. That string will contain 800,000 bytes. You then drop the first two characters and print the other 799,998 bytes, each of which will be either '0' or '1'. I am absolutely, positively convinced that's not what you wanted to do. What point is there in printing out the binary equavalent of a bitmap? Even if you did, it would be much quicker for you to do the conversion one byte at a time, completely skipping the conversion to hex and then the creation of a massive multi-precision number. Example: f = open('example.bmp','rb') rawdata = f.read() bsstr = [] for b in rawdata: bsstr.append( bin(ord(b)) ) bsstr = ''.join(bsstr) or even: f = open('example.bmp','rb') bsstr = ''.join( bin(ord(b))[2:] for b in f.read() ) Exactly my idea at first. But then I started to time it (using the timeit module) by comparing the following functions: # Original version def c1( rawdata ) : h = binascii.b2a_hex( rawdata ) z = bin( int( h, 16 ) )[ 2 : ] return '0' * ( 8 * len( r ) - len( z ) ) + z # Convert each byte directly def c2( rawdata ) : return ''.join( bin( ord( x ) )[ 2 : ].rjust( 8, '0' ) for x in r ) # Convert each byte using a list for table look-up def c3( rawdata ) : h = [ bin( i )[ 2 : ].rjust( 8, '0' ) for i in range( 256 ) ] return ''.join( h[ ord( x ) ] for x in rawdata ) # Convert each byte using a dictionary for table look-up (avoids # lots of ord() calls) def c4( rawdata ) : h = { chr( i ) : bin( i )[ 2 : ].rjust( 8, '0' ) for i in range( 256 ) } return ''.join( h[ x ] for x in rawdata ) As you can see I even in c3() and c4() tried to speed things up further by using a table look-up instead if calling bin() etc. on each byte. But the results was that c2() is nearly 15 times slower than c1(), c3() about 3 times and c4() still more than 2 times slower! So the method the OP uses seems to be quite a bit more efficient than one might be tempted to assume. I would guess that the reason is that c1() does just a small number of calls of functions that probably aren't implemented in Python but in C and thus can be a lot faster then anything you could achieve with Python, while the other functions use a for loop in Python, which seems to account for a good part of the CPU time used. To test for that I split the 'rawdata' string into a list of character (i.e. single letter strings) and re- assembled it using join() and a for loop: r = list( rawdata( ) z = ''.join( x for x in r ) The second line alone took about 1.7 times longer than the whole, seemingly convoluted c1() function! What I take away from this is that a lot of the assumption one is prone to make when coming from e.g. a C/C++ background can be quite misleading when extrapolating to Python (or other in- terpreted languages)... Best regards, Jens -- \ Jens Thoms Toerring ___ j...@toerring.de \__ http://toerring.de -- http://mail.python.org/mailman/listinfo/python-list
Re: File Read issue by using module binascii
On Sunday, April 28, 2013 8:04:04 PM UTC+8, Jens Thoms Toerring wrote: Tim Roberts t...@probo.com wrote: Jimmie He jimmie...@gmail.com wrote: When I run the readbmp on an example.bmp(about 100k),the Shell is become to No respose,when I change f.read() to f.read(1000),it is ok,could someone tell me the excat reason for this? Thank you in advance! Python Code as below!! import binascii def read_bmp(): f = open('example.bmp','rb') rawdata = f.read() #f.read(1000) is ok hexstr = binascii.b2a_hex(rawdata) #Get an HEX number bsstr = bin (int(hexstr,16))[2:] I suspect the root of the problem here is that you don't understand what this is actually doing. You should run this code in the command-line interpreter, one line at a time, and print the results. The read instruction produces a string with 100k bytes. The b2a_hex then produces a string with 200k bytes. Then, int(hexstr,16) takes that 200,000 byte hex string and converts it to an integer, roughly equal to 10 to the 240,000 power, a number with some 240,000 decimal digits. You then convert that integer to a binary string. That string will contain 800,000 bytes. You then drop the first two characters and print the other 799,998 bytes, each of which will be either '0' or '1'. I am absolutely, positively convinced that's not what you wanted to do. What point is there in printing out the binary equavalent of a bitmap? Even if you did, it would be much quicker for you to do the conversion one byte at a time, completely skipping the conversion to hex and then the creation of a massive multi-precision number. Example: f = open('example.bmp','rb') rawdata = f.read() bsstr = [] for b in rawdata: bsstr.append( bin(ord(b)) ) bsstr = ''.join(bsstr) or even: f = open('example.bmp','rb') bsstr = ''.join( bin(ord(b))[2:] for b in f.read() ) Exactly my idea at first. But then I started to time it (using the timeit module) by comparing the following functions: # Original version def c1( rawdata ) : h = binascii.b2a_hex( rawdata ) z = bin( int( h, 16 ) )[ 2 : ] return '0' * ( 8 * len( r ) - len( z ) ) + z # Convert each byte directly def c2( rawdata ) : return ''.join( bin( ord( x ) )[ 2 : ].rjust( 8, '0' ) for x in r ) # Convert each byte using a list for table look-up def c3( rawdata ) : h = [ bin( i )[ 2 : ].rjust( 8, '0' ) for i in range( 256 ) ] return ''.join( h[ ord( x ) ] for x in rawdata ) # Convert each byte using a dictionary for table look-up (avoids # lots of ord() calls) def c4( rawdata ) : h = { chr( i ) : bin( i )[ 2 : ].rjust( 8, '0' ) for i in range( 256 ) } return ''.join( h[ x ] for x in rawdata ) As you can see I even in c3() and c4() tried to speed things up further by using a table look-up instead if calling bin() etc. on each byte. But the results was that c2() is nearly 15 times slower than c1(), c3() about 3 times and c4() still more than 2 times slower! So the method the OP uses seems to be quite a bit more efficient than one might be tempted to assume. I would guess that the reason is that c1() does just a small number of calls of functions that probably aren't implemented in Python but in C and thus can be a lot faster then anything you could achieve with Python, while the other functions use a for loop in Python, which seems to account for a good part of the CPU time used. To test for that I split the 'rawdata' string into a list of character (i.e. single letter strings) and re- assembled it using join() and a for loop: r = list( rawdata( ) z = ''.join( x for x in r ) The second line alone took about 1.7 times longer than the whole, seemingly convoluted c1() function! What I take away from this is that a lot of the assumption one is prone to make when coming from e.g. a C/C++ background can be quite misleading when extrapolating to Python (or other in- terpreted languages)... Best regards, Jens -- \ Jens Thoms Toerring ___ j...@toerring.de \__ http://toerring.de Hi,Jens Peter Tim, Thank you very much for your wonderful analysis for my newbie question. I admit that I throw this question to much early because I just want some guru to inspire me;-) If it really confuse you,excuse my noise:-) What I intend to do is to make an BMP Font Maker(Covert the BMP to an data array,what I did wrong is print it directly to screen and had not understand it at all firstly. C1()~C4() which Jens provided deeply indicate that we should think about the
Adding new source types to distutils?
Last night I wrote a toy prototype module that lets one compile Rust crates into extension modules for Python. The problem is, I don't know the right way to do this. Ideally I'd just want to tell build_ext that there's a new source type I want to handle (.rc and .rs), and also tell distutils that it should handle it by running the code that I specify (which can compile the .rs/.rc files, remove them from the sources list, and add the resulting object files and such to the linker arguments) The problem is that, as I understand it, the way to do this is subclassing and then replacing the build_ext command. At least, that's what Cython does. The problem is, that's what Cython does, so if I do that, it means you can't use Cython and Rust together -- that's bad, because Cython would be useful for writing bindings to Rust crates, too. So I don't want to write my own subclass. In place of that, I don't know what the right approach is. One possibility is that I subclass Cython's build_ext if it exists, otherwise distutils'. This seems like it's a terrible thing to do, since it locks out any Cython alternative that I may not be aware of, and any other kind of extension to build_ext. I don't know what else I can do. (What I ended up doing, just so that I could actually write the code, was write a new Extension type that compiles the rust code when the extra_link_args attribute is accessed. This is, of course, absolutely terrible, and only barely does the job. It's not as bad as what I had to do to get the linker arguments from rustc, though...) -- Devin -- http://mail.python.org/mailman/listinfo/python-list
Re: Adding new source types to distutils?
Devin Jeanpierre, 28.04.2013 19:55: Last night I wrote a toy prototype module that lets one compile Rust crates into extension modules for Python. The problem is, I don't know the right way to do this. Ideally I'd just want to tell build_ext that there's a new source type I want to handle (.rc and .rs), and also tell distutils that it should handle it by running the code that I specify (which can compile the .rs/.rc files, remove them from the sources list, and add the resulting object files and such to the linker arguments) The problem is that, as I understand it, the way to do this is subclassing and then replacing the build_ext command. At least, that's what Cython does. The problem is, that's what Cython does, so if I do that, it means you can't use Cython and Rust together -- that's bad, because Cython would be useful for writing bindings to Rust crates, too. So I don't want to write my own subclass. In place of that, I don't know what the right approach is. That approach is discouraged for Cython. The compiler comes with a cythonize() function these days, which users can simply call from their setup.py scripts. It spits out a list of Extensions that you can pass into setup(). So, for example, you can say extensions = cythonize('mypackage/*.pyx') and it would do the right thing. You can also pass configuration options into cythonize() to influence the way Cython translates your code. Alternatively, you can pass in a list of Extensions and cythonize() will process that and replace .pyx files by the compiled .c files. That also makes it easier to build without having Cython installed, by simply replacing the .pyx files by .c yourself and passing the Extensions directly into setup(). And it allows for more complex Extension configurations that Cython doesn't have to care about. You might want to do something similar in your case. It gives users much more flexibility when using source code preprocessors and also avoids conflicts between packages like the one you describe above, or problems with future versions of distutils due to fragile build setups. Stefan -- http://mail.python.org/mailman/listinfo/python-list
Unwanted window spawns when using Tkinter with multiprocessing.
Hi everyone, I'm trying to use multiprocessing to avoid Python's GIL but with Tkinter, instead of running my main function, it spawns new windows. In fact, my fuction is used everytime I press a specified key, but with multiprocessing I only get a new window when I hit a key. Does anyone have a solution ? -- http://mail.python.org/mailman/listinfo/python-list
Re: Adding new source types to distutils?
On Sun, Apr 28, 2013 at 2:24 PM, Stefan Behnel stefan...@behnel.de wrote: That approach is discouraged for Cython. The compiler comes with a cythonize() function these days, which users can simply call from their setup.py scripts. It spits out a list of Extensions that you can pass into setup(). So, for example, you can say extensions = cythonize('mypackage/*.pyx') and it would do the right thing. You can also pass configuration options into cythonize() to influence the way Cython translates your code. Alternatively, you can pass in a list of Extensions and cythonize() will process that and replace .pyx files by the compiled .c files. That also makes it easier to build without having Cython installed, by simply replacing the .pyx files by .c yourself and passing the Extensions directly into setup(). And it allows for more complex Extension configurations that Cython doesn't have to care about. You might want to do something similar in your case. It gives users much more flexibility when using source code preprocessors and also avoids conflicts between packages like the one you describe above, or problems with future versions of distutils due to fragile build setups. I'm looking at the cythonize source code now. Isn't it weird to compile Cython source files if setup.py is executed for any reason, even if not to build the program? That doesn't seem like the Right Thing either. In fact, it was the first option I discarded. :/ -- Devin -- http://mail.python.org/mailman/listinfo/python-list
[JOB] Two opportunities at Decernis
Hi All, The company I work for, Decernis, has two job opportunities that might be of interest. Decernis provides global systems for regulatory compliance management of foods and consumer products to world leaders in each sector. The company has offices in Rockville, MD as well as Frankfurt, Germany. First, we are looking for a highly effective, full-time senior software engineer with experience in both development and client interaction. This position will work mostly in Java, but Python is most definitely an added plus. Second, we are looking for a highly motivated and self-reliant independent contractor to help us build customized RSS feeds, web crawlers and site monitors. This position is part-time and all programs will be written in Python. Experience in Plone will be an added benefit. Please see below for more information. Send resume and cover letter to Cynthia Gamboa, cgam...@decernis.com. Best Patrick Project Manager Decernis News Issue Management *Job Description: Full-Time Senior Software Engineer* We are looking for a highly effective senior software engineer with experience in both development and client interaction. Our company provides global systems for regulatory compliance management of foods and consumer products to world leaders in each sector. Our ideal candidate has the following experiences: · 5 or more years of Java/J2EE development experiences including Jboss/Tomcat and web applications and deployment; · 4 or more years of Oracle database development experience including Oracle 10g or later versions; · Strong Unix/Linux OS working experience; · Strong script language programming experience in Python and Perl; · Experience with rule-based expert systems; · Experience in Plone and other CMS a plus. Salary commensurate with experience. This position reports directly to the Director of System Development. *About Decernis* Decernis is a global information company that works with industry leaders and government agencies to meet complex regulatory compliance and risk management needs. We work closely with our clients to produce results that meet the high standards demanded in technically challenging areas to ensure comprehensive, current, and global solutions. Our team has the regulatory, scientific, data, and systems expertise to succeed with our clients and we are dedicated to results. Decernis has offices in Rockville, MD and Frankfurt, Germany. Re-locating to the Washington, DC area is a requirement of the position. Decernis is an equal opportunity employer and will not discriminate against any individual, employee, or application for employment on the basis of race, color, marital status, religion, age, sex, sexual orientation, national origin, handicap, or any other legally protected status recognized by federal, state or local law. ### *Job Description: Part Time Python Programmer* We are looking for a highly motivated and self-reliant independent contractor to help us build customized RSS feeds, web crawlers and site monitors. Our ideal candidate has experience working with data mining techniques as well as building web crawlers and scrapers. The candidate will be able to choose hours and work remotely, but must meet expected deadlines and be able to report progress effectively. In addition we are looking for someone who is able to think through the problem set and contribute their own solutions while balancing project goals and direction. The project will last approximately three months, but sufficient performance could lead to future work. This position reports directly to the Director of System Development. *Key Skills* · Data Mining Web Crawling (Required) · Python Development (Required) · Statistics · Task Oriented · Proficient English · Effective Communication *About Decernis* Decernis is a global information company that works with industry leaders and government agencies to meet complex regulatory compliance and risk management needs. We work closely with our clients to produce results that meet the high standards demanded in technically challenging areas to ensure comprehensive, current, and global solutions. Our team has the regulatory, scientific, data, and systems expertise to succeed with our clients and we are dedicated to results. Decernis has offices in Rockville, MD and Frankfurt, Germany. Re-locating to the Washington, DC area is not a requirement. Decernis is an equal opportunity employer and will not discriminate against any individual, employee, or application for employment on the basis of race, color, marital status, religion, age, sex, sexual orientation, national origin, handicap, or any other legally protected status recognized by federal, state or local law. ### -- http://mail.python.org/mailman/listinfo/python-list
Re: epiphany
Roy Smith於 2013年4月25日星期四UTC+8上午7時50分33秒寫道: I discovered something really neat today. We've got a system with a bunch of rules. Each rule is a method which returns True or False. At some point, we need to know if all the rules are True. Complicating things, not all the rules are implemented. Those that are not implemented raise NotImplementedError. We used to have some ugly logic which kept track of which rules were active and only evaluated those. So, here's the neat thing. It turns out that bool(NotImplemented) returns True. By changing the unimplemented rules from raising NotImplementedError to returning NotImplemented, the whole thing becomes: return all(r() for r in rules) Problems of rules in Boolean algebra or the bi-level logic inference engine in AI were all solved long time ago in the text book about AI. There are some variations about the multi-level or the continuous level logic engine with some new phases in Fuzzy theory in the expert system. A dynamical typed language is better to be used in this kind of problems. -- http://mail.python.org/mailman/listinfo/python-list
Re: Unwanted window spawns when using Tkinter with multiprocessing.
On 04/28/2013 02:33 PM, alternativ...@rocketmail.com wrote: Hi everyone, I'm trying to use multiprocessing to avoid Python's GIL but with Tkinter, instead of running my main function, it spawns new windows. In fact, my fuction is used everytime I press a specified key, but with multiprocessing I only get a new window when I hit a key. Does anyone have a solution ? If you can't post in clear English, then give us some other clues to compensate. Could you post some code, define some function names, and use fewer pronouns and indirection? for example: it spawns new windows -- What spawns new windows, exactly? -- DaveA -- http://mail.python.org/mailman/listinfo/python-list
Re: Unwanted window spawns when using Tkinter with multiprocessing.
Sorry for my bad english. Here's my code : def key(event): instance = 'Instance' touche = event.char instance = multiprocessing.Process(target=player, args=(hitkey,)) instance.start() def player(hitkey): winsound.PlaySound(hitkey + '.wav', winsound.SND_FILENAME|winsound.SND_NOWAIT|winsound.SND_ASYNC) 'key' is the tkinter function wich gets the pressed key. 'player' is the function playing a specific wav file depending on wich key is pressed, that's why its argument is 'hitkey'. It uses the winsound module. What spawns new windows is theorically the multiprocessing line of code, even if it's inside the 'key' function. -- http://mail.python.org/mailman/listinfo/python-list
Re: Unwanted window spawns when using Tkinter with multiprocessing.
On 04/28/2013 06:23 PM, alternativ...@rocketmail.com wrote: Sorry for my bad english. Here's my code : def key(event): instance = 'Instance' touche = event.char instance = multiprocessing.Process(target=player, args=(hitkey,)) instance.start() def player(hitkey): winsound.PlaySound(hitkey + '.wav', winsound.SND_FILENAME|winsound.SND_NOWAIT|winsound.SND_ASYNC) 'key' is the tkinter function wich gets the pressed key. 'player' is the function playing a specific wav file depending on wich key is pressed, that's why its argument is 'hitkey'. It uses the winsound module. What spawns new windows is theorically the multiprocessing line of code, even if it's inside the 'key' function. Do you have an if __name__ == __main__: clause in your main script? Are you bypassing the gui event loop on the secondary process? Otherwise, it's your code that's launching the extra window. And what OS are you running on? -- DaveA -- http://mail.python.org/mailman/listinfo/python-list
Re: Unwanted window spawns when using Tkinter with multiprocessing.
Well I saw this clause on most of the multiprocessing examples I saw but the reason it was here wasn't explained so I just ignored it (yeah stupid I know). I don't think I bypassed anything, at least not on purpose. I'm running on Windows 7 64 bits. -- http://mail.python.org/mailman/listinfo/python-list
Re: Unwanted window spawns when using Tkinter with multiprocessing.
On 04/28/2013 07:40 PM, alternativ...@rocketmail.com wrote: Well I saw this clause on most of the multiprocessing examples I saw but the reason it was here wasn't explained so I just ignored it (yeah stupid I know). I don't think I bypassed anything, Yes, you skipped the essential if clause. The child process is started with a different __name__. So if the __name__ is not __main__, then you should NOT call any of the GUI startup code. Probably you should do little or nothing in the top-level code of the child process. But we can't give specific advice without seeing what that code now looks like. What code do you have at top level, and if it calls functions, what do they look like? The way you get that code to be different in the child is with that if statement that you omitted. at least not on purpose. I'm running on Windows 7 64 bits. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
It works fine as long as you don't provide a null string ('') to os.execl(), such as: os.execl('filename.exe','') On Sunday, April 28, 2013 5:02:48 AM UTC-3, Fábio Santos wrote: Cannot reproduce on windows 7 ultimate Steps taken: Start cmd cd to Desktop where I have a GUI application run python on the console import os os.execl('exe.exe', 'exe.exe') python stops at this point and starts GUI application as expected On Sun, Apr 28, 2013 at 8:51 AM, Terry Jan Reedy tjre...@udel.edu wrote: On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: Is there the place to open a ticket for Python developers? bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list -- Fábio Santos -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
Thank you! On Sunday, April 28, 2013 4:51:03 AM UTC-3, Terry Jan Reedy wrote: On 4/27/2013 11:42 PM, cormog...@gmail.com wrote: Is there the place to open a ticket for Python developers? bugs.python.org -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
It isn't, but it doesn't matter because all executables I've tried cause the error, even ping.exe. Just try: os.execl('ping.exe', '') And it will cause the python.exe has stopped working error message. On Sunday, April 28, 2013 5:05:02 AM UTC-3, Fábio Santos wrote: Is this executable freely available, or something you can share? If you can send me that executable I can try to reproduce the bug with it. -- http://mail.python.org/mailman/listinfo/python-list
Re: Unwanted window spawns when using Tkinter with multiprocessing.
On Mon, Apr 29, 2013 at 9:40 AM, alternativ...@rocketmail.com wrote: Well I saw this clause on most of the multiprocessing examples I saw but the reason it was here wasn't explained so I just ignored it (yeah stupid I know). I don't think I bypassed anything, at least not on purpose. I'm running on Windows 7 64 bits. Using multiprocessing on Windows has some requirements: http://docs.python.org/2/library/multiprocessing.html#windows If you take care of those restrictions, you should be able to do this. As Dave pointed out, one of the requirements is for your module to be importable. ChrisA -- http://mail.python.org/mailman/listinfo/python-list
[issue17858] Different documentation for identical methods
Georg Brandl added the comment: This patch includes changes from #17851, please remove that (but you can remove the comma after block). -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17858 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17852] Built-in module _io can loose data from buffered files at exit
Charles-François Natali added the comment: It used to be a consistently reliable behavior in Python 2 (and we made it so in PyPy too), provided of course that the process exits normally; but it no longer is in Python 3. Well I can see the reasons for not flushing files, if it's clearly documented somewhere as a change of behavior from Python 2. When you say Python 2, I assume you mean CPython 2, right? Because - AFAICT - files got flushed only by accident, not by design. For example, I suspect that Jython doesn't flush files on exit (since the JVM doesn't), and I guess IronPython neither. However I'm complaining about the current behavior: files are flushed *most of the time*. That's the problem with implementation-defined behavior ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17838] Can't assign a different value for sys.stdin in IDLE
Roger Serwy added the comment: I agree with Serhiy that the patch should be updated to better explain why the extra reference to stdin was being held. The attached patch provides that update in case anyone considers applying it in the future. Terry, are you suggesting that the code should read like sys.__stdin__ = sys.stdin within MyHandler in Lib/idlelib/run.py ? -- Added file: http://bugs.python.org/file30042/hold_stdin_rev1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17859] improve error message for saving ints to file
New submission from anatoly techtonik: I needed to write some bytes to file and got this message. hex = open('hex', 'wb') for x in range(0, 0xff, 0x11): ... hex.write(x) ... Traceback (most recent call last): File stdin, line 2, in module TypeError: 'int' does not support the buffer interface The cause of the error is not that 'int' doesn't support some interface (which is strange already, because the function analyzes and writes int, not the int writes itself), but because it is impossible to know how many binary bytes the int type should take when written. In Python 2 the solution is: ... hex.write(chr(x)) But in Python 3 this is again: TypeError: 'str' does not support the buffer interface In Python 3 the solution is: ... hex.write(x.to_bytes(1, 'little')) -- messages: 187968 nosy: techtonik priority: normal severity: normal status: open title: improve error message for saving ints to file versions: Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17859 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17806] Add keyword args support to str/bytes.expandtabs()
Ezio Melotti added the comment: Without patch: $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et()' 100 loops, best of 3: 0.672 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et(4)' 100 loops, best of 3: 0.744 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et(8)' 100 loops, best of 3: 0.762 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et()' 100 loops, best of 3: 0.658 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et(4)' 100 loops, best of 3: 0.73 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et(8)' 100 loops, best of 3: 0.769 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et(tabsize=4)' 100 loops, best of 3: 1.84 usec per loop $ ./python -m timeit -s 'et = a\tb\tc\td\te.expandtabs' 'et(tabsize=8)' 100 loops, best of 3: 1.89 usec per loop If tabsize is not used the performances seem the same, if it's used it's 2-3 times slower. I don't think expandtabs is used in performance-critical paths, but if it is the patch shouldn't affect it as long as people don't add tabsize to the call. FTR the reason to add this is consistency (Python functions allow you to pass positional args as keywords too) and readability (s.expandtabs(3) might be read as expand at most 3 tabs or something else). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17859] improve error message for saving ints to file
Ezio Melotti added the comment: Maybe the error could be replaced with something like: TypeError: write() requires an object that supports the buffer interface, not 'type' But that's a bit long and also not entirely accurate, because the type accepted by write depends on the type of the file (binary or text). The first problem could be solved by using requires a bytes-like object[0], the second problem could be fixed by omitting the name of the function: TypeError: a bytes-like object is required, not 'type' [0]: #16518 has a discussion about the best term to describe objects that support the buffer protocol -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17859 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Marc-Andre Lemburg added the comment: On 28.04.2013 05:20, Ned Deily wrote: Ned Deily added the comment: Marc-Andre, can you elaborate on why you think Python 3 is not affected? The changes for Issue17073 also added sqlite3_int64 to 3.2, 3.3, and default and, for me on 10.4, _sqlite3.so currently fails to build in all three. (I don't think 3.2 is worth worrying about but if Georg does spin a brown bag 3.2.5 he could cherry pick it.) Oh, I just did a grep on the Python 3.3.0 code base and couldn't find any hits. Was the issue you mentioned applied to the 3.3.1 dot release ? If so, then those new mentions will have to be fixed as well, of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16518] add buffer protocol to glossary
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17825] Indentation.offset and SyntaxError.offset mismatch
Changes by Florent Xicluna florent.xicl...@gmail.com: -- components: +Interpreter Core, Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17825 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Serhiy Storchaka added the comment: Patch for issue14572 was applied only to 2.7 and then I backported the bug back from 3.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17838] Can't assign a different value for sys.stdin in IDLE
Serhiy Storchaka added the comment: Last patch LGTM. With keeping a reference in sys.__stdin__ we will encounter same issue. sys.stdin = None sys.__stdin__ = None # close! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Roundup Robot added the comment: New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/44fe1f5b07e3 New changeset b677f656c0bf by Serhiy Storchaka in branch '3.3': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/b677f656c0bf New changeset 19015fc0c338 by Serhiy Storchaka in branch 'default': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/19015fc0c338 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14572] 2.7.3: sqlite module does not build on centos 5 and Mac OS X 10.4
Roundup Robot added the comment: New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/44fe1f5b07e3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17073] Integer overflow in sqlite module
Roundup Robot added the comment: New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/44fe1f5b07e3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17842] Add base64 module tests for a bytearray argument
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Changes by Benjamin Peterson benja...@python.org: -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17842] Add base64 module tests for a bytearray argument
Roundup Robot added the comment: New changeset 6e57d097ae56 by Serhiy Storchaka in branch '2.7': Issue #17842. Added base64 module tests with bytearray arguments. http://hg.python.org/cpython/rev/6e57d097ae56 New changeset 44edbea21640 by Serhiy Storchaka in branch '3.3': Issue #17842. Added base64 module tests with bytearray arguments. http://hg.python.org/cpython/rev/44edbea21640 New changeset f7f6c2ea4b14 by Serhiy Storchaka in branch 'default': Issue #17842. Added base64 module tests with bytearray arguments. http://hg.python.org/cpython/rev/f7f6c2ea4b14 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17659] no way to determine First weekday (based on locale)
R. David Murray added the comment: Thanks for the patch. We'll be interested in the results of your research, certainly. Windows support would also be a question we'd probably want to consider before deciding whether or not to add this. I've added MAL as nosy since I suspect he'll have thoughts about the API, as well as the appropriateness of the feature. -- nosy: +lemburg stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12220] minidom xmlns not handling spaces in xmlns attribute value field
R. David Murray added the comment: Thanks for the patch. It would be nice to have a test before we commit this. The tests should use assertRaisesRegex to look for something specific to this error...probably the word 'syntax'...in the error text. On the other hand, if the spaces are technically legal, is calling it a syntax error appropriate? Perhaps the message should instead say something like spaces in URIs is not supported? -- nosy: +r.david.murray versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12220 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1727418] xmlrpclib waits indefinately
R. David Murray added the comment: Thanks for verifying this, Adam. -- nosy: +r.david.murray resolution: - out of date stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1727418 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17724] urllib -- add_handler method refactoring for clarity
R. David Murray added the comment: I presume you closed this bug yourself because you decided it probably wasn't worth applying it? I'm inclined to agree. Cleaning up the code would be nice, but since the existing code works fine, changing it *just* to clean it up probably isn't worth the code churn or the chance of introducing an unexpected new bug. If we were also fixing a bug while doing the rewrite, it would be a different story. So I'll try to keep this patch in mind if we have occasion to fix anything in that code. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17860] subprocess docs lack info how to use output result
New submission from anatoly techtonik: http://docs.python.org/3/library/subprocess.html A common confusion is that result from subprocess calls in Python 3 is bytes, not string, and needs to be converted. The problem is complicated because you need to know the encoding of input/output streams. This should be documented at least. http://stackoverflow.com/questions/606191/convert-byte-array-to-python-string -- assignee: docs@python components: Documentation messages: 187982 nosy: docs@python, techtonik priority: normal severity: normal status: open title: subprocess docs lack info how to use output result versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17860] subprocess docs lack info how to use output result
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, haypo stage: - needs patch type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Benjamin Peterson added the comment: Nick, care to review? -- keywords: +patch Added file: http://bugs.python.org/file30043/classderef.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17839] base64 module should use memoryview
Serhiy Storchaka added the comment: Here is a patch which allows bytes-like arguments in the base64 module. I just removed type checking if underlying function raises an exception with an appropriate message. I'm not sure about b32encode(), perhaps we can left an exception from memoryview(). -- Added file: http://bugs.python.org/file30044/base64_buffer_input.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17842] Add base64 module tests for a bytearray argument
Serhiy Storchaka added the comment: Committed. Thank you for the patch. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
New submission from Benjamin Peterson: Right now, opcode information is duplicated in Include/opcode.h and Lib/opcode.py. I should only have to update one manually and have the other one generated automatically. opcode.h should probably be generated by a script from opcode.py. -- components: Interpreter Core keywords: easy messages: 187986 nosy: benjamin.peterson priority: normal severity: normal stage: needs patch status: open title: put opcode information in one place type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7152] urllib2.build_opener() skips ProxyHandler
Roundup Robot added the comment: New changeset f2472fb98457 by R David Murray in branch '3.3': #7152: Clarify that ProxyHandler is added only if proxy settings are detected. http://hg.python.org/cpython/rev/f2472fb98457 New changeset aca80409ecdd by R David Murray in branch 'default': Merge #7152: Clarify that ProxyHandler is added only if proxy settings are detected. http://hg.python.org/cpython/rev/aca80409ecdd New changeset 27999a389742 by R David Murray in branch '2.7': #7152: Clarify that ProxyHandler is added only if proxy settings are detected. http://hg.python.org/cpython/rev/27999a389742 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Ethan Furman added the comment: Thanks, Benjamin. Looking at that patch I realize the fix was way beyond my current core-hacking skills. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17358] imp.load_module() leads to the improper caching of the 'file' argument
Roundup Robot added the comment: New changeset 3dcc81c2eef5 by Brett Cannon in branch '3.3': Issue #17358: imp.load_source() and load_compiled() should now return http://hg.python.org/cpython/rev/3dcc81c2eef5 New changeset be6bbc9f0561 by Brett Cannon in branch 'default': merge for issue #17358 http://hg.python.org/cpython/rev/be6bbc9f0561 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17358 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17358] imp.load_module() leads to the improper caching of the 'file' argument
Brett Cannon added the comment: I figured out why testing was difficult; the file is only read from if it's necessary. That means if you are trying to load source which has bytecode available which is legitimate it will simply skip over the source and read from the bytecode. So in the end I just fixed it without a test since it's for a marginal case for a deprecated module. Plus the fix is rather simple and still passed the test suite. -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17358 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17659] no way to determine First weekday (based on locale)
Éric Araujo added the comment: If I read the patch correctly, the code can return 0 if Monday is the first weekday as indicated by glibc, or as a fallback. I think there should be a difference. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12220] minidom xmlns not handling spaces in xmlns attribute value field
Terry J. Reedy added the comment: 'unsupported syntax' would be more accurate, but I agree that saying what it is that is unsupported is even better. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12220 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7152] urllib2.build_opener() skips ProxyHandler
Éric Araujo added the comment: Patch adds a mention of DataHandler, that code doesn’t have yet. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17859] improve error message for saving ints to file
Éric Araujo added the comment: I don’t understand that the first message says. If one wants to call the write method of a file object opened in binary mode, one needs to pass bytes, as the doc surely explains. The same error that is seen here with ints would be seen with any other objects. A more practical way is to use print (with its file, sep and end parameters) which will do the conversion for you. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17859 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17862] itertools.chunks(iterable, size, fill=None)
New submission from anatoly techtonik: The history: 2007 - http://bugs.python.org/issue1502 2009 - http://bugs.python.org/issue6021 I'd like to resurrect this proposal again, but name it: itertools.chunks(iterable, size, fill=None) Two reasons. 1. practicality - top itertools request on StackOverflow http://stackoverflow.com/search?tab=votesq=%5bpython%5d%20%2bitertools 2. performance the time should be a constant for a fixed-length iterable regardless of a size of chunk, but in fact the time is proportional to the size of chunk {{{ import timeit print timeit.timeit( 'grouper(3, x*40)', setup='from __main__ import grouper', number=1000 ) print timeit.timeit( 'grouper(30, x*40)', setup='from __main__ import grouper', number=1000 ) }}} 1.52581005407 14.6219704599 Addressing odd length user stories from msg87745: 1. no exceptions - odd end is an easy check if you need it 2. fill-in value - provided 3. truncation - just don't set fill-in value 3.1. if you really need fill-in as None, then an itertools.TRUNCATE value can be used as a truncation parameter 4. partially filled-in tuple - not sure what that means Raymond, your opinion is critical here. =) -- components: Library (Lib) messages: 187995 nosy: rhettinger, techtonik priority: normal severity: normal status: open title: itertools.chunks(iterable, size, fill=None) versions: Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17862 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17860] subprocess docs lack info how to use output result
Andrew Svetlov added the comment: Actually stdin/stdout/stderr are string streams if universal_newline is True -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Mark Dickinson added the comment: What's the purpose of the CLASS_FREE #definition? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
Kushal Das added the comment: Here is a simple script which prints the opcode.h in console. We can redirect it as required. -- nosy: +kushaldas Added file: http://bugs.python.org/file30045/generate_opcode_h.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings
Roundup Robot added the comment: New changeset b7bfedc8ee18 by Nadeem Vawda in branch '2.7': Issue #17843: Remove bz2 test data that triggers antivirus warnings. http://hg.python.org/cpython/rev/b7bfedc8ee18 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
Kushal Das added the comment: Second version of the script with the fix for HAVE_ARGUMENT -- Added file: http://bugs.python.org/file30046/generate_opcode_h.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements
Terry J. Reedy added the comment: With PEP343 accepted, we can apply changes more uniformly. I think each of the changes listed should be separate issues with separate review, as most already are (msg149930). Run a script without saving it first. I am sure this has been mentioned on at least 1 other issue, but I cannot find an issue devoted to this. The PseudoStderrFile in PyShell.py brings the shell forward if an error occurs. The PseudoFiles were updated last fall. Has this behavior been added? -- nosy: +terry.reedy versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings
Christian Heimes added the comment: Yes, you are right. Python 3.3.1 doesn't contain the file in question, just 2.7.4 and 3.2.4. Could you update Misc/NEWS, too? The release notes should mention that a false positive virus warning was removed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings
Roundup Robot added the comment: New changeset 529c4defbfd7 by Nadeem Vawda in branch '2.7': Add missing NEWS entry for issue #17843. http://hg.python.org/cpython/rev/529c4defbfd7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17858] Different documentation for identical methods
Andriy Mysyk added the comment: Apologies. I did not mean to include 17851 changes. Removed the changes, leaving out the comma after block in the attached patch. -- Added file: http://bugs.python.org/file30047/issue17858.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17858 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17861] put opcode information in one place
Kushal Das added the comment: Third revision with fixed empty spaces at the end of the lines. -- Added file: http://bugs.python.org/file30048/generate_opcode_h.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17863] Bad sys.stdin assignment hands interpreter.
New submission from Terry J. Reedy: This appears to be Python 3 specific. On 2.7.4 (Win7): import sys sys.stdin='abd' With fresh 3.4 repository debug build, prompt never appears, ^C, ^D are ignored. Must close with window's [X] button. With fresh 3.3, get repeated [62312 refs] lines. One could guess that they are generated but suppressed in 3.4. There is a possibility that this is specific to debug builds; I cannot currently build or run one for 2.7. However, there is no problem with Idle running (on Windows) with 3.3/3.4 pythonw-d. (In other words, see same behavior as 2.7 above.) -- messages: 188006 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Bad sys.stdin assignment hands interpreter. type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17863 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings
Nadeem Vawda added the comment: OK, 2.7 is done. Georg, what do we want to do for 3.2? I've attached a patch. -- assignee: nadeem.vawda - georg.brandl keywords: +patch Added file: http://bugs.python.org/file30049/bz2-viruswarning.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17853] Conflict between lexical scoping and name injection in __prepare__
Benjamin Peterson added the comment: That's superflous. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17838] Can't assign a different value for sys.stdin in IDLE
Terry J. Reedy added the comment: Roger: yes. This solves immediate problem and makes Idle more like console interpreter. Same should be done for all three. Serhiy: the sole and documented purpose of sys.__stdxyz__ is to serve as backup bindings for the three i/o streams, so rebinding them is senseless. I would be willing to say 'you get what you deserve if you do that'. But since console tolerates double rebinding, we can make Idle do so too. Again, same should be done for all three streams. See attached patch. It seems to work, but someone please recheck for typos. Are we sure that binding streams to handler object cannot cause problems, such as during shutdown with atexit handlers? -- Added file: http://bugs.python.org/file30050/Terry17838.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17642] IDLE add font resizing hot keys
Alejandro Rodas added the comment: I have made a patch to zoom in and out with Control-plus and Control-minus events, respectively. I'll upload it soon since the test suite is giving me an error in test_multiprocessing, even before writing the patch. I have taken a look at ZoomFont.py of IdleX and it also has the option to reset the font size to its original value, but I don't know if this feature was wanted to be added too. However, ZoomFont controls the size of the LineNumber extension, while this patch only changes the font of the editview's text widget. -- nosy: +alex.rodas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17642 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17864] IDLE won't run
New submission from Ben Read: I am installing Python 3.31 on a Mac running OS 10.8.2 and have already installed ActiveTCL 8.5.13. When I try and launch IDLE, the icon appears on the dock for a second and then disappears and the application doesn't run. I have already installed both Python and Active TCL in the same way on two other Macs and it has run just fine, so I don't know why it's not running on this one. Is there anything specific that would cause this to happen? Thanks, Ben -- components: IDLE messages: 188011 nosy: Bozdog priority: normal severity: normal status: open title: IDLE won't run type: crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Ned Deily added the comment: Fix verified on OS X 10.4 for 2.7, 3.3, and default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17864] IDLE won't run
Ned Deily added the comment: How are you trying to launch IDLE? Also, use the Console.app (in /Applications/Utilites) to examine system.log to see if there are any error messages produced there when you attempt to launch IDLE. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1722] Undocumented urllib functions
Nathan Housel added the comment: This has been fixed in trunk, the split* methods have documentation and appear in the module docs. See: help('urllib') -- nosy: +plasticgap ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings
Georg Brandl added the comment: Thanks, I've got it from here. -- versions: -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15535] Fix pickling efficiency of named tuples in 2.7.3
Changes by Georg Brandl ge...@python.org: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17860] subprocess docs lack info how to use output result
anatoly techtonik added the comment: Actually stdin/stdout/stderr are string streams if universal_newline is True I believe that makes the issue even worse. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17547] checking whether gcc supports ParseTuple __format__... erroneously returns yes with gcc 4.8
Changes by Georg Brandl ge...@python.org: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17547 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17192] libffi-3.0.13 import
Georg Brandl added the comment: Greg? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17123] Add OCSP support to ssl module
Changes by Georg Brandl ge...@python.org: -- versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17425] Update OpenSSL versions in Windows builds
Changes by Georg Brandl ge...@python.org: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17864] IDLE won't run
Ben Read added the comment: Hi there, I'm launching IDLE from Applications in Finder (double clicking the application file). I've tried doing this while Console is open and the response is: 28/04/2013 21:17:19.271 Dock[167]: no information back from LS about running process Thanks, Ben On 28 Apr 2013, at 20:04, Ned Deily rep...@bugs.python.org wrote: Ned Deily added the comment: How are you trying to launch IDLE? Also, use the Console.app (in /Applications/Utilites) to examine system.log to see if there are any error messages produced there when you attempt to launch IDLE. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17642] IDLE add font resizing hot keys
Abhishek Kumar added the comment: I have submitted a patch that is working fine on Windows and on Ubuntu. I have used ZoomFont.py of IdleX. On pressing Ctrl+ or Ctrl- it changes the user configuration and updates the font of all open windows as there is a common user configuration for all windows. I have removed polling from CodeContext instead I set font of CodeContext on every font change. As this is my first patch. Please review it and give your valuable feedback. -- keywords: +patch nosy: +Abhishek.Kumar Added file: http://bugs.python.org/file30051/issue17642_patch2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17642 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17425] Update OpenSSL versions in Windows builds
Martin v. Löwis added the comment: Please don't reopen issues. If there is a bug in the current setup, please submit a new reporting indicating what the problem is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17864] IDLE won't run
Ned Deily added the comment: OK, assuming you are using a default install of Python 3.3.1, try opening a terminal window (Terminal.app) and launching IDLE from there by typing: /usr/local/bin/python3.3 -c 'import sys;print(sys.version)' /usr/local/bin/python3.3 -m idlelib and report what messages you see there. Also, are there any other messages with com.apple.launchd.peruser or org.python.IDLE immediately before that one? You can use Console.app to see if there are any relevant crash reports under User Diagnostic Reports. You could use Activity Monitor.app to see if there is already an IDLE or Python process running. If you can, try logging -out and -in and/or rebooting. And which Python 3.3.1 did you install: from the python.org 3.3.1 64-bit/32-bit installer, from the python.org 3.3.1 32-bit-only installer, or from somewhere else? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7152] urllib2.build_opener() skips ProxyHandler
R. David Murray added the comment: Thanks, Jessica. I reworded it slightly, since the proxy setting can come from things other than environment variables on Windows and OSX. Also found one other place it needed to be mentioned, and fixed up the punctuation on one of the pre-existing sentences. And thanks for the catch on DataHandler, Éric. -- nosy: +r.david.murray resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple
Claudiu.Popa added the comment: I've modified the patch according to your comments, thanks! Now the result of getparams() is picklable again. -- Added file: http://bugs.python.org/file30052/aifc_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17818 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7152] urllib2.build_opener() skips ProxyHandler
Roundup Robot added the comment: New changeset 5da7bb478dd9 by R David Murray in branch '2.7': #7152: Remove incorrectly added reference to DataHandler. http://hg.python.org/cpython/rev/5da7bb478dd9 New changeset 122d42d5268e by R David Murray in branch '3.3': #7152: Remove incorrectly added reference to DataHandler. http://hg.python.org/cpython/rev/122d42d5268e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17860] subprocess docs lack info how to use output result
R. David Murray added the comment: Anatoly, do you have a specific suggestion for improved wording? This *is* documented in the subprocess documentation, in several appropriate places, including the fact that the appropriate encoding to use may need to be determined at the application level. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17863] Bad sys.stdin assignment hands interpreter.
R. David Murray added the comment: Indeed, in both 3.3.0 non-debug and 3.4 tip debug, python starts consuming 100% of the CPU. I'm guessing there is some subtlety involving the new IO system involved here. Python 2.7 debug build acts as you indicate for your 2.7 non-debug build. All my tests are on linux, and I had to kill -HUP the python process. As you say, ctl-C (and ctl-D, not surprisingly) were ignored. -- nosy: +pitrou, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17863 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17859] improve error message for saving ints to file
R. David Murray added the comment: Éric, print doesn't help if one is writing binary data. What do you mean by not understanding the first message? If you are agreeing that the first error message in Anatoly's initial post isn't clear, does Ezio's proposed change make it clearer? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17859 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17864] IDLE won't run
Ben Read added the comment: In response to the first command: 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 11:07:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] …and the second command: Warning: unable to create user config directory /Users/ben/.idlerc Check path and permissions. Exiting! I've checked console and activity monitor and cannot see any further reference to IDLE. The message I sent previously was the only one shown in 'All Messages' after a marker I added to know where to start from. I downloaded Python 3.31 from the official site and selected the 64bit version. I ran the ActiveTCL 8.5.13 download first. Thanks, Ben On 28 Apr 2013, at 21:59, Ned Deily rep...@bugs.python.org wrote: Ned Deily added the comment: OK, assuming you are using a default install of Python 3.3.1, try opening a terminal window (Terminal.app) and launching IDLE from there by typing: /usr/local/bin/python3.3 -c 'import sys;print(sys.version)' /usr/local/bin/python3.3 -m idlelib and report what messages you see there. Also, are there any other messages with com.apple.launchd.peruser or org.python.IDLE immediately before that one? You can use Console.app to see if there are any relevant crash reports under User Diagnostic Reports. You could use Activity Monitor.app to see if there is already an IDLE or Python process running. If you can, try logging -out and -in and/or rebooting. And which Python 3.3.1 did you install: from the python.org 3.3.1 64-bit/32-bit installer, from the python.org 3.3.1 32-bit-only installer, or from somewhere else? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17864] IDLE won't run
Ned Deily added the comment: That's really odd. It looks you have a permissions problem with your home directory. On startup, IDLE attempts to create the directory .idlerc in your home directory, /Users/ben, if it doesn't exist already. If for some reason the directory creation fails, IDLE aborts. Interestingly, if the directory exists but IDLE lacks write permission to create files in it, it does not abort but posts a warning message in a window. Perhaps it could be a little more consistent about that. But still, this appears to be avery unusual situation. I can't think of any reason why IDLE would be unable to create a directory unless you have some security system installed or some unusual access control list setting. The most likely reason is just a plain old permission problem on your home directory. Try this in a terminal session: cd ~ ls -lde ~ You should see something similar to this: drwxr-xr-x+ 38 nad staff 2992 Apr 28 15:26 /Users/nad/ 0: group:everyone deny delete if the permissions string is missing the w (dr-xr-x), that means you do not have write permission to your home directory and can't create new directories there. In that case, mkdir ~/.idlerc should fail. (This is essentially what IDLE is trying to do.) If you are missing write permission on your home directory, you *should* be able to fix it by doing: chmod u+w ~ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17642] IDLE add font resizing hot keys
Alejandro Rodas added the comment: I have uploaded my patch as well, it doesn't make use of tkfont (just vanilla Tkinter methods) and it works both in Python 2.7 and 3.4 without the need of any import. I think the main difference with Abhishek Kumar's version is that mine does not use idleConf to retrieve and set the font size. However, the original ZoomFont.py of IdleX does not use it. Is it really necessary? -- Added file: http://bugs.python.org/file30053/ZoomInOut.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17642 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17642] IDLE add font resizing hot keys
Changes by Alejandro Rodas alexrd...@gmail.com: Removed file: http://bugs.python.org/file30053/ZoomInOut.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17642 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com