Recommend blogs for me to follow

2011-12-22 Thread Yaşar Arabacı
Hi, I am looking for some recommendations about blogs that I may like to follow. I am interested in Python (that goes without saying), django and server side web development in general, linux tools, and git scm. I am looking for blogs which shares short examples of codes, and hints about various t

Re: Idiom for shelling out to $EDITOR/$PAGER?

2011-12-22 Thread Devin Jeanpierre
> Anyway, look it up; it has an autodelete mode etc. The autodelete isn't useful in this context. The file needs to be closed and then reopened again; with the autodelete option, the closing would delete the file, preventing it from being opened by the text editor or reopened to check contents. (

Re: Idiom for shelling out to $EDITOR/$PAGER?

2011-12-22 Thread Cameron Simpson
On 23Dec2011 17:12, Ben Finney wrote: | Cameron Simpson writes: | > On 22Dec2011 22:16, Tim Chase wrote: | > | -proper & efficient detection of file-change, to know whether the | > | user actually did anything | > | > Wait for the editor to exit? | > In that scenario I go for: | > - wait for e

Re: Idiom for shelling out to $EDITOR/$PAGER?

2011-12-22 Thread Ben Finney
Cameron Simpson writes: > On 22Dec2011 22:16, Tim Chase wrote: > | -proper & efficient detection of file-change, to know whether the > | user actually did anything > > Wait for the editor to exit? > In that scenario I go for: > - wait for edit to exit > - if exit status 0 and file non-empty,

Re: what does 'a=b=c=[]' do

2011-12-22 Thread alex23
On Dec 23, 3:22 pm, Ian Kelly wrote: > Nobody is asking you to modify your coding style.  The request is that > you not throw it up as an example without mentioning the important > caveats. No, 100% no. It's not my responsibility to mention every potentially relevant gotcha when providing example

Re: Idiom for shelling out to $EDITOR/$PAGER?

2011-12-22 Thread Cameron Simpson
On 22Dec2011 22:16, Tim Chase wrote: | After a little searching, I've not been able to come up with what | I'd consider canonical examples of consider calling an external | editor/pager on a file and reading the results back in. (most of my | results are swamped by people asking about editors wri

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Ian Kelly
On Thu, Dec 22, 2011 at 8:40 PM, alex23 wrote: > On Dec 23, 12:59 pm, Ian Kelly wrote: >> It's only irrelevant in the immediate context of the code you posted. >> But when Joe Novice sees your code and likes it and duplicates it a >> million times > > I'm sorry, but I'm not going to modify my cod

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Eric
On Dec 21, 5:44 pm, Steven D'Aprano wrote: > Yes, you should create your lists before trying to append to them. > > But you aren't forced to use a for-loop. You can use a list comprehension: > > x = [some_function(a) for a in range(n)] > > Notice that here you don't need x to pre-exist, because t

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Chris Angelico
On Fri, Dec 23, 2011 at 2:40 PM, alex23 wrote: > I'm sorry, but I'm not going to modify my coding style for the sake of > bad programmers. And there, folks, you have one of the eternal dilemmas. The correct decision depends on myriad factors; if you're writing code to go into the documentation as

Idiom for shelling out to $EDITOR/$PAGER?

2011-12-22 Thread Tim Chase
After a little searching, I've not been able to come up with what I'd consider canonical examples of consider calling an external editor/pager on a file and reading the results back in. (most of my results are swamped by people asking about editors written in Python, or what the best editors f

Re: what does 'a=b=c=[]' do

2011-12-22 Thread alex23
On Dec 23, 12:59 pm, Ian Kelly wrote: > It's only irrelevant in the immediate context of the code you posted. > But when Joe Novice sees your code and likes it and duplicates it a > million times I'm sorry, but I'm not going to modify my coding style for the sake of bad programmers. The context

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Eric
On Dec 21, 6:50 pm, alex23 wrote: > On Dec 22, 8:25 am, Eric wrote: > > > This surprises me, can someone tell me why it shouldn't?  I figure if > > I want to create and initialize three scalars the just do "a=b=c=7", > > for example, so why not extend it to arrays. > > The thing to remember is th

Re: Python education survey

2011-12-22 Thread rusi
On Dec 21, 9:57 pm, Nathan Rice wrote: > +1 for IPython/%edit using the simplest editor that supports syntax > highlighting and line numbers.  I have found that > Exploring/Prototyping in the interpreter has the highest ROI of > anything I teach people. > > Nathan It seems to me that we are not d

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Ian Kelly
On Thu, Dec 22, 2011 at 7:10 PM, alex23 wrote: > On Dec 22, 6:51 pm, Rolf Camps wrote: >> I'm afraid it's dangerous to encourage the use of '[]' as assignment to >> a parameter in a function definition. If you use the function several >> times 'default' always points to the same list. > > I appre

Re: what does 'a=b=c=[]' do

2011-12-22 Thread alex23
On Dec 22, 6:51 pm, Rolf Camps wrote: > I'm afraid it's dangerous to encourage the use of '[]' as assignment to > a parameter in a function definition. If you use the function several > times 'default' always points to the same list. I appreciate the concern, but adding a default argument guard w

Re: reading multiline output

2011-12-22 Thread MRAB
On 23/12/2011 02:05, Mac Smith wrote: On 23-Dec-2011, at 6:48 AM, MRAB wrote: On 23/12/2011 01:07, Mac Smith wrote: On 23-Dec-2011, at 6:17 AM, MRAB wrote: On 23/12/2011 00:33, Mac Smith wrote: Hi, I have started HandBrakeCLI using subprocess.popen but the output is multiline and

Re: reading multiline output

2011-12-22 Thread Mac Smith
On 23-Dec-2011, at 6:48 AM, MRAB wrote: > On 23/12/2011 01:07, Mac Smith wrote: >> >> On 23-Dec-2011, at 6:17 AM, MRAB wrote: >> >>> On 23/12/2011 00:33, Mac Smith wrote: Hi, I have started HandBrakeCLI using subprocess.popen but the output is multiline and not termin

Re: reading multiline output

2011-12-22 Thread Cameron Simpson
On 23Dec2011 06:37, Mac Smith wrote: | On 23-Dec-2011, at 6:17 AM, MRAB wrote: | > On 23/12/2011 00:33, Mac Smith wrote: | >> I have started HandBrakeCLI using subprocess.popen but the output is | >> multiline and not terminated with \n so i am not able to read it | >> using readline() while the H

Re: Grammar for classes

2011-12-22 Thread Ian Kelly
On Thu, Dec 22, 2011 at 4:39 PM, Terry Reedy wrote: > Beats me. The 2.7 doc says inheritance ::=  "(" [expression_list] ")" and I > no on no 3.x change/addition. Well, there is one change in 3.x which is that the inheritance list now accepts keyword parameters (PEP 3115) -- the "metaclass" keywor

Re: reading multiline output

2011-12-22 Thread MRAB
On 23/12/2011 01:07, Mac Smith wrote: On 23-Dec-2011, at 6:17 AM, MRAB wrote: On 23/12/2011 00:33, Mac Smith wrote: Hi, I have started HandBrakeCLI using subprocess.popen but the output is multiline and not terminated with \n so i am not able to read it using readline() while the HandBrakeC

Re: reading multiline output

2011-12-22 Thread Mac Smith
On 23-Dec-2011, at 6:17 AM, MRAB wrote: > On 23/12/2011 00:33, Mac Smith wrote: >> Hi, >> >> >> I have started HandBrakeCLI using subprocess.popen but the output is >> multiline and not terminated with \n so i am not able to read it >> using readline() while the HandBrakeCLI is running. kindly

Re: reading multiline output

2011-12-22 Thread MRAB
On 23/12/2011 00:33, Mac Smith wrote: Hi, I have started HandBrakeCLI using subprocess.popen but the output is multiline and not terminated with \n so i am not able to read it using readline() while the HandBrakeCLI is running. kindly suggest some alternative. i have attached the output in a fi

reading multiline output

2011-12-22 Thread Mac Smith
Hi, I have started HandBrakeCLI using subprocess.popen but the output is multiline and not terminated with \n so i am not able to read it using readline() while the HandBrakeCLI is running. kindly suggest some alternative. i have attached the output in a file. output Description: Binary dat

Re: Grammar for classes

2011-12-22 Thread Terry Reedy
On 12/20/2011 12:05 PM, Joshua Landau wrote: On 20 December 2011 10:55, Robert Kern mailto:robert.k...@gmail.com>> wrote: On 12/20/11 1:34 AM, Joshua Landau wrote: In reading thorough the syntax defined in the reference

Re: Spanish Accents

2011-12-22 Thread Stan Iverson
On Thu, Dec 22, 2011 at 2:17 PM, Peter Otten <__pete...@web.de> wrote: > You are now one step further, you have successfully* decoded the file. > The remaining step is to encode the resulting unicode lines back into > bytes. > The encoding implicitly used by the print statement is sys.stdout.encod

Re: Adding an interface to existing classes

2011-12-22 Thread Terry Reedy
On 12/22/2011 3:21 AM, Spencer Pearson wrote: I'm writing a geometry package, with Points and Lines and Circles and so on, and eventually I want to be able to draw these things on the screen. I have two options so far for how to accomplish this, but neither of them sits quite right with me, and I

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Ben Finney
Saqib Ali writes: > BTW Here is the traceback: > > >>> import myClass > Traceback (most recent call last): > File "", line 1, in > File "myClass.py", line 6, in > @Singleton > TypeError: 'module' object is not callable Yes. When you ‘import foo’, you have a module bound to the name ‘fo

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Marc Christiansen
Saqib Ali wrote: > I'm using this decorator to implement singleton class in python: > > http://stackoverflow.com/posts/7346105/revisions > > The strategy described above works if and only if the Singleton is > declared and defined in the same file. If it is defined in a different > file and I im

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Ethan Furman
Saqib Ali wrote: I'm using this decorator to implement singleton class in python: http://stackoverflow.com/posts/7346105/revisions The strategy described above works if and only if the Singleton is declared and defined in the same file. If it is defined in a different file and I import that fi

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Saqib Ali
Thanks for pointing out the mistake! Works. - Saqib On Thu, Dec 22, 2011 at 4:31 PM, Ethan Furman wrote: > Saqib Ali wrote: > >> MYCLASS.PY: >> >> #!/usr/bin/env python >> import os, sys, string, time, re, subprocess >> import Singleton >> > > This should be 'from Singleton import Singleton'

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Ethan Furman
Saqib Ali wrote: MYCLASS.PY: #!/usr/bin/env python import os, sys, string, time, re, subprocess import Singleton This should be 'from Singleton import Singleton' @Singleton class myClass: def __init__(self): print 'Constructing myClass' At this point, the *instance* of m

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-22 Thread Joshua Landau
On 22 December 2011 11:15, Robert Kern wrote: > On 12/21/11 6:52 PM, Joshua Landau wrote: > > If fix means "return number" then no. This inconsistency between >> elementwise >> operations and 'normal' ones is the problem. Again, explicit >> elementwise-ifying >> through "~" fixes that. You need

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Andrew Berg
You have the same code for both files... -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Chris Kaynor
On Thu, Dec 22, 2011 at 1:11 PM, Saqib Ali wrote: > MYCLASS.PY: > > #!/usr/bin/env python > import os, sys, string, time, re, subprocess > import Singleton > This imports the module Singleton, not the class or function. There are two options to deal with this: from Singleton import Singleton

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Saqib Ali
BTW Here is the traceback: >>> import myClass Traceback (most recent call last): File "", line 1, in File "myClass.py", line 6, in @Singleton TypeError: 'module' object is not callable Here is Singleton.py: class Singleton: def __init__(self, decorated): self._decorate

Re: Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Saqib Ali
MYCLASS.PY: #!/usr/bin/env python import os, sys, string, time, re, subprocess import Singleton @Singleton class myClass: def __init__(self): print 'Constructing myClass' def __del__(self): print 'Destructing myClass' SINGLETON.PY: #!/usr/bin/env python import os, s

Can't I define a decorator in a separate file and import it?

2011-12-22 Thread Saqib Ali
I'm using this decorator to implement singleton class in python: http://stackoverflow.com/posts/7346105/revisions The strategy described above works if and only if the Singleton is declared and defined in the same file. If it is defined in a different file and I import that file, it doesn't wor

IPC with multiprocessing.connection

2011-12-22 Thread Andrew Berg
I'm trying to set up a system where my main program launches external programs and then establishes connections to them via named pipes or Unix domain sockets (depending on platform) with multiprocessing.connection.Listener. The issue I'm having is with the accept() method. If there is nothing on t

Re: Python education survey

2011-12-22 Thread Raymond Hettinger
On Dec 21, 9:57 am, Nathan Rice wrote: > +1 for IPython/%edit using the simplest editor that supports syntax > highlighting and line numbers.  I have found that > Exploring/Prototyping in the interpreter has the highest ROI of > anything I teach people. Thank you Nathan and all the other responde

Re: [TIP] Anyone still using Python 2.5?

2011-12-22 Thread Kumar McMillan
On Wed, Dec 21, 2011 at 1:15 AM, Chris Withers wrote: > Hi All, > > What's the general consensus on supporting Python 2.5 nowadays? > If you compile mod_wsgi with Apache you are stuck on the version of Python you compiled with. I had an old server stuck on Python 2.5 for this reason but I finally

Re: Spanish Accents

2011-12-22 Thread Peter Otten
Stan Iverson wrote: > On Thu, Dec 22, 2011 at 12:42 PM, Peter Otten <__pete...@web.de> wrote: > >> The file is probably encoded in ISO-8859-1, ISO-8859-15, or cp1252 then: >> >> >>> print "\xe1".decode("iso-8859-1") >> á >> >>> print "\xe1".decode("iso-8859-15") >> á >> >>> print "\xe1".decode("c

Cannot Remove Python Libs from XP

2011-12-22 Thread W. eWatson
I have three py libs and the python program itself, 2.52, installed on an 6 year old HP Laptop. I decided to remove them, and took removed Python with the Control Panel ?Add/Remove icon. Worked fine. When I try to remove any of the remaining libs, press the add/remove button does nothing but bl

Re: Spanish Accents

2011-12-22 Thread Stan Iverson
On Thu, Dec 22, 2011 at 12:42 PM, Peter Otten <__pete...@web.de> wrote: > The file is probably encoded in ISO-8859-1, ISO-8859-15, or cp1252 then: > > >>> print "\xe1".decode("iso-8859-1") > á > >>> print "\xe1".decode("iso-8859-15") > á > >>> print "\xe1".decode("cp1252") > á > > Try codecs.open(

Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Robert Kern
On 12/22/11 11:24 AM, Robert Kern wrote: Just as a further note on these lines, when older versions of setuptools and distribute install scripts, they generate stub scripts that do not use a __main__ guard, so installing a multiprocessing-using application with setuptools can cause this problem.

Re: Spanish Accents

2011-12-22 Thread Peter Otten
Stan Iverson wrote: > On Thu, Dec 22, 2011 at 11:30 AM, Rami Chowdhury > wrote: > >> Could you try using the 'open' function from the 'codecs' module? >> > > I believe this is what you meant: > > file = codecs.open(p + "2.txt", "r", "utf-8") > for line in file: > print line > > but got this

Re: Spanish Accents

2011-12-22 Thread Chris Angelico
On Fri, Dec 23, 2011 at 3:22 AM, Stan Iverson wrote: > > On Thu, Dec 22, 2011 at 11:30 AM, Rami Chowdhury > wrote: >> >> Could you try using the 'open' function from the 'codecs' module? > > I believe this is what you meant: > > file = codecs.open(p + "2.txt", "r", "utf-8") > > but got this erro

Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2011-12-22 Thread Νικόλαος Κούρας
On 22 Δεκ, 17:32, Rami Chowdhury wrote: > 2011/12/22 Νικόλαος Κούρας : > > > Hello when i try to visit my webpage i get the error it displays. Iam > > not posting it since you can see it by visiting my webpage at > >http://superhost.gr > > > Please if you can tell me what might be wrong. > > I can

Re: Spanish Accents

2011-12-22 Thread Stan Iverson
On Thu, Dec 22, 2011 at 11:30 AM, Rami Chowdhury wrote: > Could you try using the 'open' function from the 'codecs' module? > I believe this is what you meant: file = codecs.open(p + "2.txt", "r", "utf-8") for line in file: print line but got this error: 141 file = codecs.open(p + "2.txt",

Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2011-12-22 Thread becky_lewis
On Dec 22, 2:40 pm, Νικόλαος Κούρας wrote: > Hello when i try to visit my webpage i get the error it displays. Iam > not posting it since you can see it by visiting my webpage > athttp://superhost.gr > > Please if you can tell me what might be wrong. It doesn't seem entirely clear but if I had t

Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2011-12-22 Thread Rami Chowdhury
2011/12/22 Νικόλαος Κούρας : > Hello when i try to visit my webpage i get the error it displays. Iam > not posting it since you can see it by visiting my webpage at > http://superhost.gr > > Please if you can tell me what might be wrong. I can't see any errors on that page -- can you please post t

Re: Spanish Accents

2011-12-22 Thread Rami Chowdhury
On Thu, Dec 22, 2011 at 15:25, Stan Iverson wrote: > On Thu, Dec 22, 2011 at 10:58 AM, Chris Angelico wrote: > >> Firstly, are you using Python 2 or Python 3? Things will be slightly >> different, since the default 'str' object in Py3 is Unicode. >> > > 2 > >> >> I would guess that your page is

Re: Spanish Accents

2011-12-22 Thread Stan Iverson
On Thu, Dec 22, 2011 at 10:58 AM, Chris Angelico wrote: > Firstly, are you using Python 2 or Python 3? Things will be slightly > different, since the default 'str' object in Py3 is Unicode. > 2 > > I would guess that your page is being output as UTF-8; you may find > that the solution is as eas

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-22 Thread Mel Wilson
Chris Angelico wrote: > On Fri, Dec 23, 2011 at 1:13 AM, Hans Mulder wrote: >> How about: >> >> >> ... >> >> >> More more readable! And it's a standard! > > Unfortunately it's not Pythonic, because indentation is insignificant. Easy-peasy: Mel. > We need to ado

Overlaying PDF with data

2011-12-22 Thread Greg Lindstrom
Hello, I would like to take an existing pdf form and overlay text "on top" (name, address, etc.). I'm looking at ReportLab v2.5 and see their "PLATYPUS" library might be what I crave, but would like to know if there's a more obvious way to do this? I'm working with health care forms which are qu

Re: Spanish Accents

2011-12-22 Thread Chris Angelico
On Fri, Dec 23, 2011 at 1:55 AM, Stan Iverson wrote: > Hi; > If I write a python page to print to the web with Spanish accents all is > well. However, if I read the data from a text file it prints diamonds with > question marks wherever there are accented vowels. Please advise. Sounds like an enc

Spanish Accents

2011-12-22 Thread Stan Iverson
Hi; If I write a python page to print to the web with Spanish accents all is well. However, if I read the data from a text file it prints diamonds with question marks wherever there are accented vowels. Please advise. TIA, Stan -- http://mail.python.org/mailman/listinfo/python-list

socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2011-12-22 Thread Νικόλαος Κούρας
Hello when i try to visit my webpage i get the error it displays. Iam not posting it since you can see it by visiting my webpage at http://superhost.gr Please if you can tell me what might be wrong. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-22 Thread Chris Angelico
On Fri, Dec 23, 2011 at 1:13 AM, Hans Mulder wrote: > How about: > > > ... > > > More more readable!  And it's a standard! Unfortunately it's not Pythonic, because indentation is insignificant. We need to adopt a more appropriate form. Eliminate all the tags and use indentation to mark the end

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-22 Thread Hans Mulder
On 22/12/11 14:12:57, Steven D'Aprano wrote: On Thu, 22 Dec 2011 06:49:16 -0500, Neal Becker wrote: I agree with the OP that the current syntax is confusing. The issue is, the meaning of * is context-dependent. Here you are complaining about an operator being "confusing" because it is contex

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Ethan Furman
Rolf Camps wrote: alex23 schreef op wo 21-12-2011 om 16:50 [-0800]: I'd say that _is_ the most pythonic way, it's very obvious in its intent (or would be with appropriate names). If it bothers you that much: def listgen(count, default=[]): for _ in xrange(count): yield d

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-22 Thread Chris Angelico
On Fri, Dec 23, 2011 at 12:12 AM, Steven D'Aprano wrote: > class MyClass superclasslist A, B C: >    def method argumentlist self, x, y: >        t = tuple 1, 2 tuple 3, 4 endtuple endtuple >        return group x + y endgroup * group x - y endgroup > > > Much less confusing! A definite improveme

Re: [OT] Quick intro to C++ for a Python and C user?

2011-12-22 Thread Neil Cerutti
On 2011-12-22, Roy Smith wrote: > In article , > Grant Edwards wrote: >> C++ is a vast, complex, and dangerous language -- and industry >> doesn't seem to be willing to limit itself to using the seven >> people on the planet who understand it. > >> I'm only half joking... :) > > Half joking, in

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-22 Thread Steven D'Aprano
On Thu, 22 Dec 2011 06:49:16 -0500, Neal Becker wrote: > I agree with the OP that the current syntax is confusing. The issue is, > the meaning of * is context-dependent. Here you are complaining about an operator being "confusing" because it is context-dependent, in a post where you strip all c

Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2011-12-22 Thread Neal Becker
I agree with the OP that the current syntax is confusing. The issue is, the meaning of * is context-dependent. Why not this: Func (*args) == Func (unpack (args)) def Func (*args) == Func (pack (args)) That seems very clear IMO -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Robert Kern
On 12/21/11 8:11 PM, Andrew Berg wrote: On 12/21/2011 1:29 PM, Ethan Furman wrote: Anything that runs at import time should be protected by the `if __name__ == '__main__'` idiom as the children will import the __main__ module. So the child imports the parent and runs the spawn code again? That

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-22 Thread Robert Kern
On 12/21/11 5:07 PM, Paul Dubois wrote: You're reinventing Numeric Python. Actually, he's not. The numerical operators certainly overlap, but Elementwise supports quite a bit more generic operations than we ever bothered to implement with object arrays. -- Robert Kern "I have come to belie

Re: Why does this launch an infinite loop of new processes?

2011-12-22 Thread Hans Mulder
On 21/12/11 21:11:03, Andrew Berg wrote: On 12/21/2011 1:29 PM, Ethan Furman wrote: Anything that runs at import time should be protected by the `if __name__ == '__main__'` idiom as the children will import the __main__ module. So the child imports the parent and runs the spawn code again? That

Re: Text Processing

2011-12-22 Thread Yigit Turgut
On Dec 21, 2:01 am, Alexander Kapps wrote: > On 20.12.2011 22:04, Nick Dokos wrote: > > > > > > > > > > >>> I have a text file containing such data ; > > >>>          A                B                C > >>> --- > >>> -2.0100e-01    8.000e-02  

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

2011-12-22 Thread Robert Kern
On 12/21/11 6:52 PM, Joshua Landau wrote: If fix means "return number" then no. This inconsistency between elementwise operations and 'normal' ones is the problem. Again, explicit elementwise-ifying through "~" fixes that. You need to tell me why this is worth the confusion over that. I unders

Item Checking not possible with UltimateListCtrl in ULC_VIRTUAL mode

2011-12-22 Thread Ven
Following is the system and software info Platforms: Windows XP and OSX Lion Activestate Python 2.7.2 wxPython2.9-osx-cocoa-py2.7 (for OSX) wxPython2.9-win32-py27 (for Windows XP) I am trying to create a UltimateListCtrl using ULC_VIRTUAL and ULC_REPORT mode. I would like to know how can I put a

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Rolf Camps
alex23 schreef op wo 21-12-2011 om 16:50 [-0800]: > On Dec 22, 8:25 am, Eric wrote: > > This surprises me, can someone tell me why it shouldn't? I figure if > > I want to create and initialize three scalars the just do "a=b=c=7", > > for example, so why not extend it to arrays. > > The thing to

Adding an interface to existing classes

2011-12-22 Thread Spencer Pearson
I'm writing a geometry package, with Points and Lines and Circles and so on, and eventually I want to be able to draw these things on the screen. I have two options so far for how to accomplish this, but neither of them sits quite right with me, and I'd like the opinion of comp.lang.python's wizene