Re: how to read list from file

2013-10-06 Thread Terry Reedy
On 10/5/2013 9:08 PM, Harvey Greenberg wrote: I am looping as for L in file.readlines(), where file is csv. I believe 'for L in file:' does the same, more efficiently, even in 2.7. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Dan Sommers
On Sun, 06 Oct 2013 12:19:13 +1100, Chris Angelico wrote: On Sun, Oct 6, 2013 at 12:05 PM, Ben Finney wrote: [ ... ] With a separately-installed, far more complex database engine like MySQL or PostgreSQL, the Python bindings will only work if they are compiled against the correct client

Re: Variable arguments (*args, **kwargs): seeking elegance

2013-10-06 Thread Peter Otten
John Ladasky wrote: Hi folks, I'm trying to make some of Python class definitions behave like the ones I find in professional packages, such as Matplotlib. A Matplotlib class can often have a very large number of arguments -- some of which may be optional, some of which will assume

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread galeomaga
I can start thread and no exception error print, and I do not know how to use tail in python script I need to cope with MySQL in python later as all file path stored in it, it is to monitor all text files -- https://mail.python.org/mailman/listinfo/python-list

Re: Database statements via python but database left intact

2013-10-06 Thread Chris “Kwpolska” Warrick
On Sun, Oct 6, 2013 at 12:51 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder n...@nedbatchelder.com wrote: Now is a good time to go read about transactions, and committing, and the difference between MyISAM and InnoDB. Please don't ask more about it

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Chris “Kwpolska” Warrick
Reposting what I said in the other thread: On Sun, Oct 6, 2013 at 12:51 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder n...@nedbatchelder.com wrote: Now is a good time to go read about transactions, and committing, and the difference between MyISAM

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread Mark Lawrence
On 06/10/2013 05:06, Steven D'Aprano wrote: On Sat, 05 Oct 2013 20:17:32 -0700, galeomaga wrote: if __name__ == '__main__': try: thread.start_new_thread( readfile, (Thread-1, ) ) except: print Error: unable to start thread Why not? If you

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread Chris Angelico
On Sun, Oct 6, 2013 at 9:36 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Also note that a bare except is extremely bad practice, e.g. you can't stop rogue programs with a CTRL-C Or to be more accurate, a Ctrl-C will cause a jump to your except clause. Since, in this instance, that's going

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread Mark Lawrence
On 06/10/2013 12:03, Chris Angelico wrote: On Sun, Oct 6, 2013 at 9:36 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Also note that a bare except is extremely bad practice, e.g. you can't stop rogue programs with a CTRL-C Or to be more accurate, a Ctrl-C will cause a jump to your except

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread Chris Angelico
On Sun, Oct 6, 2013 at 10:13 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Good point, but at least this time I typed rogue correctly, unlike on the tutor mailing list :) Obligatory TVTropes link. http://tvtropes.org/pmwiki/pmwiki.php/Main/RougeAnglesOfSatin ChrisA --

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread Mark Lawrence
On 06/10/2013 12:15, Chris Angelico wrote: On Sun, Oct 6, 2013 at 10:13 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Good point, but at least this time I typed rogue correctly, unlike on the tutor mailing list :) Obligatory TVTropes link.

Re: Database statements via python but database left intact

2013-10-06 Thread rusi
On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick wrote: So, instead of this, maybe we should work on getting psycopg2 to the top result on Googling “python sql”, or even “python mysql” with an anti-MySQL ad? (like vim was doing some time ago on Googling “emacs”) Do you

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread Chris Angelico
On Sun, Oct 6, 2013 at 10:31 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: awful How do I know that you're not trying to send me to a rouge site? /awful I assure you, the background color is most distinctly white. They probably contract with Google for their white pixel supply:

Re: Database statements via python but database left intact

2013-10-06 Thread Chris “Kwpolska” Warrick
On Sun, Oct 6, 2013 at 1:36 PM, rusi rustompm...@gmail.com wrote: On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick wrote: So, instead of this, maybe we should work on getting psycopg2 to the top result on Googling “python sql”, or even “python mysql” with an

Odd-length string

2013-10-06 Thread markotaht
print(Key- + str(võti) + : + str(unhexlify(.join(tulemus IM getting this error on this line. This is the print line of a decryption program. I wanti it to convert the tulemus which is in HEX to ASCII so i could read it. I could use online translators for the line, but since i have 255

Re: class implementation

2013-10-06 Thread markotaht
There is this class file, it has its functions and variables. Now im greating my program, that uses the funcions from the class. BUt there are some functions missing from the class. So i want to add some extra funtions to the class, whidout altering the original source code, but by extending it

Re: Image manipulation

2013-10-06 Thread markotaht
Image consists of pixels. Each pixel has its RGBA values. In python whidout any extra downloadable modules, is there a way to get those values. I know PIG has it but i hav Python 3.3.2 so PIG wont do. In java under swingx there is a command called .getRGB() and whit some manipulation to that

Re: Image manipulation

2013-10-06 Thread Chris “Kwpolska” Warrick
On Sun, Oct 6, 2013 at 3:19 PM, markot...@gmail.com wrote: Image consists of pixels. Each pixel has its RGBA values. In python whidout any extra downloadable modules, is there a way to get those values. I know PIG has it but i hav Python 3.3.2 so PIG wont do. PIG? Did you mean PIL? In

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Chris Angelico
On Sun, Oct 6, 2013 at 8:10 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: It would require Postgres around people’s (or at least packagers’) systems, and it often gets messy when we have such requirements. I would hope that an absence of libpq could simply result in a courteous

Re: Odd-length string

2013-10-06 Thread Roy Smith
In article 0f1b6cd6-3025-4bdc-8f80-73a51a7ed...@googlegroups.com, markot...@gmail.com wrote: print(Key- + str(võti) + : + str(unhexlify(.join(tulemus IM getting this error on this line. This is the print line of a decryption program. I wanti it to convert the tulemus which is in HEX

Re: Database engine bindings for Python (was: Database statements via python but database left intact)

2013-10-06 Thread Roy Smith
In article mailman.781.1381066683.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: I would hope that an absence of libpq could simply result in a courteous exception when the module's imported, but maybe that'd be hard to implement. It works fine. I've had this in

Re: Odd-length string

2013-10-06 Thread Peter Otten
markot...@gmail.com wrote: print(Key- + str(võti) + : + str(unhexlify(.join(tulemus IM getting this error on this line. This is the print line of a decryption program. I wanti it to convert the tulemus which is in HEX to ASCII so i could read it. I could use online translators for the

Re: Odd-length string

2013-10-06 Thread markotaht
I fixed this problem but encountered new problem. Problem was that some parts that came throug my decryption were 00 or 0 the first symbol so the program didnt show them. NEw problem is : Traceback (most recent call last): File C:\Users\Marko\Desktop\hacker.org\XOR cypher.py, line 35, in

Re: Odd-length string

2013-10-06 Thread Mark Lawrence
On 06/10/2013 15:37, markot...@gmail.com wrote: I fixed this problem but encountered new problem. Problem was that some parts that came throug my decryption were 00 or 0 the first symbol so the program didnt show them. NEw problem is : Traceback (most recent call last): File

Re: Select fails when cookie tried to get a numeric value

2013-10-06 Thread Denis McMahon
On Sun, 06 Oct 2013 08:20:35 +0300, Νίκος Αλεξόπουλος wrote: Thank you Denis, i didn't knew about sessions up until i saw you post. Your code is very advanced for me to read but i will try to decode it I though that if we want to read something from our visitor, something we want, we have to

Re: Database statements via python but database left intact

2013-10-06 Thread Zero Piraeus
: On Sun, Oct 06, 2013 at 12:02:14AM +0300, Νίκος Αλεξόπουλος wrote: I neved had though of than an engine type could make so much mess. MyISAM is the way to go then for my web development? Why InnoDB failed to execute the queries? Because you didn't commit. MyISAM doesn't support

Re: Database statements via python but database left intact

2013-10-06 Thread Adam Tauno Williams
I neved had though of than an engine type could make so much mess. Because your app and how it is written is broken. MyISAM is the way to go then for my web development? Why InnoDB failed to execute the queries? No, nothing failed. Your app is broken. You are depending on auto commit - and

Re: Database statements via python but database left intact

2013-10-06 Thread Νίκος Αλεξόπουλος
Στις 6/10/2013 12:45 πμ, ο/η Zero Piraeus έγραψε: : On Sun, Oct 06, 2013 at 12:02:14AM +0300, Νίκος Αλεξόπουλος wrote: I neved had though of than an engine type could make so much mess. MyISAM is the way to go then for my web development? Why InnoDB failed to execute the queries? Because you

Re: Database statements via python but database left intact

2013-10-06 Thread Adam Tauno Williams
Are you sure that you're committing your changes (either by having autocommit set or using an explicit con.commit() call)? http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/ I dont think that is the issue, because up until now i never used commit and all transaction were

Re: how to read list from file

2013-10-06 Thread Harvey Greenberg
On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote: On 2013-10-05 18:08, Harvey Greenberg wrote: I am looping as for L in file.readlines(), where file is csv. L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first item is a dir and 2nd is a

Re: how to read list from file

2013-10-06 Thread Harvey Greenberg
On Sunday, October 6, 2013 10:41:33 AM UTC-6, Harvey Greenberg wrote: On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote: On 2013-10-05 18:08, Harvey Greenberg wrote: I am looping as for L in file.readlines(), where file is csv. L is a list of 3

Re: how to read list from file

2013-10-06 Thread Ravi Sahni
On Sun, Oct 6, 2013 at 10:11 PM, Harvey Greenberg hjgreenb...@gmail.com wrote: On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote: Python 2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. s =

Re: Database statements via python but database left intact

2013-10-06 Thread Νίκος Αλεξόπουλος
Στις 6/10/2013 6:52 μμ, ο/η Adam Tauno Williams έγραψε: Are you sure that you're committing your changes (either by having autocommit set or using an explicit con.commit() call)? http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/ I dont think that is the issue, because up until now i

Re: how to read list from file

2013-10-06 Thread Harvey Greenberg
On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote: I am looping as for L in file.readlines(), where file is csv. L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first item is a dir and 2nd is a list, so parsing with split doesn't work. Is

Re: how to read list from file

2013-10-06 Thread Mark Lawrence
On 06/10/2013 17:57, Harvey Greenberg wrote: On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote: I am looping as for L in file.readlines(), where file is csv. L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first item is a dir and 2nd is a list, so

Re: how to read list from file

2013-10-06 Thread Ravi Sahni
On Sun, Oct 6, 2013 at 10:27 PM, Harvey Greenberg hjgreenb...@gmail.com wrote: On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote: I am looping as for L in file.readlines(), where file is csv. L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first

Overriding of the type.__call__() method in a metaclass

2013-10-06 Thread Marco Buttu
Hi all, I have a question about class creation and the __call__ method. I have the following metaclass: class FooMeta(type): ... def __call__(metacls, name, bases, namespace): ... print(FooMeta.__call__()) From what I undestood, at the end of the class statement happens

Re: Overriding of the type.__call__() method in a metaclass

2013-10-06 Thread Peter Otten
Marco Buttu wrote: Hi all, I have a question about class creation and the __call__ method. I have the following metaclass: class FooMeta(type): ... def __call__(metacls, name, bases, namespace): ... print(FooMeta.__call__()) From what I undestood, at the end of the

HEX to ASCII

2013-10-06 Thread markotaht
problem is : Traceback (most recent call last): File C:\Users\Marko\Desktop\hacker.org\XOR cypher.py, line 35, in module print(Key- + str(võti) + : + str(.join(tulemus2))) TypeError: sequence item 0: expected str instance, bytes found If i take away the join command i get this:

Re: HEX to ASCII

2013-10-06 Thread Peter Otten
markot...@gmail.com wrote: problem is : Traceback (most recent call last): File C:\Users\Marko\Desktop\hacker.org\XOR cypher.py, line 35, in module print(Key- + str(võti) + : + str(.join(tulemus2))) TypeError: sequence item 0: expected str instance, bytes found If i take away

Re: HEX to ASCII

2013-10-06 Thread MRAB
On 06/10/2013 20:07, markot...@gmail.com wrote: problem is : Traceback (most recent call last): File C:\Users\Marko\Desktop\hacker.org\XOR cypher.py, line 35, in module print(Key- + str(võti) + : + str(.join(tulemus2))) TypeError: sequence item 0: expected str instance, bytes found

Re: Odd-length string

2013-10-06 Thread Terry Reedy
On 10/6/2013 10:37 AM, markot...@gmail.com wrote: NEw problem is : Traceback (most recent call last): File C:\Users\Marko\Desktop\hacker.org\XOR cypher.py, line 35, in module print(Key- + str(võti) + : + str(.join(tulemus2))) TypeError: sequence item 0: expected str instance, bytes

Re: class implementation

2013-10-06 Thread Terry Reedy
On 10/6/2013 9:15 AM, markot...@gmail.com wrote: There is this class file, it has its functions and variables. Now im greating my program, that uses the funcions from the class. BUt there are some functions missing from the class. So i want to add some extra funtions to the class, whidout

nginx config: different projects in different directories

2013-10-06 Thread Jabba Laci
Hi, I'm playing with Flask and I would like to try it in production environment too. I managed to bring Flask together with uwsgi and nginx. My Flask application is available at the address localhost:81 . I would like to add several applications and I want them to be available under different

Re: Variable arguments (*args, **kwargs): seeking elegance

2013-10-06 Thread Peter Cacioppi
On Saturday, October 5, 2013 9:04:25 PM UTC-7, John Ladasky wrote: Hi folks, I'm trying to make some of Python class definitions behave like the ones I find in professional packages, such as Matplotlib. A Matplotlib class can often have a very large number of arguments -- some of

Re: Database statements via python but database left intact

2013-10-06 Thread Piet van Oostrum
Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: i will use con.commit() from now and on because yesterdays i lost 3 hours trying to identify what was wrong with my MySQL statements in python and it turned out to be for no good reason. That shows how important it is to study the software that

Re: nginx config: different projects in different directories

2013-10-06 Thread Roy Smith
In article mailman.796.1381094733.18130.python-l...@python.org, Jabba Laci jabba.l...@gmail.com wrote: The problem is I can't figure out how to configure nginx for this. This is a python mailing list. You would do better asking nginx questions on an nginx mailing list. --

Strange extra f added to bytes object

2013-10-06 Thread Robert Jackson
I am very new to python so I'll apologize up front if this is some boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific equipment. I sometimes find the when I construct the bytes object to write it adds an extra f to the first byte. For

Re: Strange extra f added to bytes object

2013-10-06 Thread Peter Pearson
On Sun, 6 Oct 2013 18:47:38 -0400, Robert Jackson wrote: --089e0160b7be912b9e04e81a52b2 Content-Type: text/plain; charset=ISO-8859-1 I am very new to python [snip] Welcome. . . . I sometimes find the when I construct the bytes object to write it adds an extra f to the first byte. For

Re: Strange extra f added to bytes object

2013-10-06 Thread MRAB
On 06/10/2013 23:47, Robert Jackson wrote: I am very new to python so I'll apologize up front if this is some boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific equipment. I sometimes find the when I construct the bytes object to

Re: Strange extra f added to bytes object

2013-10-06 Thread Joel Goldstick
On Sun, Oct 6, 2013 at 8:32 PM, Peter Pearson ppearson@nowhere.invalid wrote: On Sun, 6 Oct 2013 18:47:38 -0400, Robert Jackson wrote: --089e0160b7be912b9e04e81a52b2 Content-Type: text/plain; charset=ISO-8859-1 I am very new to python [snip] Welcome. . . . I sometimes find the when I

Re: Strange extra f added to bytes object

2013-10-06 Thread Ned Batchelder
On 10/6/13 6:47 PM, Robert Jackson wrote: I am very new to python so I'll apologize up front if this is some boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific equipment. I sometimes find the when I construct the bytes object to

Re: Strange extra f added to bytes object

2013-10-06 Thread Ian Kelly
On Sun, Oct 6, 2013 at 6:39 PM, Joel Goldstick joel.goldst...@gmail.com wrote: f is the same as \x66; nothing has been changed. really? I would expect that \x66 = 0110 0110 and f = The f here is the ASCII character f, not the hex digit f: bin(ord(b'f')) '0b1100110' --

Re: Strange extra f added to bytes object

2013-10-06 Thread Terry Reedy
On 10/6/2013 6:47 PM, Robert Jackson wrote: I am very new to python so I'll apologize up front if this is some Welcome to a mostly great language. boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific equipment. I sometimes find the

Re: Strange extra f added to bytes object

2013-10-06 Thread Joel Goldstick
On Sun, Oct 6, 2013 at 8:38 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 06/10/2013 23:47, Robert Jackson wrote: I am very new to python so I'll apologize up front if this is some boneheaded thing. I am using python and pyserial to talk to an embedded pic processor in a piece of scientific

Re: Odd-length string

2013-10-06 Thread Piet van Oostrum
markot...@gmail.com writes: I fixed this problem but encountered new problem. Problem was that some parts that came throug my decryption were 00 or 0 the first symbol so the program didnt show them. NEw problem is : Traceback (most recent call last): File

Re: Strange extra f added to bytes object

2013-10-06 Thread Steven D'Aprano
On Sun, 06 Oct 2013 20:39:39 -0400, Ned Batchelder wrote: When Python displays a string, is uses A byte string. the ASCII character if it can, and a hex escape if it can't. When you use a hex value that is a valid ASCII character, it will display the character. Obviously for Python 2 that

Re: class implementation

2013-10-06 Thread Steven D'Aprano
On Sun, 06 Oct 2013 06:15:51 -0700, markotaht wrote: There is this class file, it has its functions and variables. What's a class file? Do you mean a file containing only a single class? Now im greating my program, that uses the funcions from the class. They are called methods. BUt

Re: HEX to ASCII

2013-10-06 Thread Piet van Oostrum
markot...@gmail.com writes: problem is : Traceback (most recent call last): File C:\Users\Marko\Desktop\hacker.org\XOR cypher.py, line 35, in module print(Key- + str(võti) + : + str(.join(tulemus2))) TypeError: sequence item 0: expected str instance, bytes found If i take

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread galeomaga
https://docs.google.com/file/d/0B2D69u2pweEvelh1T25ra19oZEU/edit?usp=sharing no matter call tail directly in python or using the script of tail all failed it seems it can not read next line -- https://mail.python.org/mailman/listinfo/python-list

Re: Select fails when cookie tried to get a numeric value

2013-10-06 Thread Piet van Oostrum
Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: i use 'cgi', but i noticed you used 'mod-wsgi'. I want to ask you why you chose the latter? Is the latter better than the former? Is it faster? Does it bahave the same way? I my code works works with cgi, which it does, will the same code

Re: Overriding of the type.__call__() method in a metaclass

2013-10-06 Thread Steven D'Aprano
On Sun, 06 Oct 2013 20:17:33 +0200, Marco Buttu wrote: Hi all, I have a question about class creation and the __call__ method. I have the following metaclass: class FooMeta(type): ... def __call__(metacls, name, bases, namespace): ...print(FooMeta.__call__()) At this point,

Re: Variable arguments (*args, **kwargs): seeking elegance

2013-10-06 Thread Steven D'Aprano
On Sat, 05 Oct 2013 21:04:25 -0700, John Ladasky wrote: Hi folks, I'm trying to make some of Python class definitions behave like the ones I find in professional packages, such as Matplotlib. A Matplotlib class can often have a very large number of arguments -- some of which may be

Re: Strange extra f added to bytes object

2013-10-06 Thread Robert Jackson
Thank you all. It was unfortunate that it was f since I thought it was some strange mistaken hex nibble. All very clear and helpful. On Sun, Oct 6, 2013 at 9:07 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 06 Oct 2013 20:39:39 -0400, Ned Batchelder wrote: When

Re: Overriding of the type.__call__() method in a metaclass

2013-10-06 Thread Marco Buttu
On 10/07/2013 04:27 AM, Steven D'Aprano wrote: On Sun, 06 Oct 2013 20:17:33 +0200, Marco Buttu wrote: class FooMeta(type): ... def __call__(metacls, name, bases, namespace): ...print(FooMeta.__call__()) ... From what I undestood, at the end of the class statement... def

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2013-10-06 Thread Martin Panter
New submission from Martin Panter: I am using the C version of Element Tree via the main ElementTree module. I have subclassed XMLParser, and created my own target object. I am not that interested in XML doctypes, but the following simplified code raises a DeprecationWarning: $ python3.3

[issue14927] add Do not supply 'int' argument to random.shuffle docstring

2013-10-06 Thread Christopher Smith
Christopher Smith added the comment: On Sun, Oct 6, 2013 at 12:14 AM, Raymond Hettinger rep...@bugs.python.orgwrote: Raymond Hettinger added the comment: Christopher, this tracker item needs to die. It is wasting everyone's time (and churning code) over nothing. but it's not quite dead

[issue19175] Erroneous reference to integer in format string grammar

2013-10-06 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: docs@python - eric.smith nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19175 ___

[issue19175] Erroneous reference to integer in format string grammar

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: The bug is that integer links to the integer production in the Python grammar. This shouldn't happen; I'll have a look on the Sphinx side. As a workaround, integer can be replaced by digit+ as requested (it occurs twice). -- nosy: +georg.brandl

[issue3982] support .format for bytes

2013-10-06 Thread Stendec
Changes by Stendec m...@stendec.me: -- nosy: +stendec ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3982 ___ ___ Python-bugs-list mailing list

[issue11176] give more meaningful argument names in argparse documentation

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: Also see this e-mail to docs@: http://mail.python.org/pipermail/docs/2012-December/012028.html No, please don't see this e-mail. It's not worth it. The poster clearly has no clue whatsoever about either a) common placeholders, or b) manners. I don't want to

[issue17618] base85 encoding

2013-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not very interesting in working on this (but analyzing and optimizing made fun to me). You Antoine as originator definitely are interested. So make decision about interface which you need and finish the work using proposed patches as a basis. I would

[issue17618] base85 encoding

2013-10-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17618 ___ ___

[issue19172] selectors: add keys() method

2013-10-06 Thread STINNER Victor
STINNER Victor added the comment: BaseSelector.register(fd) raises a KeyError if fd is already registered, which means that any selector must know the list of all registered FDs. For EpollSelector, the list may be inconsistent *if* the epoll is object is modified externally, but it's really a

[issue19177] Link to TLS (Transport Layer Security) and SSL (Secure Socket Layer) dead

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: The page is linked from the ssl docs in the See also section. The original link was http://www3.rad.com/networks/applications/secure/tls.htm -- ___ Python tracker rep...@bugs.python.org

[issue19177] Link to TLS (Transport Layer Security) and SSL (Secure Socket Layer) dead

2013-10-06 Thread Georg Brandl
New submission from Georg Brandl: This page doesn't seem to exist anymore. Antoine, you added the link, I guess it was an introductory page? Do you have another one in mind? It's still in the Wayback Machine, so for the time being we can replace the link to go there. -- assignee:

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I recommend that tracemalloc focus exclusively on real allocations and ignore freelisting. The former are interesting because they directly affect performance. Freelists on the other hand are close to being free (as in beer). Measuring the freelist

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread STINNER Victor
STINNER Victor added the comment: 2013/10/6 Raymond Hettinger rep...@bugs.python.org: I recommend that tracemalloc focus exclusively on real allocations and ignore freelisting. The former are interesting because they directly affect performance. Freelists on the other hand are close to

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread STINNER Victor
STINNER Victor added the comment: If you use hash table code from another project, be sure to check its licensing. Done: see https://mail.python.org/pipermail/python-legal-sig/2013-September/44.html I contacted the original author and python-legal mailing list. The BSD license asks to

[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset d4eb47c3d681 by Georg Brandl in branch '2.7': Closes #18646: improve lambda docs in tutorial. Original patch by Terry Reedy. http://hg.python.org/cpython/rev/d4eb47c3d681 -- nosy: +python-dev resolution: - fixed stage: patch review -

[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef1a17d5e263 by Georg Brandl in branch '3.3': Closes #18646: improve lambda docs in tutorial. Original patch by Terry Reedy. http://hg.python.org/cpython/rev/ef1a17d5e263 -- ___ Python tracker

[issue18790] incorrect text in argparse add_help example

2013-10-06 Thread Berker Peksag
Berker Peksag added the comment: This is fixed by changesets: - http://hg.python.org/cpython/rev/e2456381fa14 (3.4) - http://hg.python.org/cpython/rev/ee394a61dade (3.3) - http://hg.python.org/cpython/rev/c5f57a7fd4d8 (2.7) -- resolution: - fixed stage: patch review -

[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: Thanks for the patch; I modified it a little (removed the sentence about the name attribute; this is too involved for the tutorial, and used lambda expression). Will fix more lambda form in the docs in another changeset. -- nosy: +georg.brandl

[issue18725] Multiline shortening

2013-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In updated patch fixed a bug with final spaces. -- assignee: - serhiy.storchaka Added file: http://bugs.python.org/file31971/textwrap_max_lines_2.patch ___ Python tracker rep...@bugs.python.org

[issue18972] Use argparse in email example scripts

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: LGTM, please apply. (FileType is imported but not used in the second example?) -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18972 ___

[issue18790] incorrect text in argparse add_help example

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: Thanks for closing this! -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18790 ___ ___

[issue18972] Use argparse in email example scripts

2013-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FileType have some problems (see issue13824). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18972 ___ ___

[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this was a nice improvement. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18646 ___

[issue18758] Fix internal references in the documentation

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: Definitely not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18758 ___ ___ Python-bugs-list mailing list

[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18646 ___

[issue19178] Entries for module and package in glossary

2013-10-06 Thread Georg Brandl
New submission from Georg Brandl: From Kevin Murphy on docs@: I think newbies might like having 'module' and 'package' defined in the glossary, e.g. http://docs.python.org/2/glossary.html I agree. -- assignee: docs@python components: Documentation messages: 199052 nosy:

[issue18972] Use argparse in email example scripts

2013-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b1b1d4b28e8 by Serhiy Storchaka in branch 'default': Issue #18972: Modernize email examples and use the argparse module in them. http://hg.python.org/cpython/rev/1b1b1d4b28e8 -- nosy: +python-dev ___

[issue18972] Use argparse in email example scripts

2013-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Georg for the review -- assignee: docs@python - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue18927] Lock.acquire() docs incorrect about negative timeout

2013-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff5fb419967f by Georg Brandl in branch '3.3': Closes #18927: Lock.acquire only accepts -1 or positive values for timeout. http://hg.python.org/cpython/rev/ff5fb419967f -- nosy: +python-dev resolution: - fixed stage: - committed/rejected

[issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2013-10-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1e163fdf8cf3 by Georg Brandl in branch '3.3': Closes #13951: Add a faulthandler reference in the ctypes docs talking about crashes. http://hg.python.org/cpython/rev/1e163fdf8cf3 -- nosy: +python-dev resolution: - fixed stage: -

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

2013-10-06 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file31972/itertools_repeat.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19145 ___

[issue19119] duplicate test name in Lib/test/test_heapq.py

2013-10-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: I have played around with this test. The major issue (there are other issues as well but not so difficult) is whether nlargest and nsmallest should support iterator that could be endless iterator or reject it (by checking __len__ attribute) straight away. Once

[issue18529] Use long dash

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: Agreed. -- nosy: +georg.brandl resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18529 ___

[issue19172] selectors: add keys() method

2013-10-06 Thread Charles-François Natali
Charles-François Natali added the comment: BaseSelector.register(fd) raises a KeyError if fd is already registered, which means that any selector must know the list of all registered FDs. For EpollSelector, the list may be inconsistent *if* the epoll is object is modified externally, but

[issue19129] 6.2.1. Regular Expression Syntax flags

2013-10-06 Thread Georg Brandl
Georg Brandl added the comment: This is intended, the U flag is a legacy flag that is not supposed to by used in new code. -- nosy: +georg.brandl resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

  1   2   >