Re: How do I say "two classes up in the inheritance chain" in python?

2009-01-27 Thread Duncan Booth
Daniel Fetchinson wrote: > > class child1( parent1 ): > def meth( self ): > # do something c > super( parent1, self ).meth( ) # I want to invoke meth on > grandparent So just call: grandparent.meth(self) If you want to ignore the inheritance hierarchy then

Re: optparse with numpy.array?

2009-01-27 Thread Johan Ekh
Thanks, James I will try your suggestion! Robert, what mean with "interactively" is that i would like to create an array in the ipython shell, e.g. with m_i = array([1.0, 2.0, 3.0]) or by reading a file with values etc., and then execute my program with "myprog -m m_i" and thus pass the array "m_i"

Re: How do I say "two classes up in the inheritance chain" in python?

2009-01-27 Thread Ben Finney
Daniel Fetchinson writes: > The meth methods in child1 and child2 are the same, except that in > the last super call, one is referring to parent1, the other is > referring to parent2. It's important to learn that, in a language with multiple inheritance, “superclass of this instance” is *not* th

Re: How do I say "two classes up in the inheritance chain" in python?

2009-01-27 Thread Bruno Desthuilliers
Daniel Fetchinson a écrit : I have two classes that both inherit from two other classes which both inherit from a single class. The two children have two almost identical methods: class grandparent( object ): def meth( self ): # do something class parent1( grandparent ): def met

Re: Counting number of objects

2009-01-27 Thread Kottiyath
Thank you everyone for your very helpful comments and suggestions. I have interacted in other newsgroups, but this is the most helpful of them all. As per the comments, I have now decided to go with the weakref mechanism - as per Andreas suggestion, functionally it looks correct that the person sh

How to get text from a surface

2009-01-27 Thread gopal mishra
Hi, I am loading an image into pygame. i am trying to get the text from the surface. I used pyTesser to read the text from a surface/image but if the font size of the text is less then 16, it doesn't give me back the correct text from the surface. Is there any other way to get the text f

Re: I'm a python addict !

2009-01-27 Thread Bruno Desthuilliers
Paul McGuire a écrit : On Jan 26, 10:54 am, "J. Cliff Dyer" wrote: On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote: Want to change the type/behavior of an object from class A to class B? How about this: aobj = A() aobj.__class__ = B Try *that* in as simple-looking C++ or Java!

Re: unittest, order of test execution

2009-01-27 Thread Yinon Ehrlich
> But I was wondering, *should* this test be separated into two unit > tests, one for each function? On the face of it, it looks that's how it > should be done. > > This, however, raises the question: what's the order of test execution > in the unittest? And how to pass values between unit tests?

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Bruno Desthuilliers
Russ P. a écrit : On Jan 26, 1:07 am, Bruno Desthuilliers wrote: No. I can change the *team's* code. Please *read*. "team's ownership", ok ? Or do I have to spell it out loud ? TEAM'S OWNERSHIP. Uh. You get the message, now ? Team ownership doesn't necessarily mean that you can just change c

Re: unittest, order of test execution

2009-01-27 Thread Yinon Ehrlich
On Jan 27, 11:33 am, Yinon Ehrlich wrote: > > But I was wondering, *should* this test be separated into two unit > > tests, one for each function? On the face of it, it looks that's how it > > should be done. > > > This, however, raises the question: what's the order of test execution > > in the u

Calling Python-tk code from C/C++

2009-01-27 Thread Rajorshi Biswas
Hello all, This is my first post to this mailing list. Our requirement is to invoke a Tkinter python panel from a C++ GUI app where both GUI windows would run in 2 separate threads. We have written a sample PyQt application which calls this Tk panel using something like this:class TkPanel(threa

Re: optparse question

2009-01-27 Thread Thorsten Kampe
* Pat (Mon, 26 Jan 2009 20:02:59 -0500) > Up until today, I never needed to pass any arguments to a Python > program. > [...] > getopt resolved my immediate need, but I would like to know how one > could use optparse to extract out the options from something like "dir > /s /b". If you actually r

socket.unbind or socket.unlisten? - socket.error: (48, 'Address already in use')

2009-01-27 Thread Laszlo Nagy
I have a program that uses socket.bind() and socket.listen() frequently. After that program stops, it is not able to bind() again for a while: File "/home/gandalf/Python/Lib/orb/accesspoints/srvtcp.py", line 27, in __init__ self.serversocket.bind((self.listen_address,self.port)) File "", l

Re: Iterating through a file significantly slower when file has big buffer

2009-01-27 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 pyt...@bdurham.com wrote: > The following tests were run on a Windows XP system using Python 2.6.1 Unless you changed the defaults, the Windows XP system cache size is 10MB. When you use a larger read size, chances are it is blowing out that cache an

Re: USB in python

2009-01-27 Thread Lie Ryan
On Mon, 26 Jan 2009 11:08:48 -0600, Unknown wrote: > On 2009-01-26, Lie Ryan wrote: > >> How about (a crazy idea) using the audio jack out? (DISCLAIMER: Little >> Hardware Experience). High pitched sound (or anything in sound-ology >> that means high voltage) means the device is on and low pitch

Re: practical limits of urlopen()

2009-01-27 Thread Lie Ryan
On Sat, 24 Jan 2009 09:17:10 -0800, webcomm wrote: > Hi, > > Am I going to have problems if I use urlopen() in a loop to get data > from 3000+ URLs? There will be about 2KB of data on average at each > URL. I will probably run the script about twice per day. Data from > each URL will be saved

C-Python API problem

2009-01-27 Thread Rajorshi Biswas
Hi, I was trying out the sample program to load a python script from C in the Python tutorial at http://docs.python.org/extending/embedding.html (Section: Pure Embedding).Usage: call pythonfile funcname [args] When running this script, I can run things like the following:call mytest foobut not a

OpenGL in TK

2009-01-27 Thread Almar Klein
Hi list! I am using pyOpenGL to do some 3D rendering. For now I am quite happy with the GLCanvas of wx, but I may want to publish some stuff later, and it would be nice if people would not need wx. I found that there used to be a TK widget called Togl, but it is not (anymore?) included in the TK

Re: Plugin system, RuntimeWarning: Parent module 'ext_abc' not found while handling absolute import

2009-01-27 Thread Gabriel Genellina
En Mon, 26 Jan 2009 17:06:20 -0200, Torsten Mohr escribió: So mymodule is actually a package. Packages should *not* appear in sys.path. Oh, how does it find modules then? I thought that would be PYTHONPATH or sys.path ? The directory CONTAINING file "foo.py" must be in sys.path if you want

Class behaving like a static class

2009-01-27 Thread gu
Hi to all, i have a module (a single .py file, actually), with a class called HashedDir. when i import the file and instanciate 2 instances of that class, when i check the object's fields they're always the same, even if the two objects should be different. Eg: h1 = HashedDir('someValue')

Re: USB in python

2009-01-27 Thread Muriel de Souza Godoi
Some people got success in Arduindo using an older mobile cable which works as USB/Serial converters. So you can read and write data as a serial port using pyserial. On Tue, Jan 27, 2009 at 8:31 AM, Lie Ryan wrote: > On Mon, 26 Jan 2009 11:08:48 -0600, Unknown wrote: > > > On 2009-01-26, Lie Rya

Re: Process crash with no reason

2009-01-27 Thread gil . shinar
On Jan 26, 8:40 pm, Philip Semanchuk wrote: > On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: > > > Hi All, > > > I'm running a program that is acting as a nice interface to sybase' > > replication server. The program is using the cherrypy web service for > > the GUI. The process is crash

Re: Class behaving like a static class

2009-01-27 Thread Bruno Desthuilliers
gu a écrit : Hi to all, i have a module (a single .py file, actually), with a class called HashedDir. when i import the file and instanciate 2 instances of that class, when i check the object's fields they're always the same, even if the two objects should be different. Eg: h1 = HashedDir

Re: Process crash with no reason

2009-01-27 Thread Tim Golden
gil.shi...@gmail.com wrote: On Jan 26, 8:40 pm, Philip Semanchuk wrote: On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: Hi All, I'm running a program that is acting as a nice interface to sybase' replication server. The program is using the cherrypy web service for the GUI. The proce

Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use')

2009-01-27 Thread Hendrik van Rooyen
"Laszlo Nagy" wrote: > I have a program that uses socket.bind() and socket.listen() frequently. > After that program stops, it is not able to bind() again for a while: > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) This does t

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Giampaolo Rodola'
On 26 Gen, 19:16, jefm wrote: > Hi, > while checking out Python 3, I read that all text strings are now > natively Unicode. > In the Python language reference (http://docs.python.org/3.0/reference/ > lexical_analysis.html) I read that I can show Unicode character in > several ways. > "\u" supp

Re: optparse question

2009-01-27 Thread Pat
If you mean with "/" as the option designator instead of "-": there doesn't appear to be a documented way of doing it. You would have to do some social engineering on the users to get them used to doing "dir -s -b". In any case I thought the number of Windows users who know how to fire up a Com

Re: optparse question

2009-01-27 Thread Pat
Thorsten Kampe wrote: * Pat (Mon, 26 Jan 2009 20:02:59 -0500) Up until today, I never needed to pass any arguments to a Python program. [...] getopt resolved my immediate need, but I would like to know how one could use optparse to extract out the options from something like "dir /s /b". If

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Denis Kasak
On Tue, Jan 27, 2009 at 1:52 PM, Giampaolo Rodola' wrote: > I have this same issue on Windows. > Note that on Python 2.6 it works: > > Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information.

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Stephen Hansen
> > Note that on Python 2.6 it works: > > Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> print unicode('\u20ac') > \u20ac > Note that in Python 2.6 it expressly *does not* work

Re: optparse question

2009-01-27 Thread John Machin
On Jan 28, 12:06 am, Pat wrote: > Thorsten Kampe wrote: > > * Pat (Mon, 26 Jan 2009 20:02:59 -0500) > >> Up until today, I never needed to pass any arguments to a Python > >> program. > >> [...] > >> getopt resolved my immediate need, but I would like to know how one > >> could use optparse to ext

Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Address already in use')

2009-01-27 Thread Jean-Paul Calderone
On Tue, 27 Jan 2009 10:49:03 +0100, Laszlo Nagy wrote: I have a program that uses socket.bind() and socket.listen() frequently. After that program stops, it is not able to bind() again for a while: File "/home/gandalf/Python/Lib/orb/accesspoints/srvtcp.py", line 27, in __init__ self.serve

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread John Machin
On Jan 27, 11:52 pm, "Giampaolo Rodola'" wrote: > On 26 Gen, 19:16, jefm wrote: > > > > > Hi, > > while checking out Python 3, I read that all text strings are now > > natively Unicode. > > In the Python language reference (http://docs.python.org/3.0/reference/ > > lexical_analysis.html) I read t

A Twisted Design Decision

2009-01-27 Thread koranthala
Twisted, being twisted in its behavior is causing quite a lot of confusion in design decisions. I will put forward a comparison of reactor and non-reactor patterns. The code is not exact - whatever is shown is the gist of it. For example, a message handler - in a usual scenario: class messageHand

Re: A Twisted Design Decision

2009-01-27 Thread Jean-Paul Calderone
On Tue, 27 Jan 2009 05:46:25 -0800 (PST), koranthala wrote: Twisted, being twisted in its behavior is causing quite a lot of confusion in design decisions. I'm not sure I agree with your premise. ;) I will put forward a comparison of reactor and non-reactor patterns. The code is not exact -

Re: print formating for matrix/table

2009-01-27 Thread Alan G Isaac
You could try SimpleTable: http://code.google.com/p/econpy/source/browse/trunk/utilities/text.py fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Python-URL! - weekly Python news and links (Jan 27)

2009-01-27 Thread Gabriel Genellina
QOTW: "Whatever sufficiently sophisticated topic was ... initially discussed it ends all up in a request for removing reference counting and the GIL." - Kay Schluehr http://groups.google.com/group/comp.lang.python/msg/6a152ff76cf313ff Looking for a different kind of (editor|environme

Re: Doc for extended call syntax; was: Re: unzip array of arrays?

2009-01-27 Thread Bryan Olson
Mark Wooding wrote: Steve Holden writes: No, you aren't mistaken. Looking at the "*" symbol in the 2.6 documentation index it lists only two references. The first is the language manual's explanation of its use in the def statement, the second is a transitory reference to its use in function ca

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Luis Zarrabeitia
On Tuesday 27 January 2009 04:39:02 am Bruno Desthuilliers wrote: > Still not. But it's interesting to note that you consider everyone > disagreeing with you as basically the same person. Hehe. At the beginning of this thread, I also thought that Russ P. and Paul Robin were the same person. I hav

Re: is None vs. == None

2009-01-27 Thread J. Cliff Dyer
On Fri, 2009-01-23 at 19:31 -0500, Benjamin Kaplan wrote: > > > On Fri, Jan 23, 2009 at 7:28 PM, Gary Herron > wrote: > Steven D'Aprano wrote: > > On Fri, 23 Jan 2009 14:58:34 -0500, Gerald Britton wrote: > > > > > >> Hi -- Some time ago I ran across a co

Re: Process crash with no reason

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 7:00 AM, gil.shi...@gmail.com wrote: On Jan 26, 8:40 pm, Philip Semanchuk wrote: On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: Hi All, I'm running a program that is acting as a nice interface to sybase' replication server. The program is using the cherrypy

How many followers of comp.lang.python

2009-01-27 Thread rantingrick
I curious of how many are "really" out there. I have been watching the list for some time but basically see the same 10 or so people answering questions. Reply to this message so we can see how many exists here Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
On Jan 27, 9:07 am, rantingrick wrote: > I curious of how many are "really" out there. I have been watching the > list for some time but basically see the same 10 or so people > answering questions. > > Reply to this message so we can see how many exists here > > Thanks I'm not sure how you arriv

Re: How many followers of comp.lang.python

2009-01-27 Thread rantingrick
I also looked at Guido's profile and he has not posted a message here since 2000. WOW! I know he way ahead of "us" here but why has he not drooped in for a chat with the python community? Matz(the creator of Ruby), is a regular at comp.lang.ruby. This makes me wonder if Guido thinks comp.lang.pyt

creating a pattern using a previous match and a count of the number of '('s in it

2009-01-27 Thread me
I'm new to regexs and trying to get a list of all my C++ methods with balanced parenthesis as follows. #find all c++ method prototypes with a '::' in the middle #upto and including the 1st closing parenthesis pattern_upto_1st_closed_parenth = re.compile('\w+::\w+\([^)]*\)') match_upto_1st_cl

Re: Process crash with no reason

2009-01-27 Thread gil . shinar
On Jan 27, 2:10 pm, Tim Golden wrote: > gil.shi...@gmail.com wrote: > > On Jan 26, 8:40 pm, Philip Semanchuk wrote: > >> On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: > > >>> Hi All, > >>> I'm running a program that is acting as a nice interface to sybase' > >>> replication server. The

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Bryan Olson
Paul Rubin wrote: Bryan Olson writes: An object's __dict__ slot is *not* mutable; thus we could gain some efficiency by protecting the object and its dict with the same lock. I do not see a major win in Mr. Banks' point that we do not need to lock the object, just its dict. If the dict conten

Re: Process crash with no reason

2009-01-27 Thread gil . shinar
On Jan 27, 5:00 pm, Philip Semanchuk wrote: > On Jan 27, 2009, at 7:00 AM, gil.shi...@gmail.com wrote: > > > > > On Jan 26, 8:40 pm, Philip Semanchuk wrote: > >> On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: > > >>> Hi All, > > >>> I'm running a program that is acting as a nice interfa

Re: How many followers of comp.lang.python

2009-01-27 Thread rantingrick
Seems like the only thing people are interested in is bickering and name calling. I noticed the post "Does Python really follow..." has over 400 post mainly from the same 10 people. Maybe this is why Guido no longer wishes to be a part of this group. Where is the sense of community here? Anybody c

Re: How many followers of comp.lang.python

2009-01-27 Thread Mike Driscoll
On Jan 27, 9:17 am, rantingrick wrote: > I also looked at Guido's profile and he has not posted a message here > since 2000. WOW! I know he way ahead of "us" here but why has he not > drooped in for a chat with the python community? Matz(the creator of > Ruby), is a regular at comp.lang.ruby. > >

Re: How many followers of comp.lang.python

2009-01-27 Thread Benjamin Kaplan
On Tue, Jan 27, 2009 at 10:42 AM, rantingrick wrote: > Seems like the only thing people are interested in is bickering and > name calling. I noticed the post "Does Python really follow..." has > over 400 post mainly from the same 10 people. Maybe this is why Guido > no longer wishes to be a part

Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Address already in use')

2009-01-27 Thread Hendrik van Rooyen
"Jean-Paul Calderone" wrote: 8<-- > ... Setting the > SO_REUSEADDR flag on POSIX fixes this problem (don't set it on Windows, > though). Why not? I have been merrily setting it, and I have not noticed anything weird. (yet) - Hendrik -- http://mail.python.org

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Hendrik van Rooyen
"Luis Zarrabeitia" wrote: 8< >Hehe. At the beginning of this thread, I also thought that Russ P. and Paul >Robin were the same person. I have serious problems with names. *nods in agreement, because the man's surname is Rubin, not Robin* :-) - Hendrik -- http://mail.

Re: creating a pattern using a previous match and a count of the number of '('s in it

2009-01-27 Thread MRAB
me wrote: I'm new to regexs and trying to get a list of all my C++ methods with balanced parenthesis as follows. #find all c++ method prototypes with a '::' in the middle #upto and including the 1st closing parenthesis pattern_upto_1st_closed_parenth = re.compile('\w+::\w+\([^)]*\)') matc

Re: Process crash with no reason

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 10:34 AM, gil.shi...@gmail.com wrote: On Jan 27, 2:10 pm, Tim Golden wrote: gil.shi...@gmail.com wrote: On Jan 26, 8:40 pm, Philip Semanchuk wrote: On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: Hi All, I'm running a program that is acting as a nice interfa

Re: How many followers of comp.lang.python

2009-01-27 Thread rantingrick
On Jan 27, 9:43 am, Mike Driscoll wrote: > I think Guido has better things to do...and his employer probably > doesn't want him spending all day answering stuff like that. > Mike I totally agree, and i would never expect him to field noob questions but i just thought it odd he has not dropped by

Re: USB in python

2009-01-27 Thread Grant Edwards
On 2009-01-27, Lie Ryan wrote: > From the little I know on electronics, a simple, single > transistor would (almost) immediately switch from > on-to-off-to-on depending on the voltage of the control pin (I > think it was the middle pin). I was suggesting this > simplistic hack because as far as

Re: How many followers of comp.lang.python

2009-01-27 Thread Bruno Desthuilliers
rantingrick a écrit : On Jan 27, 9:43 am, Mike Driscoll wrote: I think Guido has better things to do...and his employer probably doesn't want him spending all day answering stuff like that. Mike I totally agree, and i would never expect him to field noob questions but i just thought it odd h

Re: How many followers of comp.lang.python

2009-01-27 Thread Bruno Desthuilliers
rantingrick a écrit : Seems like the only thing people are interested in is bickering and name calling. I noticed the post "Does Python really follow..." has over 400 post mainly from the same 10 people. There are occasionally such kind of threads, indeed. And, as Mike mentionned, the usual FA

Re: A Twisted Design Decision

2009-01-27 Thread koranthala
On Jan 27, 6:57 pm, Jean-Paul Calderone wrote: > On Tue, 27 Jan 2009 05:46:25 -0800 (PST), koranthala > wrote: > >Twisted, being twisted in its behavior is causing quite a lot of > >confusion in design decisions. > > I'm not sure I agree with your premise. ;) > > > > >I will put forward a compar

Pexpect and telnet not communicating properly

2009-01-27 Thread David Anderson
I am trying to automate the following session - to talk to my router: === telnet speedtouch Trying 192.168.1.254... Connected to speedtouch. Escape character is '^]'. Username : Administrator Password :

Re: v = json.loads("{'test':'test'}")

2009-01-27 Thread J. Cliff Dyer
On Sun, 2009-01-25 at 14:28 -0800, gert wrote: > On Jan 25, 11:16 pm, Дамјан Георгиевски wrote: > > > raise ValueError(errmsg("Expecting property name", s, end)) > > >http://docs.python.org/library/json.html > > > What am I doing wrong ? > > > > try this > > v = json.loads('{"test":"test"}') > >

Re: Counting number of objects

2009-01-27 Thread Scott David Daniels
Kottiyath wrote: So, in a higher level class, have a weakref list which contains a reference to each person. Total count will be len(list) at any time. Now, I couldnt find a weakref list - so I am using WeakKeyDictionary with the value as None - since len(dict) also should give me the data I ty

[xlrd] sanitize the output and store in a 2d arrays

2009-01-27 Thread Jay Jesus Amorin
Hi gurus, Script: #!/usr/bin/python import xlrd, sys def main(toParse): workBook = xlrd.open_workbook(toParse) mySheet = workBook.sheet_by_index(0) for rownum in range(mySheet.nrows): print mySheet.row_values(rownum) if __name__ == '__main__': if len(sys.argv) < 2:

Re: Doc for extended call syntax; was: Re: unzip array of arrays?

2009-01-27 Thread Mark Wooding
Bryan Olson writes: > Mark Wooding wrote: >> There's a full description of it in 5.4.3 in the Language Reference, but >> apparently not indexed. > > So I guess this means I can duck out of writing up a lecture on my own > understanding of Python's extended call syntax. Great. > > I think I grock

significant release for SIMPL project's Python extension

2009-01-27 Thread bobicanprogram
The SIMPL project (http://www.icanprogram.com/simpl) aims to bring the simplicity and power of the Send/Receive/Reply messaging (first pioneered by QNX) to the Linux world. SIMPL modules are themselves Linux executables and can be written in any number of languages now (C, C++, Tcl/Tk and Python

Re: Pexpect and telnet not communicating properly

2009-01-27 Thread George Trojan
David Anderson wrote: I am trying to automate the following session - to talk to my router: === telnet speedtouch Trying 192.168.1.254... Connected to speedtouch. Escape character is '^]'. Username : Administrator Password : ---

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-27 Thread Michele Simionato
On Jan 21, 2:11 am, Mark Wooding wrote: > CLOS is much more complex and dynamic than Python's object system; > but it > can be compiled very aggressively. I agree that CLOS is complex and that it can be compiled very aggressively, but I do not think that it is more dynamic than Python. What fea

Re: How many followers of comp.lang.python

2009-01-27 Thread Cameron Laird
In article <8692c77c-0498-4c68-940f-e4d4427f3...@x37g2000yqj.googlegroups.com>, rantingrick wrote: >Seems like the only thing people are interested in is bickering and >name calling. I noticed the post "Does Python really follow..." has >over 400 post mainly from the same 10 people. Maybe this is

Re: v = json.loads("{'test':'test'}")

2009-01-27 Thread Richard Brodie
"Steven D'Aprano" wrote in message news:018d0300$0$20629$c3e8...@news.astraweb.com... > Supposedly "every browser" (what, all of them?) already support a de > facto extension to the JSON standard, allowing more flexible quoting. That's a consequence of JSON being a subset of Javascript syntax,

Re: How many followers of comp.lang.python

2009-01-27 Thread Grant Edwards
On 2009-01-27, Bruno Desthuilliers wrote: > Please visit comp.databases or comp.lang.javascript for really > unfriendly and unhelpful places where few happens except > "bickering and name-calling". I've always found comp.lang.c to be a rather dangerous place as well. Of the newsgroups I read,

Exec woes

2009-01-27 Thread Hendrik van Rooyen
It starts with the conspiracy of silence at the interactive prompt: Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. IDLE 1.1.3 No Subprocess >>> help(exec) SyntaxError: invalid synt

Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Address already in use')

2009-01-27 Thread Mark Wooding
Laszlo Nagy writes: > I have a program that uses socket.bind() and socket.listen() > frequently. After that program stops, it is not able to bind() again for a > while: This is the usual TIME-WAIT problem. The TCP protocol requires one end of the connection (whichever actually started the close

IDLE 3000 (suggested improvements)

2009-01-27 Thread r
Proposal: OK, so the python language has officially moved into the next level. I look at IDLE and think, hmm great IDE but it could really use a spit shining. So here is a very simple script showing my ideas to improve IDLE. Reason for change: The text widget and the prompt(>>>) should be separate

regular expression, help

2009-01-27 Thread Vincent Davis
I think there are two parts to this question and I am sure lots I am missing. I am hoping an example will help meI have a html doc that I am trying to use regular expressions to get a value out of. here is an example or the line Parcel ID: 39-034-15-009 I want to get the number "39-034-15-009" aft

regular expression, help

2009-01-27 Thread Vincent Davis
I think there are two parts to this question and I am sure lots I am missing. I am hoping an example will help meI have a html doc that I am trying to use regular expressions to get a value out of. here is an example or the line Parcel ID: 39-034-15-009 I want to get the number "39-034-15-009" aft

Re: Calling Python-tk code from C/C++

2009-01-27 Thread Gabriel Genellina
En Tue, 27 Jan 2009 07:42:01 -0200, Rajorshi Biswas escribió: Hello all, This is my first post to this mailing list. Our requirement is to invoke a Tkinter python panel from a C++ GUI app where both GUI windows would run in 2 separate threads. We have written a sample PyQt application wh

Re: Exec woes

2009-01-27 Thread Christian Heimes
Hendrik van Rooyen schrieb: > It starts with the conspiracy of silence at the interactive prompt: > > Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. > > IDLE 1.1.3 No Subprocess >

Re: optparse question

2009-01-27 Thread Thorsten Kampe
* John Machin (Tue, 27 Jan 2009 05:31:42 -0800 (PST)) > Nobody is upset, and nobody has "gone off on a tear". The point about > the "Windows example" is that the docs say in a close-to-screamingly- > obvious manner that /options are not supported, no matter what > religion uses them. It was not, an

Re: optparse with numpy.array?

2009-01-27 Thread Steve Holden
Johan Ekh wrote: > Thanks, > James I will try your suggestion! > Robert, what mean with "interactively" is that i would like to create an > array in the ipython shell, e.g. with m_i = array([1.0, 2.0, 3.0]) or > by reading a file with values etc., and then execute my program with > "myprog -m m_i"

Re: How many followers of comp.lang.python

2009-01-27 Thread Vincent Davis
Being a newbie and not aware of other good places to ask dump questions. I have been very happy with the help I have gotten. Some of the other discussions are a little interesting to me but I wonder/am grateful if these keep the knowledgeable people around so us newbies can ask questions. Since I a

Re: regular expression, help

2009-01-27 Thread Vincent Davis
is BeautifulSoup really better? Since I don't know either I would prefer to learn only one for now. Thanks Vincent Davis On Tue, Jan 27, 2009 at 10:39 AM, MRAB wrote: > Vincent Davis wrote: > >> I think there are two parts to this question and I am sure lots I am >> missing. I am hoping an exa

change syntax coloring in IDLE

2009-01-27 Thread Vincent Davis
I am using mac with python 2.5.2 and IDLE verison 1.2.2. in the help it states I can change he text coloring by using "Configure IDLE" but I not sure what this is. It's not sn the menu, running Configure does nothing. How do I change the color (text and background) Thanks Vincent Davis -- http://ma

Re: Exec woes

2009-01-27 Thread Chris Rebert
On Tue, Jan 27, 2009 at 9:34 AM, Christian Heimes wrote: > Hendrik van Rooyen schrieb: >> It starts with the conspiracy of silence at the interactive prompt: >> >> Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on >> win32 >> Type "copyright", "credits" or "license()" for m

Re: regular expression, help

2009-01-27 Thread MRAB
Vincent Davis wrote: I think there are two parts to this question and I am sure lots I am missing. I am hoping an example will help me I have a html doc that I am trying to use regular expressions to get a value out of. here is an example or the line Parcel ID: 39-034-15-009 I want to get the

Re: How do I say "two classes up in the inheritance chain" in python?

2009-01-27 Thread Daniel Fetchinson
>> I have two classes that both inherit from two other classes which both >> inherit from a single class. The two children have two almost >> identical methods: >> >> class grandparent( object ): >> def meth( self ): >> # do something >> >> class parent1( grandparent ): >> def meth(

Re: Exec woes

2009-01-27 Thread Stephen Hansen
> IDLE 1.1.3 No Subprocess > >>> help(exec) > SyntaxError: invalid syntax > >>> > Its the same under Linux SuSe, Python 2.5.1. > > I think this is a BUG. > Exec is a statement, not a function nor an object: even though you can enclose parens around its arguments like you do later on

Re: How many followers of comp.lang.python

2009-01-27 Thread rantingrick
On Jan 27, 10:12 am, Bruno Desthuilliers wrote: > All you can say is that he didn't *post* here (at least under his real > identity...) for the 9 past years - this doesn't mean he never *reads* > (and this, you just have no way to know). Ah, this is a good point. You have to wonder, Guido could

Re: How many followers of comp.lang.python

2009-01-27 Thread Paul Rubin
Bruno Desthuilliers writes: > All you can say is that he didn't *post* here (at least under his real > identity...) for the 9 past years - this doesn't mean he never *reads* > (and this, you just have no way to know). Guido does post here once in a while, under his own name. I can't think of any

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Thorsten Kampe
* Giampaolo Rodola' (Tue, 27 Jan 2009 04:52:16 -0800 (PST)) > I have this same issue on Windows. > Note that on Python 2.6 it works: > > Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information

Re: A different kind of interface

2009-01-27 Thread BBands
PyScripter does it for me. http://code.google.com/p/pyscripter/ jab -- http://mail.python.org/mailman/listinfo/python-list

Re: How many followers of comp.lang.python

2009-01-27 Thread rantingrick
On Jan 27, 12:00 pm, Paul Rubin wrote: > Guido does post here once in a while, under his own name.  I can't > think of any very recent examples, but I can remember some from a few > years back. I searched the archives for "Guido van Rossum" and there is nothing since

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Thorsten Kampe
* Denis Kasak (Tue, 27 Jan 2009 14:22:32 +0100) > On Tue, Jan 27, 2009 at 1:52 PM, Giampaolo Rodola' > wrote: > > I have this same issue on Windows. > > Note that on Python 2.6 it works: > > > > Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit > > (Intel)] on > > win32 > > Type

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Steve Holden
Bryan Olson wrote: > Paul Rubin wrote: >> Bryan Olson writes: >>> An object's __dict__ slot is *not* mutable; thus we could gain some >>> efficiency by protecting the object and its dict with the same lock. I >>> do not see a major win in Mr. Banks' point that we do not need to lock >>> the object

pyAA for Python2.5

2009-01-27 Thread Kottiyath
Hi, I would like to obtain pyAA for Python 2.5. I went through their web site, but they provide the windows exe only for Python2.4. I tried compiling from source, but that also was to no avail - it errs out as follows: C:\Documents and Settings\Guest\pyAA>python setup.py install running install

Re: How many followers of comp.lang.python

2009-01-27 Thread Thorsten Kampe
* rantingrick (Tue, 27 Jan 2009 10:03:16 -0800 (PST)) > On Jan 27, 12:00 pm, Paul Rubin wrote: > > Guido does post here once in a while, under his own name.  I can't > > think of any very recent examples, but I can remember some from a few > > years back. > > I searc

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Denis Kasak
On Tue, Jan 27, 2009 at 7:08 PM, Thorsten Kampe wrote: > * Denis Kasak (Tue, 27 Jan 2009 14:22:32 +0100) >> On Tue, Jan 27, 2009 at 1:52 PM, Giampaolo Rodola' >> wrote: >> print unicode('\u20ac') >> > \u20ac >> >> Shouldn't this be >> >> print unicode(u'\u20ac') > > You are trying to crea

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Paul Rubin
Bryan Olson writes: > I'm a fan of lock-free data structure and software transactional > memory, but I'm also a realist. Heck, I'm one of this group's > outspoken advocates of threaded architectures. Theoretical > breakthroughs will happen, but in real world of today, threads are > great but GIL-l

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Martin v. Löwis
> #include "stdio.h" > int main(int argc, char **argv) { > printf("<\xc2\x80>\n"); > } > > compiled with mingw32 (gcc (GCC) 3.4.5 (mingw-vista special r3)) > and using "Lucida Console" font: > > After CHCP 1252, this prints < A-circumflex Euro >, as expected. > After CHCP 65001, it prints

Re: pyAA for Python2.5

2009-01-27 Thread Mike Driscoll
On Jan 27, 12:12 pm, Kottiyath wrote: > Hi, >    I would like to obtain pyAA for Python 2.5. I went through their > web site, but they provide the windows exe only for Python2.4. I tried > compiling from source, but that also was to no avail - it errs out as > follows: > > C:\Documents and Setting

  1   2   3   >