Sphinx 1.1.1 released

2011-11-01 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm happy to announce the release of Sphinx 1.1.1, a bug-fix release in the 1.1 series, fixing a number of bugs of the initial 1.1 release. What is it? === Sphinx is a tool that makes it easy to create intelligent and beautiful

IMDbPY 4.8

2011-11-01 Thread Davide Alberani
IMDbPY 4.8 is available (tgz, rpm, exe) from: http://imdbpy.sourceforge.net/ IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies. This is release contains a lot of bug fixes, and some legacy code was

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Steven D'Aprano
On Mon, 31 Oct 2011 20:44:45 -0400, Terry Reedy wrote: [...] def is_ascii_text(text): for c in text: if c not in LEGAL: return False return True If text is 3.x bytes, this does not work ;-). OP did not specify bytes or unicode or Python version. The OP

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Steven D'Aprano
On Mon, 31 Oct 2011 22:12:26 -0400, Dave Angel wrote: I would claim that a well-written (in C) translate function, without using the delete option, should be much quicker than any python loop, even if it does copy the data. I think you are selling short the speed of the Python interpreter.

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Peter Otten
Steven D'Aprano wrote: On Mon, 31 Oct 2011 22:12:26 -0400, Dave Angel wrote: I would claim that a well-written (in C) translate function, without using the delete option, should be much quicker than any python loop, even if it does copy the data. I think you are selling short the speed

Re: proving two formula are same each other!

2011-11-01 Thread Dave Angel
On 11/01/2011 08:03 AM, pyman wrote: hello, I need some idea to prove two formula is same. if N = 3, these formula are same each other. each formula has 3 input . To prove this, drawing shape or anything would be possible. how can I do this? please give me your idea! for example: N = 1 :

Re: proving two formula are same each other!

2011-11-01 Thread Dave Angel
(You forgot to do a REPLY-ALL, so that your message didn't get sent to the list) Python doesn't have formulae, it has functions and methods. So you have to describe more completely what kind of formula you have, math, physics, chemistry? the formula is related to math. And how is

Support for Galois/Counter Mode (GCM) ?

2011-11-01 Thread Roland Hedberg
Hi ! Is there a crypto library for Python that has support for GCM ?? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

sending more then 2 messages to SocketServer fasils

2011-11-01 Thread MrSmile
Hi people! I have asked myself why I am not capable sending 2 messages a time to a Socketserver. Why is that?! Here the Server: import SocketServer from ast import literal_eval class MKTest(object): DSX = [] MKTestInst = None def __init__(self,Daten):

Assign values from list to list of instances

2011-11-01 Thread Gnarlodious
I want to assign a list of variables: locus=[-2, 21, -10, 2, 12, -11, 0, 3] updating a list of objects each value to its respective instance: for order in range(len(Orders)): Orders[order].locus=locus[order] This works, even though it reads like doggerel. Is there a more pythonesque way

sending more then 2 messages at a time to a SocketServer fails

2011-11-01 Thread MrSmile
Hi people! I have asked myself why I am not capable sending 2 messages a time to a Socketserver. Why is that?! Here the Server: import SocketServer from ast import literal_eval class MKTest(object): DSX = [] MKTestInst = None def __init__(self,Daten):

Re: Assign values from list to list of instances

2011-11-01 Thread Peter Otten
Gnarlodious wrote: I want to assign a list of variables: locus=[-2, 21, -10, 2, 12, -11, 0, 3] updating a list of objects each value to its respective instance: for order in range(len(Orders)): Orders[order].locus=locus[order] This works, even though it reads like doggerel. Is there a

Re: Assign values from list to list of instances

2011-11-01 Thread Dave Angel
On 11/01/2011 11:05 AM, Gnarlodious wrote: I want to assign a list of variables: locus=[-2, 21, -10, 2, 12, -11, 0, 3] updating a list of objects each value to its respective instance: for order in range(len(Orders)): Orders[order].locus=locus[order] This works, even though it reads

Re: Assign values from list to list of instances

2011-11-01 Thread duncan smith
On 01/11/11 15:05, Gnarlodious wrote: I want to assign a list of variables: locus=[-2, 21, -10, 2, 12, -11, 0, 3] updating a list of objects each value to its respective instance: for order in range(len(Orders)): Orders[order].locus=locus[order] This works, even though it reads like

modified legend appears out of view! It didn't used to. MWE included.

2011-11-01 Thread cpbl
I seem to be using Python 2.7.2+ (latest update of Ubuntu). The following code used to work nicely, but now gives me an unreadable legend. The legend is showing up mostly out of view below and to the left of the figure. Does that happen for you? Is there a regression bug, or am I doing something

Re: C API: Making a context manager

2011-11-01 Thread Stefan Behnel
Chris Kaynor, 31.10.2011 19:34: I am currently rewritting a class using the Python C API to improve performance of it, however I have not been able to find any documentation about how to make a context manager using the C API. You should take a look at Cython. It makes these things *so* much

Re: sending more then 2 messages at a time to a SocketServer fails

2011-11-01 Thread Miki Tebeka
MKTest.getObj(data[0]) will return the same object on every call(with the same data that was initialized 1'st time). Any Daten parameter after the 1'st call is ignored. -- http://mail.python.org/mailman/listinfo/python-list

Re: Assign values from list to list of instances

2011-11-01 Thread Ulrich Eckhardt
Am 01.11.2011 16:05, schrieb Gnarlodious: I want to assign a list of variables: locus=[-2, 21, -10, 2, 12, -11, 0, 3] updating a list of objects each value to its respective instance: for order in range(len(Orders)): Orders[order].locus=locus[order] This works, even though it reads

Re: C API: Making a context manager

2011-11-01 Thread Chris Kaynor
On Tue, Nov 1, 2011 at 8:57 AM, Stefan Behnel stefan...@behnel.de wrote: Chris Kaynor, 31.10.2011 19:34: I am currently rewritting a class using the Python C API to improve performance of it, however I have not been able to find any documentation about how to make a context manager using the

Does anyone use Python Tools for visual studio?

2011-11-01 Thread Wei
I got several buggy things going on. First, the view of class tree stops expanding after creating more than two classes. Second, after 800 lines of code the classes and methods can't be folded. (meaning the + sign is gone) P.S. there is no warning or errors in my code. --

Re: C API: Making a context manager

2011-11-01 Thread Stefan Behnel
Chris Kaynor, 01.11.2011 17:19: On Tue, Nov 1, 2011 at 8:57 AM, Stefan Behnel wrote: Chris Kaynor, 31.10.2011 19:34: I am currently rewritting a class using the Python C API to improve performance of it, however I have not been able to find any documentation about how to make a context manager

Re: Does anyone use Python Tools for visual studio?

2011-11-01 Thread Wei
On Nov 1, 12:57 pm, Wei chen.1...@gmail.com wrote: I got several buggy things going on. First, the view of class tree stops expanding after creating more than two classes. Second, after 800 lines of code the classes and methods can't be folded. (meaning the + sign is gone) P.S. there is no

Re: Module for Python and SGE interaction

2011-11-01 Thread Abhishek Pratap
Hey Guys Pushing this one again just in case it was missed last night. Best, -Abhi On Mon, Oct 31, 2011 at 10:31 PM, Abhishek Pratap abhishek@gmail.comwrote: Hey Guys I shud mention I am relative new to the language. Could you please let me know based on your experience which module

Re: sending more then 2 messages at a time to a SocketServer fails

2011-11-01 Thread MRAB
On 01/11/2011 15:07, MrSmile wrote: Hi people! I have asked myself why I am not capable sending 2 messages a time to a Socketserver. Why is that?! Here the Server: import SocketServer from ast import literal_eval class MKTest(object): DSX = [] MKTestInst = None def

Sort items in wxListCtrl

2011-11-01 Thread Ric
I am trying to create a small application in wxPython and would like to ask for some help. I am trying to display folders and files in ListCtrl but sorted first folders followed by files (like in a file manager style) but not sure how to do this? Would I need to do this in code somehow or

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Duncan Booth
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f' MASK = ''.join('\01' if chr(n) in LEGAL else '\0' for n in range(128)) # Untested def is_ascii_text(text): for c in text: n = ord(c) if n =

Re: sending more then 2 messages at a time to a SocketServer fails

2011-11-01 Thread Tamer Higazi
Am 01.11.2011 17:13, schrieb Miki Tebeka: MKTest.getObj(data[0]) will return the same object on every call(with the same data that was initialized 1'st time). Any Daten parameter after the 1'st call is ignored. Not true! The singleton object has nothing todo. Here one more example for you:

Re: Does anyone use Python Tools for visual studio?

2011-11-01 Thread Tamer Higazi
buy wingIDE or use PyDEV If you tell me that you are using IronPython then buy wingIDE, there you can make use of the .net classes in python too. Tamer Am 01.11.2011 18:01, schrieb Wei: On Nov 1, 12:57 pm, Wei chen.1...@gmail.com wrote: I got several buggy things going on. First, the view

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Ian Kelly
On Mon, Oct 31, 2011 at 6:32 PM, Patrick Maupin pmau...@gmail.com wrote: On Oct 31, 5:52 pm, Ian Kelly ian.g.ke...@gmail.com wrote:  For instance, split() will split on vertical tab, which is not one of the characters the OP wanted. That's just the default behavior.  You can explicitly specify

understand program used to create file

2011-11-01 Thread pacopyc
Hi, I have about 1 files .doc and I want know the program used to create them: writer? word? abiword? else? I'd like develop a script python to do this. Is there a module to do it? Can you help me? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: getting columns attributes in declarative style with sqlalchemy

2011-11-01 Thread tres . bailey
Sorry for the repost, if it does in fact repost. I'm no SQLAlchemy expert, but I have used the Table and Column attribute objects from the model object to solve a similar problem in the past. You can use the following syntax to do it: [col.name for col in Country.__table__.columns._all_cols]

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread MRAB
On 01/11/2011 18:54, Duncan Booth wrote: Steven D'Apranosteve+comp.lang.pyt...@pearwood.info wrote: LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f' MASK = ''.join('\01' if chr(n) in LEGAL else '\0' for n in range(128)) # Untested def is_ascii_text(text): for c in text:

Re: getting columns attributes in declarative style with sqlalchemy

2011-11-01 Thread tres . bailey
Hi Gabriele, I'm not an Alchemy expert, but I have used the ColumnProperty of the model/column objects to solve this problem in the past. So to get the column name for the description column in your example above, you would use the following syntax:

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Stefan Behnel
pyt...@bdurham.com, 31.10.2011 20:54: Wondering if there's a fast/efficient built-in way to determine if a string has non-ASCII chars outside the range ASCII 32-127, CR, LF, or Tab? I know I can look at the chars of a string individually and compare them against a set of legal chars using

Re: understand program used to create file

2011-11-01 Thread Dave Angel
On 11/01/2011 03:27 PM, pacopyc wrote: Hi, I have about 1 files .doc and I want know the program used to create them: writer? word? abiword? else? I'd like develop a script python to do this. Is there a module to do it? Can you help me? Thanks If you're on Linux, just use the process module

Re: When I use Python under Windows. I found some file handles are not closed,

2011-11-01 Thread Gabriel Genellina
En Mon, 31 Oct 2011 12:57:15 -0300, 罗勇刚(Yonggang Luo) luoyonggang-re5jqeeqqe8avxtiumw...@public.gmane.org escribió: How did detecting where those handlers are created to tracing it and close it. Mainly because I was using C binding library(subvertpy) and file is not closed. A better

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Duncan Booth
MRAB pyt...@mrabarnett.plus.com wrote: On 01/11/2011 18:54, Duncan Booth wrote: Steven D'Apranosteve+comp.lang.pyt...@pearwood.info wrote: LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f' MASK = ''.join('\01' if chr(n) in LEGAL else '\0' for n in range (128)) # Untested def

Re: understand program used to create file

2011-11-01 Thread Chris Angelico
On Wed, Nov 2, 2011 at 6:27 AM, pacopyc paco...@gmail.com wrote: Hi, I have about 1 files .doc and I want know the program used to create them: writer? word? abiword? else? I'd like develop a script python to do this. Is there a module to do it? Can you help me? Technically, you can't

Re: understand program used to create file

2011-11-01 Thread Jon Clements
On Nov 1, 7:27 pm, pacopyc paco...@gmail.com wrote: Hi, I have about 1 files .doc and I want know the program used to create them: writer? word? abiword? else? I'd like develop a script python to do this. Is there a module to do it? Can you help me? Thanks My suggestion would be the same

Re: Does anyone use Python Tools for visual studio?

2011-11-01 Thread Brian Curtin
On Tue, Nov 1, 2011 at 11:57, Wei chen.1...@gmail.com wrote: I got several buggy things going on. First, the view of class tree stops expanding after creating more than two classes. Second, after 800 lines of code the classes and methods can't be folded. (meaning the + sign is gone) P.S.

Re: Assign values from list to list of instances

2011-11-01 Thread Terry Reedy
On 11/1/2011 11:37 AM, duncan smith wrote: On 01/11/11 15:05, Gnarlodious wrote: I want to assign a list of variables: locus=[-2, 21, -10, 2, 12, -11, 0, 3] updating a list of objects each value to its respective instance: for order in range(len(Orders)): Orders[order].locus=locus[order]

parsing text from ethtool command

2011-11-01 Thread extraspecialbitter
I'm still trying to write that seemingly simple Python script to print out network interfaces (as found in the ifconfig -a command) and their speed (ethtool interface). The idea is to loop for each interface and print out its speed. I'm looping correctly, but have some issues parsing the output

Chaco for real-time plot of PySerial data

2011-11-01 Thread Jack Keegan
Hi there, I asked this question on the enthought chaco mailing list some time last by have yet to receive a reply. Thought I'd ask here to see if anyone could shed some light on things for me. I have been considering using chaco / traits for close to a year now and am finally biting the bullet so

Re: Sort items in wxListCtrl

2011-11-01 Thread Miki Tebeka
Why not use the build in wx.FileDialog? Also, have a look at the demo that comes with wxPython. It has an example with a sortable list control. -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing text from ethtool command

2011-11-01 Thread Miki Tebeka
In my box, there are some spaces (tabs?) before Speed. IMO re.search(Speed, line) will be a more robust. -- http://mail.python.org/mailman/listinfo/python-list

Re: proving two formula are same each other!

2011-11-01 Thread Steven D'Aprano
On Tue, 01 Nov 2011 05:03:17 -0700, pyman wrote: hello, I need some idea to prove two formula is same. Impossible. As you explained further on, they are different formula. If they are different, they aren't the same. This has nothing to do with Python. In another message, you tell us: these

Re: Efficient, built-in way to determine if string has non-ASCII chars outside ASCII 32-127, CRLF, Tab?

2011-11-01 Thread Terry Reedy
On 11/1/2011 2:56 AM, Steven D'Aprano wrote: On Mon, 31 Oct 2011 20:44:45 -0400, Terry Reedy wrote: [...] def is_ascii_text(text): for c in text: if c not in LEGAL: return False return True If text is 3.x bytes, this does not work ;-). OP did not specify

Re: parsing text from ethtool command

2011-11-01 Thread Ian Kelly
On Tue, Nov 1, 2011 at 5:19 PM, Miki Tebeka miki.teb...@gmail.com wrote: In my box, there are some spaces (tabs?) before Speed. IMO re.search(Speed, line) will be a more robust. Or simply: if Speed in line: There is no need for a regular expression here. This would also work and be a bit

Re: Module for Python and SGE interaction

2011-11-01 Thread Terry Reedy
On 11/1/2011 1:31 PM, Abhishek Pratap wrote: On Mon, Oct 31, 2011 at 10:31 PM, Abhishek Pratap abhishek@gmail.com mailto:abhishek@gmail.com wrote: Hey Guys I shud mention I am relative new to the language. Could you please let me know based on your experience which module

Re: Sort items in wxListCtrl

2011-11-01 Thread Ric
On Tue, 1 Nov 2011 16:14:50 -0700 (PDT), Miki Tebeka miki.teb...@gmail.com wrote: Why not use the build in wx.FileDialog? Also, have a look at the demo that comes with wxPython. It has an example with a sortable list control. Thanks for responding, How would wx.FileDialog help me in this case?

Re: sending more then 2 messages to SocketServer fasils

2011-11-01 Thread Roy Smith
In article 4eb00a7a$0$6560$9b4e6...@newsspool4.arcor-online.net, MrSmile n...@mail.de wrote: Hi people! I have asked myself why I am not capable sending 2 messages a time to a Socketserver. Why is that?! There's a lot of confusing code here. It would help when asking these kinds of

How filecmp walk into subdirectories?

2011-11-01 Thread Muddy Coder
Hi Folks, I tried to compare two directories, each with hundreds of files in multiple level subdirectories, to find out the different files. I used filecmp module to the job as: comp=filecmp.dircmp(adir, bdir) comp.report() It worked, and printed out the identical and different files.

Re: How filecmp walk into subdirectories?

2011-11-01 Thread John Gordon
In d0c0b3f4-ce8b-489f-9334-2b5d807f6...@es7g2000vbb.googlegroups.com Muddy Coder cosmo_gene...@yahoo.com writes: I tried to compare two directories, each with hundreds of files in multiple level subdirectories, to find out the different files. I used filecmp module to the job as:

Re: understand program used to create file

2011-11-01 Thread alex23
On Nov 2, 5:27 am, pacopyc paco...@gmail.com wrote: Hi, I have about 1 files .doc and I want know the program used to create them: writer? word? abiword? else? I'd like develop a script python to do this. Is there a module to do it? Can you help me? Word documents store metadata inside of

Question about metaclass

2011-11-01 Thread Makoto Kuwata
Hi, I want to define a special class which groups functions, like: class Greepting(FuncGroup): def hello(): # no self, no @staticmethod! print(Hello!) def goodbye():# no self, no @staticmethod! print(Good Bye!) Geeting.hello():

Re: Question about metaclass

2011-11-01 Thread Ian Kelly
On Tue, Nov 1, 2011 at 10:02 PM, Makoto Kuwata k...@kuwata-lab.com wrote: I tried the following code which converts instance mthods into static method automatically, but I don't get result what I want. (python 2.5.5)    import sys    from types import FunctionType    class MetaClass(type):

Re: Question about metaclass

2011-11-01 Thread Patrick Maupin
On Nov 1, 11:02 pm, Makoto Kuwata k...@kuwata-lab.com wrote: Hi, I want to define a special class which groups functions, like:     class Greepting(FuncGroup):         def hello():          # no self, no @staticmethod!             print(Hello!)         def goodbye():        # no self, no

Re: Question about metaclass

2011-11-01 Thread Makoto Kuwata
On Wed, Nov 2, 2011 at 1:40 PM, Ian Kelly ian.g.ke...@gmail.com wrote: If you want to customize the dict you need to do it in __new__, not __init__.  By the time __init__ is called, the class has already been created. class MetaClass(type):    def __new__(mcs, name, bases, dict):        

Re: Assign values from list to list of instances

2011-11-01 Thread Gnarlodious
On Nov 1, 3:33 pm, Terry Reedy wrote: for obj, val in zip(Orders, locus): obj.locus = val I'm not sure how worthwhile it is converting the above to a list comprehension (when the list would just be thrown away). Having said that the call to zip creates an unnecessary list. Not in Py

Re: How to mix-in __getattr__ after the fact?

2011-11-01 Thread DevPlayer
On Oct 31, 8:01 am, dhyams dhy...@gmail.com wrote: Thanks for all of the responses; everyone was exactly correct, and obeying the binding rules for special methods did work in the example above.  Unfortunately, I only have read-only access to the class itself (it was a VTK class wrapped with

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-11-01 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Ok, closing the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13279 ___ ___

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-11-01 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13279 ___

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-11-01 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Why it is closed as duplicate? nothing said about CLOEXEC in issue12797 See http://bugs.python.org/issue12760#msg146686 -- ___ Python tracker rep...@bugs.python.org

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-11-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: And to be explicit, you can now write: def open_cloexex(filename, mode='r'): return open(filename, mode, opener=lambda path, mod: os.open(path, mod|os.O_CLOEXEC)) -- ___

[issue13308] fix test_httpservers failures when run as root

2011-11-01 Thread Charles-François Natali
New submission from Charles-François Natali neolo...@free.fr: Here's a patch fixing test_httpservers failures when run as root (a couple buildbots are consistently failing on this, e.g. http://python.org/dev/buildbot/all/builders/x86 FreeBSD 7.2 3.x/builds/2282/steps/test/logs/stdio). The

[issue13308] fix test_httpservers failures when run as root

2011-11-01 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: You should change issue # with the real issue number now that there's an issue for this :) -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13308

[issue13152] textwrap: support custom tabsize

2011-11-01 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Two comments: * The new parameter to __init__ should be added at the end of the parameter list. * A documentation update would be nice. -- ___ Python tracker rep...@bugs.python.org

[issue13305] datetime.strftime(%Y) not consistent for years 1000

2011-11-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le 01/11/2011 00:07, Roundup Robot a écrit : Roundup Robotdevn...@psf.upfronthosting.co.za added the comment: New changeset 3f025427f02b by Florent Xicluna in branch 'default': Fix regression due to changeset 2096158376e5

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-11-01 Thread Марк Коренберг
Марк Коренберг socketp...@gmail.com added the comment: Well, I understand. So why not to add 'e' (and 'N', which is the same meaning) character, which: * use O_CLOEXEC in modern Linux * generate Exception if O_CLOEXEC is not supported (or does not work) on platform. Also, implement

[issue13305] datetime.strftime(%Y) not consistent for years 1000

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 230f0956aaa3 by Florent Xicluna in branch 'default': Strengthen the tests for format '%Y', in relation with issue #13305. http://hg.python.org/cpython/rev/230f0956aaa3 --

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-11-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: So why not to add 'e' character You said it: because it can't be written consistently on all platforms. For example, python does not use CreateFile on Windows, see #12939. -- ___ Python

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Instead of rewriting your own RawIO implementation, why not use _open_osfhandle? This should be simple now with the opener argument. http://msdn.microsoft.com/en-us/library/bdts1c9x.aspx -- nosy: +pitrou

[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0a5eb57d5876 by Ezio Melotti in branch '2.7': #670664: Fix HTMLParser to correctly handle the content of ``script.../script`` and ``style.../style``. http://hg.python.org/cpython/rev/0a5eb57d5876 New changeset

[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2011-11-01 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks to everyone who contributed to this over the years! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12008] HtmlParser non-strict goes wrong with unquoted attributes

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6107a84e3c44 by Ezio Melotti in branch '3.2': #12008: add a test. http://hg.python.org/cpython/rev/6107a84e3c44 New changeset 495b31a8b280 by Ezio Melotti in branch 'default': #12008: merge with 3.2.

[issue12008] HtmlParser non-strict goes wrong with unquoted attributes

2011-11-01 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This seems to be already fixed in 3.2/3.3, so I extracted the test from your script and added to the test suite. If you can find a way to break the parser let me know. -- assignee: - ezio.melotti nosy: +ezio.melotti resolution:

[issue12629] HTMLParser silently stops parsing with malformed attributes

2011-11-01 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I think xy z=o //x should be parser as xy z= //x, and the o should be ignored. xy z= //x should be parser as xy z= //x, and the last two should be ignored. This is what Firefox seems to do. Currently the parser doesn't seem to handle

[issue12578] Erratic socket.gaierror: [Errno 11004] when using smtplib

2011-11-01 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Please provide more information, because this looks really strange... -- nosy: +neologix stage: - test needed status: open - pending ___ Python tracker rep...@bugs.python.org

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-01 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13303 ___

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: After changeset 55a3b563f0db the Gentoo buildbot is complaining. == FAIL: test_strptime (test.test_time.TimeTestCase)

[issue13302] Clarification needed in C API arg parsing

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It's already in the 3.x docs (but not 2.x): “Strings and buffers These formats allow to access an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area. Also, you won’t have to

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2771f7e96a52 by Florent Xicluna in branch 'default': Add temporary tests to troubleshoot issue #13309 on Gentoo buildbot. http://hg.python.org/cpython/rev/2771f7e96a52 -- nosy: +python-dev

[issue9897] multiprocessing problems

2011-11-01 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The first problem is a duplicate of issue #6056. As for the second problem, no, it doesn't limit the number of concurrent connections. Server.serve_forever() creates a new thread for each new incoming connection. Closing as

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bb0ae7df08f8 by Florent Xicluna in branch 'default': Troubleshoot issue #13309 on Gentoo buildbot. http://hg.python.org/cpython/rev/bb0ae7df08f8 -- ___ Python tracker

[issue13287] urllib.request exposes too many names

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 70dedd8ce8f3 by Senthil Kumaran in branch 'default': issue13287 - Define __all__ for urllib.request and urllib.error and expose only http://hg.python.org/cpython/rev/70dedd8ce8f3 -- nosy: +python-dev

[issue13287] urllib.request exposes too many names

2011-11-01 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Thanks flox for the patch. Just the News item is added. I don't think, this requires any Docs update. One change I had to make in the patch is to remote HTTPSHandler from __all__ because that is only conditionally available when

[issue1745761] Bad attributes/data handling in SGMLib

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

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5b1e1967ea9d by Florent Xicluna in branch 'default': Replace temporary tests with the real test case for issue #13309 on Gentoo. http://hg.python.org/cpython/rev/5b1e1967ea9d --

[issue13310] asyncore handling of out-of-band data fails

2011-11-01 Thread Xavier de Gaye
New submission from Xavier de Gaye xdeg...@gmail.com: Add the following lines to test_handle_expt (this makes sense, a dispatcher instance is supposed to implement handle_read and call recv in order to detect that the remote end has closed the socket): --- a/Lib/test/test_asyncore.py +++

[issue13311] asyncore handle_read should call recv

2011-11-01 Thread Xavier de Gaye
New submission from Xavier de Gaye xdeg...@gmail.com: When the remote end disconnects, handle_close is only called if recv is called (from handle_read). The default implementation of handle_read does not call recv. Not having the default implementation of handle_read call recv, has the

[issue755670] improve HTMLParser attribute processing regexps

2011-11-01 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached patch includes the tests in diff.txt. On Python 3, with strict=False, the first test (adjacent attributes) passes, but the other two still fail. See also #12629. -- nosy: +ezio.melotti -BreamoreBoy type: feature request -

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: import time import sys t = time.gmtime(time.time()) s = time.strftime('%Z', t) print(s) time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1)) t = time.gmtime(time.time()) s = time.strftime('%Z', t) print(s) outputs: SAST LMT on my Gentoo

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Марк Коренберг
Марк Коренберг socketp...@gmail.com added the comment: why not use _open_osfhandle? Because it is wrapper for other CRT functions for Windows, like close(). In other words it is an emulation. I think Python should not create wrapper around wrapper around wrapper... For example, in Python3,

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: why not use _open_osfhandle? Because it is wrapper for other CRT functions for Windows, like close(). In other words it is an emulation. I think Python should not create wrapper around wrapper around wrapper... Why do you think it makes a

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: It seems that mktime is buggy on Gentoo. You can try to reset its state in some way before to retry strftime: t = time.gmtime(time.time()) s = time.strftime('%Z', t) print(s) time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1)) s =

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: It outputs: SAST LMT LMT An equivalent C program to the first test: #include time.h #include stdlib.h #include stdio.h int main() { time_t t; struct tm *tmp; t = time(NULL); tmp = localtime(t); char str[200];

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: An implementation of RawIO with the win32 API can be useful (and I'd be interested to compare the performance) But maybe not for all usages: some Python interfaces are defined in terms of file descriptors, imp.load_module(), and

[issue13312] test_time fails: strftime('%Y', y) for negative year

2011-11-01 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: On builder AMD64 FreeBSD 8.2 3.x for the TIME_MINYEAR: == FAIL: test_negative (test.test_time.TestStrftime4dyear)

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Марк Коренберг
Марк Коренберг socketp...@gmail.com added the comment: Why do you think it makes a difference? Because adding one more dependency on unneeded libraries add the pain. Also it limit us on very restricted API of that wrapper. Windows native API is stable. So it's OK to rely on it's documented

[issue13313] test_time fails: tzset() do not change timezone

2011-11-01 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: On builder x86 FreeBSD 7.2 3.x : == FAIL: test_tzset (test.test_time.TimeTestCase) -- Traceback

  1   2   >