ANN: Announcing MV3D 0.70!

2012-01-23 Thread Michael Handverger
I am pleased to announce the release version 0.70 of MV3D! This release includes a massive amount of new features and over 70 bugfixes. The main focus was on usability and involved a large amount of work on tools. In 0.70, Panda3D support was brought up to par with animation, terrain texture

Re: __future__ and __rdiv__

2012-01-23 Thread Terry Reedy
On 1/23/2012 12:22 AM, Massimo Di Pierro wrote: Hello everybody, I hope somebody could help me with this problem. If this is not the right place to ask, please direct me to the right place and apologies. I am using Python 2.7 and I am writing some code I want to work on 3.x as well. The

Re: Trouble with internationalized path under windows

2012-01-23 Thread Chris Angelico
On Mon, Jan 23, 2012 at 12:49 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: The fact is, Unicode is nothing more than a monkey patch for language multiplicity. A multiplicity that is perpetuated on the masses due to a blind adherence to the cult of xenophobia. I agree. We need to

Re: __future__ and __rdiv__

2012-01-23 Thread Duncan Booth
Terry Reedy tjre...@udel.edu wrote: But if you mean for Number to be like a float rather than int, do as you are (with / and __truediv__). Or even __rtruediv__ -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: lxml to parse html

2012-01-23 Thread Peter Otten
contro opinion wrote: import lxml.html myxml=''' cooperate job DecreaseHour=1 table=tpa_radio_sum /job job DecreaseHour=2 table=tpa_radio_sum /job job DecreaseHour=3 table=tpa_radio_sum /job /cooperate ''' root=lxml.html.fromstring(myxml)

Re: lxml to parse html

2012-01-23 Thread Stefan Behnel
contro opinion, 23.01.2012 08:34: import lxml.html myxml=''' cooperate job DecreaseHour=1 table=tpa_radio_sum /job job DecreaseHour=2 table=tpa_radio_sum /job job DecreaseHour=3 table=tpa_radio_sum /job /cooperate

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-23 Thread Steven D'Aprano
On Sun, 22 Jan 2012 07:50:59 -0800, Rick Johnson wrote: What does Python do when presented with this code? py [line.strip('\n') for line in f.readlines()] If Python reads all the file lines first and THEN iterates AGAIN to do the strip; we are driving a Fred flintstone mobile. Nonsense.

Re: access address from object and vice versa

2012-01-23 Thread Duncan Booth
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On the other hand, presumably this means that Jython objects need an extra field to store the ID, so the CPython approach is a space optimization. Given that using `id()` is such an uncommon occurence I would expect the ids to be

A way to write properties

2012-01-23 Thread Arnaud Delobelle
Hi all, It just occurred to me that there's a very simple but slightly different way to implement properties: class PropertyType(type): def __get__(self, obj, objtype): return self if obj is None else self.get(obj) def __set__(self, obj, val): self.set(obj, val) def

PyHook to catch mouse events

2012-01-23 Thread Neru Yume
Using PyHook to record mouse events, one has to add quite a few lines to set up a hook, and as far as I have experienced, if one uses time.sleep() or some other function that spends some time doing something, the program freezes my computer completely while doing this (the cursor starts moving

Re: Installing Python on CentOS 6 - a big pain

2012-01-23 Thread Benedict Verheyen
On 20/01/2012 12:42, Anssi Saari wrote: Benedict Verheyen benedict.verhe...@gmail.com writes: If i need to install a new version of Python, as I happen to have done today, I only need to do step 4. Which is maybe 5 minutes of work. I don't really understand why you compile these common

Re: while True or while 1

2012-01-23 Thread Dave Angel
On 01/22/2012 10:55 PM, alex23 wrote: On Jan 23, 2:05 am, Dan Sommersd...@tombstonezero.net wrote: As per a now-ancient suggestion on this mailing list (I believe it was by Tim Peters), I've also been known to use a non-empty, literal Python string as a self-documenting, forever-True value in

Re: PyHook to catch mouse events

2012-01-23 Thread Dave Angel
On 01/23/2012 07:06 AM, Neru Yume wrote: Using PyHook to record mouse events, one has to add quite a few lines to set up a hook, and as far as I have experienced, if one uses time.sleep() or some other function that spends some time doing something, the program freezes my computer completely

Re: while True or while 1

2012-01-23 Thread Hrvoje Niksic
Dave Angel d...@davea.name writes: I do something similar when there's a portion of code that should never be reached: assert(reason why I cannot get here) Shouldn't that be assert False, reason why I cannot get here? -- http://mail.python.org/mailman/listinfo/python-list

RE: PyHook to catch mouse events

2012-01-23 Thread Neru Yume
Date: Mon, 23 Jan 2012 08:24:41 -0500 From: d...@davea.name To: neruy...@hotmail.com CC: python-list@python.org Subject: Re: PyHook to catch mouse events On 01/23/2012 07:06 AM, Neru Yume wrote: Using PyHook to record mouse events, one has to add quite a few lines to set up a hook,

Re: can some one help me with my code. thanks

2012-01-23 Thread Tamanna Sultana
On Jan 20, 11:03 pm, Chris Angelico ros...@gmail.com wrote: On Sat, Jan 21, 2012 at 1:23 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote: Your variable names need a bit more thought def average(bin): What is a bin?

Re: can some one help me with my code. thanks

2012-01-23 Thread Tamanna Sultana
On Jan 20, 9:23 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote: On Jan 20, 12:49 pm, Tamanna Sultana tamannas.rah...@gmail.com wrote: If you can give me some lead to fix the code I wrote below that will be great:

Re: lxml to parse html

2012-01-23 Thread Adam Tauno Williams
On Mon, 2012-01-23 at 15:39 +0800, contro opinion wrote: import lxml.html myxml=''' cooperate job DecreaseHour=1 table=tpa_radio_sum /job Use lxml.etree not lxml.html. Your content is XML, not HTML. -- System Network Administrator [ LPI NCLA ] http://www.whitemiceconsulting.com

Re: access address from object and vice versa

2012-01-23 Thread Grant Edwards
On 2012-01-22, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 21 Jan 2012 19:36:32 -0800, Chris Rebert wrote: On Sat, Jan 21, 2012 at 7:04 PM, Tamer Higazi th9...@googlemail.com wrote: Hi people! I have asked myself the following thing. How do I access the address of

Re: while True or while 1

2012-01-23 Thread Grant Edwards
On 2012-01-21, Erik Max Francis m...@alcyone.com wrote: Chris Angelico wrote: On Sun, Jan 22, 2012 at 12:47 AM, Andrea Crotti andrea.crott...@gmail.com wrote: So I tried to do the following, and the result is surprising. For what I can see it looks like the interpreter can optimize away the

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-23 Thread Grant Edwards
On 2012-01-22, Rick Johnson rantingrickjohn...@gmail.com wrote: What does Python do when presented with this code? It does what you tell it to. What else would you expect? -- Grant Edwards grant.b.edwardsYow! Are we wet yet? at

Re: while True or while 1

2012-01-23 Thread Giampaolo Rodolà
Il 21 gennaio 2012 22:13, Erik Max Francis m...@alcyone.com ha scritto: The real reason people still use the `while 1` construct, I would imagine, is just inertia or habit, rather than a conscious, defensive decision.  If it's the latter, it's a case of being _way_ too defensive. It's also

Re: while True or while 1

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 9:41 AM, Giampaolo Rodolà g.rod...@gmail.com wrote: Il 21 gennaio 2012 22:13, Erik Max Francis m...@alcyone.com ha scritto: The real reason people still use the `while 1` construct, I would imagine, is just inertia or habit, rather than a conscious, defensive

What happened tp scipy.stsci?

2012-01-23 Thread Wanderer
Back in scipy 0.7 there was a package called stsci that had function scipy.stsci.image.median that created a median image from a stack of images. The stsci package is dropped in v0.8. Has this functionality been moved to a different package? Thanks Apologies if this is a double post. I had

Re: PyHook to catch mouse events

2012-01-23 Thread Dave Angel
On 01/23/2012 08:35 AM, Neru Yume wrote: Date: Mon, 23 Jan 2012 08:24:41 -0500 From: d...@davea.name To: neruy...@hotmail.com CC: python-list@python.org Subject: Re: PyHook to catch mouse events On 01/23/2012 07:06 AM, Neru Yume wrote: Using PyHook to record mouse events, one has to add

Re: while True or while 1

2012-01-23 Thread Dave Angel
On 01/23/2012 08:28 AM, Hrvoje Niksic wrote: Dave Angeld...@davea.name writes: I do something similar when there's a portion of code that should never be reached: assert(reason why I cannot get here) Shouldn't that be assert False, reason why I cannot get here? You caught me in a typo. If

CompIMAGE 2012 - Call for Papers

2012-01-23 Thread tava...@fe.up.pt
Dear Colleague, We would like to call your attention to the International Symposium CompIMAGE 2012 - Computational Modeling of Objects Presented in Images: Fundamentals, Methods and Applications (www.dis.uniroma1.it/ compimage2012), that will be held in Rome, ITALY, in September 5-7, 2012. MAIN

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-23 Thread 88888 Dihedral
在 2012年1月23日星期一UTC+8上午2时01分11秒,Robert Kern写道: On 1/22/12 3:50 PM, Rick Johnson wrote: What does Python do when presented with this code? py [line.strip('\n') for line in f.readlines()] If Python reads all the file lines first and THEN iterates AGAIN to do the strip; we are driving

Re: while True or while 1

2012-01-23 Thread Evan Driscoll
On 01/23/2012 11:39 AM, Ian Kelly wrote: We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil -- Donald Knuth To play devil's advocate for a moment, if you have the choice between two ways of writing something, A and B, where

Re: while True or while 1

2012-01-23 Thread Erik Max Francis
Giampaolo Rodolà wrote: Il 21 gennaio 2012 22:13, Erik Max Francis m...@alcyone.com ha scritto: The real reason people still use the `while 1` construct, I would imagine, is just inertia or habit, rather than a conscious, defensive decision. If it's the latter, it's a case of being _way_ too

Using an object inside a class

2012-01-23 Thread Jonno
I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Without getting too heavy into the details I have an object which I am trying to make available inside another class. The reference to the object is rather long and convoluted but what I find is that within my

Determining version of OpenSSL linked against python?

2012-01-23 Thread Adam Mercer
Hi I'm trying to write a script that determines the version of OpenSSL that python is linked against, using python-2.7 this is easy as I can use: import ssl ssl.OPENSSL_VERSION but unfortunately I need to support python-2.6, from an older script I used the following: import _ssl

Re: Using an object inside a class

2012-01-23 Thread Jonno
On Mon, Jan 23, 2012 at 1:44 PM, Jonno jonnojohn...@gmail.com wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Without getting too heavy into the details I have an object which I am trying to make available inside another class. The reference to

Re: Using an object inside a class

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 12:44 PM, Jonno jonnojohn...@gmail.com wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Then you probably should not be using globals. Without getting too heavy into the details I have an object which I am trying to make

Re: Using an object inside a class

2012-01-23 Thread Michael Torrie
On 01/23/2012 12:44 PM, Jonno wrote: Any ideas why I can reference foo inside the method but not in __init__? No idea, but could you pass foo as a constructor parameter to __init__ and store it as an instance variable? -- http://mail.python.org/mailman/listinfo/python-list

Re: while True or while 1

2012-01-23 Thread Giampaolo Rodolà
Il 23 gennaio 2012 20:12, Erik Max Francis m...@alcyone.com ha scritto: Giampaolo Rodolà wrote: Il 21 gennaio 2012 22:13, Erik Max Francis m...@alcyone.com ha scritto: The real reason people still use the `while 1` construct, I would imagine, is just inertia or habit, rather than a

Re: Using an object inside a class

2012-01-23 Thread Terry Reedy
On 1/23/2012 2:44 PM, Jonno wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Without getting too heavy into the details I have an object which I am trying to make available inside another class. The reference to the object is rather long and

Re: Using an object inside a class

2012-01-23 Thread Jonno
On Mon, Jan 23, 2012 at 2:09 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jan 23, 2012 at 12:44 PM, Jonno jonnojohn...@gmail.com wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Then you probably should not be using globals. I'm trying

Re: Using an object inside a class

2012-01-23 Thread Gary Herron
On 01/23/2012 11:44 AM, Jonno wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Without getting too heavy into the details I have an object which I am trying to make available inside another class. The reference to the object is rather long and

Re: Using an object inside a class

2012-01-23 Thread Ethan Furman
Gary Herron wrote: If the method does not bind it, then Python will look in the class for foo. This could work class Class1: foo = whatever # Available to all instances def __init__(self): foo.bar.object self.foo.bar.object ^- needs the self

Re: while True or while 1

2012-01-23 Thread Andrea Crotti
On 01/23/2012 06:05 PM, Evan Driscoll wrote: To play devil's advocate for a moment, if you have the choice between two ways of writing something, A and B, where both are basically the same in terms of difficulty to write, difficulty to maintain, and difficulty to understand, but A is faster

Re: Using an object inside a class

2012-01-23 Thread MRAB
On 23/01/2012 20:27, Jonno wrote: On Mon, Jan 23, 2012 at 2:09 PM, Ian Kelly ian.g.ke...@gmail.com mailto:ian.g.ke...@gmail.com wrote: On Mon, Jan 23, 2012 at 12:44 PM, Jonno jonnojohn...@gmail.com mailto:jonnojohn...@gmail.com wrote: I have a pretty complicated bit of code that

Re: Using an object inside a class

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 1:58 PM, MRAB pyt...@mrabarnett.plus.com wrote: Either way would work but the main issue is I can't seem to use foo or foo.bar or foo.bar.object anywhere in __init__ or even before that in the main class area. This line: foo = MyApp(0) will create a 'MyApp'

Re: Using an object inside a class

2012-01-23 Thread Jonno
On Mon, Jan 23, 2012 at 2:25 PM, Terry Reedy tjre...@udel.edu wrote: On 1/23/2012 2:44 PM, Jonno wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Without getting too heavy into the details I have an object which I am trying to make available

Re: Using an object inside a class

2012-01-23 Thread Jonno
Script... import wx import wx.aui import matplotlib as mpl from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas class Class1(wx.Panel): def __init__(self, parent, id = -1, dpi = None, **kwargs): wx.Panel.__init__(self, parent, id=id, **kwargs) self.figure

Re: Using an object inside a class

2012-01-23 Thread Benjamin Kaplan
On Mon, Jan 23, 2012 at 4:22 PM, Jonno jonnojohn...@gmail.com wrote: On Mon, Jan 23, 2012 at 2:25 PM, Terry Reedy tjre...@udel.edu wrote: On 1/23/2012 2:44 PM, Jonno wrote: I have a pretty complicated bit of code that I'm trying to convert to more clean OOP. Without getting too heavy

Re: Using an object inside a class

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 2:22 PM, Jonno jonnojohn...@gmail.com wrote: References inside functions are resolved when the function is called. So purely from what you have presented above, it would seem that 'foo' is defined between the call to __init__ and a later call to method1. I have a

Parsing a serial stream too slowly

2012-01-23 Thread M.Pekala
Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls the sensors, filters them, formats the values, and sends the formatted values over a serial bus. The serial stream comes out like

Re: Using an object inside a class

2012-01-23 Thread Jonno
On Mon, Jan 23, 2012 at 3:42 PM, Ian Kelly ian.g.ke...@gmail.com wrote: Exactly. The line app = MyApp(0) creates a MyApp instance and then assigns it to app. As part of the MyApp creation process, it creates a MyFrame, which creates a Tab, which creates a Class1, which attempts to reference

Re: Parsing a serial stream too slowly

2012-01-23 Thread Jerry Hill
On Mon, Jan 23, 2012 at 4:48 PM, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am When one sensor is running my python script grabs the data just fine, removes the formatting, and throws it into a text control box. However when 3 or

Re: Parsing a serial stream too slowly

2012-01-23 Thread Jon Clements
On Jan 23, 9:48 pm, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls the sensors, filters them, formats the values, and sends the formatted

Re: Parsing a serial stream too slowly

2012-01-23 Thread M.Pekala
On Jan 23, 5:00 pm, Jon Clements jon...@googlemail.com wrote: On Jan 23, 9:48 pm, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls

Re: Using an object inside a class

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 2:52 PM, Jonno jonnojohn...@gmail.com wrote: On Mon, Jan 23, 2012 at 3:42 PM, Ian Kelly ian.g.ke...@gmail.com wrote: Exactly.  The line app = MyApp(0) creates a MyApp instance and then assigns it to app.  As part of the MyApp creation process, it creates a MyFrame,

Re: while True or while 1

2012-01-23 Thread 88888 Dihedral
在 2012年1月24日星期二UTC+8上午4时50分11秒,Andrea Crotti写道: On 01/23/2012 06:05 PM, Evan Driscoll wrote: To play devil's advocate for a moment, if you have the choice between two ways of writing something, A and B, where both are basically the same in terms of difficulty to write, difficulty to

Re: Using an object inside a class

2012-01-23 Thread Jonno
On Mon, Jan 23, 2012 at 4:20 PM, Ian Kelly ian.g.ke...@gmail.com wrote: The App object is created and the wx framework already knows about it. It's just not assigned to the app global yet, and the OnInit call has not completed yet. See: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC

Re: Using an object inside a class

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 3:45 PM, Jonno jonnojohn...@gmail.com wrote: I see, so that would get me access to the app instance during init of Class1 but if I can't access frame or the object as they still aren't created yet. I can only do that in attributes that I know won't be called until the

Re: Parsing a serial stream too slowly

2012-01-23 Thread Thomas Rachel
Am 23.01.2012 22:48 schrieb M.Pekala: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is attached to a set of sensors. The board polls the sensors, filters them, formats the values, and sends the formatted values over a serial bus.

Generating a .pc file using distutils

2012-01-23 Thread Tycho Andersen
Is there some standard way to generate a .pc file (given a .pc.in or similar) using distutils? If there's not, is there a good way to access whatever the user passes in as --prefix (besides parsing sys.argv yourself)? Thanks, \t -- http://mail.python.org/mailman/listinfo/python-list

Re: Using an object inside a class

2012-01-23 Thread Jonno
On Mon, Jan 23, 2012 at 4:57 PM, Ian Kelly ian.g.ke...@gmail.com wrote: By the way, looking at your object hierarchy more closely, isn't app.frame.graph_panel going to end up being the same thing as just self.figure? Why not just use the latter and remove the reliance on finding the correct

Re: Parsing a serial stream too slowly

2012-01-23 Thread Nick Dokos
M.Pekala mcdpek...@gmail.com wrote: On Jan 23, 5:00 pm, Jon Clements jon...@googlemail.com wrote: On Jan 23, 9:48 pm, M.Pekala mcdpek...@gmail.com wrote: Hello, I am having some trouble with a serial stream on a project I am working on. I have an external board that is

Re: Parsing a serial stream too slowly

2012-01-23 Thread Cameron Simpson
On 23Jan2012 13:48, M.Pekala mcdpek...@gmail.com wrote: | Hello, I am having some trouble with a serial stream on a project I am | working on. I have an external board that is attached to a set of | sensors. The board polls the sensors, filters them, formats the | values, and sends the formatted

python.org mailman web interface problem

2012-01-23 Thread Chris Rebert
Accessing http://mail.python.org/mailman/listinfo/ currently gives: Bug in Mailman version 2.1.12 We're sorry, we hit a bug! Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find

String interning in Python 3 - missing or moved?

2012-01-23 Thread Chris Angelico
Python 2 can intern 'str' (bytes) strings (with the eponymous builtin, and with C API functions), though not unicode. Python 3 does not have that builtin, nor the C API; I can't find any support for either str or bytes. Has it been moved, or is interning as a concept deprecated? I don't have a

problems with tkinter updates

2012-01-23 Thread yves
I'm missing something about tkinter updates. How can I give tkinter a chance to run? Here's some code: import time import tkinter import tkinter.scrolledtext tk = tkinter.Tk() f = tkinter.Toplevel(tk) st = tkinter.scrolledtext.ScrolledText(f) st.pack() def update(): print('updating')

GOZERBOT 1.0.1 FINAL

2012-01-23 Thread Bart Thate
GOZERBOT 1.0.1 FINAL released ;] last bugs kinked out (i hope) and lots of docs updates (see http://gozerbot.org) downloadable at http://gozerbot.googlecode.com or use easy_install gozerbot or run hg clone http://gozerbot.googlecode.com/hg mybot Below a cool animation of the GOZERBOT code

Re: String interning in Python 3 - missing or moved?

2012-01-23 Thread Chris Rebert
On Mon, Jan 23, 2012 at 4:38 PM, Chris Angelico ros...@gmail.com wrote: Python 2 can intern 'str' (bytes) strings (with the eponymous builtin, and with C API functions), though not unicode. Python 3 does not have that builtin, nor the C API; I can't find any support for either str or bytes.

Re: Parsing a serial stream too slowly

2012-01-23 Thread M.Pekala
On Jan 23, 6:49 pm, Cameron Simpson c...@zip.com.au wrote: On 23Jan2012 13:48, M.Pekala mcdpek...@gmail.com wrote: | Hello, I am having some trouble with a serial stream on a project I am | working on. I have an external board that is attached to a set of | sensors. The board polls the

Re: String interning in Python 3 - missing or moved?

2012-01-23 Thread Chris Angelico
On Tue, Jan 24, 2012 at 1:25 PM, Chris Rebert c...@rebertia.com wrote: The former, into `sys`: http://docs.python.org/dev/library/sys.html#sys.intern Search the What's News in the future. http://docs.python.org/release/3.1.3/whatsnew/3.0.html#builtins Doh, should have checked. Thanks! ChrisA

Re: while True or while 1

2012-01-23 Thread Steven D'Aprano
On Mon, 23 Jan 2012 20:50:11 +, Andrea Crotti wrote: while 1 works because the 1 is converted to boolean automatically, but why not just writing a boolean in the first place? You have misunderstood Python's truth model. It is similar to languages like Javascript and PHP, where EVERY

Re: problems with tkinter updates

2012-01-23 Thread Dave Angel
On 01/23/2012 08:09 PM, y...@zioup.com wrote: I'm missing something about tkinter updates. How can I give tkinter a chance to run? Here's some code: import time import tkinter import tkinter.scrolledtext tk = tkinter.Tk() f = tkinter.Toplevel(tk) st = tkinter.scrolledtext.ScrolledText(f)

Re: String interning in Python 3 - missing or moved?

2012-01-23 Thread Terry Reedy
On 1/23/2012 9:25 PM, Chris Rebert wrote: On Mon, Jan 23, 2012 at 4:38 PM, Chris Angelicoros...@gmail.com wrote: Python 2 can intern 'str' (bytes) strings (with the eponymous builtin, and with C API functions), though not unicode. Python 3 does not have that builtin, nor the C API; I can't

Re: String interning in Python 3 - missing or moved?

2012-01-23 Thread Chris Angelico
On Tue, Jan 24, 2012 at 3:18 PM, Terry Reedy tjre...@udel.edu wrote: I think that the devs decided that interning is a minor internal optimization that users generally should not fiddle with (especially how that so much is done automatically anyway*), while having it a builtin made it look

Re: Parsing a serial stream too slowly

2012-01-23 Thread Steven D'Aprano
On Tue, 24 Jan 2012 10:49:41 +1100, Cameron Simpson wrote: | def OnSerialRead(self, event): | text = event.data | self.sensorabuffer = self.sensorabuffer + text | self.sensorbbuffer = self.sensorbbuffer + text | self.sensorcbuffer = self.sensorcbuffer + text Slow and

The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Rick Johnson
Here is a grep from the month of September 2011 showing the rampantly egregious misuse of the following words and phrases: * pretty * hard * right * used to * supposed to Pretty is the most ludicrous of them all! As you will see, pretty is used superfluously, over and over again! In fact,

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Evan Driscoll
On 1/23/2012 23:57, Rick Johnson wrote: Of course, used to and supposed to will require people to rethink there lazy and slothful ways. I'll go repent in the corner, over their. signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Steven D'Aprano
On Mon, 23 Jan 2012 21:57:16 -0800, Rick Johnson wrote: Here is a grep from the month of September 2011 showing the rampantly egregious misuse of the following words and phrases: * pretty * hard * right * used to * supposed to I'm pretty sure that this news group is supposed to be for

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Rodrick Brown
On Tue, Jan 24, 2012 at 1:06 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 23 Jan 2012 21:57:16 -0800, Rick Johnson wrote: Here is a grep from the month of September 2011 showing the rampantly egregious misuse of the following words and phrases: * pretty *

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Chris Angelico
On Tue, Jan 24, 2012 at 4:57 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: Here is a grep from the month of September 2011... Is it? Interesting. I met that month yesterday (she was shopping in Oakleigh, don't ask) and she knew nothing about it. Oh, did you mean Here is the result of

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Andrew Berg
You're right, but it's pretty hard for some people to do what they're supposed to when it isn't what they're used to. -- CPython 3.2.2 | Windows NT 6.1.7601.17640 -- http://mail.python.org/mailman/listinfo/python-list

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Ian Kelly
On Mon, Jan 23, 2012 at 10:57 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: Here is a grep A grep? What is a grep? That word is not in any of my dictionaries. Are you perhaps carelessly invoking the neologism of referring to an execution of the grep UNIX program as a grep? from the

Re: problems with tkinter updates

2012-01-23 Thread yves
On 2012-01-23 20:57, Dave Angel wrote: You have it backward. The question is not what you do inside your loop to give tk a chance, but rather what do you do to make tk give you a chance. tk doesn't start till you make the mainloop() method call, and once you call that method, it won't return

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread alex23
On Jan 24, 4:05 pm, Evan Driscoll edrisc...@wisc.edu wrote: On 1/23/2012 23:57, Rick Johnson wrote: Of course, used to and supposed to will require people to rethink there lazy and slothful ways. I'll go repent in the corner, over their. You forget, Rick's errors are genuine mistakes that

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-23 Thread Chris Angelico
On Tue, Jan 24, 2012 at 5:53 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jan 23, 2012 at 10:57 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: Here is a grep A grep?  What is a grep? According to the damage type table on Aardwolf MUD, a grep is a type of slash - at least, it's

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-23 Thread alex23
On Jan 24, 4:56 am, 8 Dihedral dihedral88...@googlemail.com wrote: 在 2012年1月23日星期一UTC+8上午2时01分11秒,Robert Kern写道:    [line.strip('\n') for line in f] This is more powerful by turning an object to be iterable. But the list comprehension violates the basic operating principle of the

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-23 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: +1 for splitting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966 ___ ___ Python-bugs-list

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: IMO, the behaviour is fine; it's the docs that are unclear. The rules for Decimal are different mainly because trailing zeros have meaning for the Decimal type. (Decimal('1.250') and Decimal('1.25') are two distinct Decimal objects,

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Ah no, I take it back. I think (2) is fine---this is the usual preservation of trailing zeros where possible. (1) needs to be fixed (and issue #7094 was left open waiting for this fix). -- ___

[issue6210] Exception Chaining missing method for suppressing context

2012-01-23 Thread Catalin Iacob
Changes by Catalin Iacob iacobcata...@gmail.com: -- nosy: +catalin.iacob ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6210 ___ ___

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-23 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: +1 for Nick's suggested breakout: 4.6 Sequence Types - list, tuple, range 4.7 Text Sequence Type - str 4.8 Binary Data Sequence Types - bytes, bytearray, memoryview -- nosy: +rhettinger

[issue13793] hasattr, delattr, getattr fail with unnormalized names

2012-01-23 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I concur with Benjamin on all counts. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13793 ___

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-01-23 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13797 ___ ___

[issue9625] argparse: Problem with defaults for variable nargs

2012-01-23 Thread Michał M .
Michał M. pyt...@michalski.im added the comment: Of course I've made a mistake: list for user provided or list for default should be: list for user provided or STRING for default -- ___ Python tracker rep...@bugs.python.org

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I also found that under Python 2.x, even a low-level exit like os._exit or multiprocessing.win32.ExitProcess, called from within a user-level function in the child, caused flushing. The difference is the following: - Python 2.x uses C stdio

[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-23 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com added the comment: Thanks for the quick reply. FWIW, in 2.7 doc ctype.create_string_buffer is said to accept unicode objects as parameter. I don't use this personally, so I don't mind 3.x only working on bytes - and already fixed my code accordingly.

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Georg, thanks for the tip. Is there any difference in reST between *i*\ th and *i*\th ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816

[issue13816] Two typos in the docs

2012-01-23 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: You can check on the devguide the section about building the doc and see it yourself on the generated HTML. While building you will also see all the warnings caused by invalid markup. -- ___

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Dave Malcolm wrote: Dave Malcolm dmalc...@redhat.com added the comment: On Fri, 2012-01-06 at 12:52 +, Marc-Andre Lemburg wrote: Marc-Andre Lemburg m...@egenix.com added the comment: Demo patch implementing the collision limit

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alex Gaynor wrote: I'm able to put N pieces of data into the database on successive requests, but then *rendering* that data puts it in a dictionary, which renders that page unviewable by anyone. I think you're asking a bit much here :-)

[issue13703] Hash collision security issue

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Frank's example is an attack on the second possible way to trigger the O(n^2) behavior. See msg150724 further above where I listed the two possibilities: An attack can be based on trying to find many objects with the same hash value, or

[issue13703] Hash collision security issue

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: With an collision counting exception you'd get a clear notice that something in your data and your application is wrong and needs fixing. The rest of your web app will continue to work fine Except when it doesn't, because you've also broken

  1   2   >