Re: Work with Windows workgroups under Python?

2006-01-02 Thread Mondal
Hi, Active Directory is available under NTFS only. If you are running on the older FAT32, use the win32wnet and win32netcon modules in *Active Python 2.4*. You can use the WNetOpenEnum and WNetEnumResource functions in nested-for-loops to walk through the Network root to the lowest level of share

Re: Hypergeometric distribution

2006-01-02 Thread Travis E. Oliphant
Raven wrote: > Thanks Steven for your very interesting post. > > This was a critical instance from my problem: > > from scipy import comb >>> comb(14354,174) > > inf > > The scipy.stats.distributions.hypergeom function uses the scipy.comb > function, so it returned nan since it tries t

Re: Any wing2.0 users here?

2006-01-02 Thread vinjvinj
Here's a recent post of wingide: http://groups.google.com/group/comp.lang.python/browse_frm/thread/6be6a0a0fdbfa616/a63f11b8f63519f2?lnk=st&q=wingide+is+a+beautiful&rnum=1#a63f11b8f63519f2 I would strongly recomend it. Works great. -- http://mail.python.org/mailman/listinfo/python-list

csv format to DBase III format

2006-01-02 Thread coriolis_wong
Hi, I need to transfer csv format file to DBase III format file. How do i do it in Python language? Any help is appreciated. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex anomaly

2006-01-02 Thread Ganesan Rajagopal
> mike klaas <[EMAIL PROTECTED]> writes: > Thanks guys, that is probably the most ridiculous mistake I've made in > years I was taken too :-). This is quite embarassing, considering that I remember reading a big thread in python devel list about this a while back! Ganesan -- Ganesan Rajag

Re: Regex anomaly

2006-01-02 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Thanks guys, that is probably the most ridiculous mistake I've made in > years > > -Mike If that's the more ridiculous you can come up with, you're not trying hard enough. I've done much worse. -- http://mail.python.org/mailman/list

Re: Regex anomaly

2006-01-02 Thread mike . klaas
Thanks guys, that is probably the most ridiculous mistake I've made in years -Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: indentation preservation/restoration

2006-01-02 Thread smichr
Steven D'Aprano wrote: > With a little bit of work, this could be expanded to add redundancy for > not just indentation and numeric literals, but also string literals, > keywords, operators, and anything else. When I copy and assign to variable 'post' the reply posted here on c.l.p. starting with

Re: Regex anomaly

2006-01-02 Thread Ganesan Rajagopal
> mike klaas <[EMAIL PROTECTED]> writes: > In [48]: import re > In [49]: reStr = r"([a-z]+)://" > In [51]: against = "http://www.hello.com"; > In [53]: re.match(reStr, against).groups() > Out[53]: ('http',) > In [54]: re.match(reStr, against, re.I).groups() > Out[54]: ('http',) > In [55]: reCo

Re: application and web app technologies

2006-01-02 Thread Van
Try matching technologies when building a decision matrix... For example, if you need the PHP open source pile then MySQL works well. If you like SQL Server then ASP.NET or Mono with C# is attractive. Eliminate contenders that have performance obstacles... PERL does not multithread, PHP.com holds b

Re: Regex anomaly

2006-01-02 Thread Roy Smith
<[EMAIL PROTECTED]> wrote: > >Hello, > >Has anyone has issue with compiled re's vis-a-vis the re.I (ignore >case) flag? I can't make sense of this compiled re producing a >different match when given the flag, odd both in it's difference from >the uncompiled regex (as I thought the uncompiled api w

Re: Regex anomaly

2006-01-02 Thread Andrew Durdin
On 2 Jan 2006 21:00:53 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Has anyone has issue with compiled re's vis-a-vis the re.I (ignore > case) flag? I can't make sense of this compiled re producing a > different match when given the flag, odd both in it's difference from > the uncompile

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
Hans Nowak <[EMAIL PROTECTED]> wrote: ... > Maybe I misunderstand, but shouldn't this be: > > def WHILE(cond): > if not cond(): return > yield None > for x in WHILE(cond): yield x > > After all, the original version only yields two things: None and a > generator. > > (Or is th

Regex anomaly

2006-01-02 Thread mike . klaas
Hello, Has anyone has issue with compiled re's vis-a-vis the re.I (ignore case) flag? I can't make sense of this compiled re producing a different match when given the flag, odd both in it's difference from the uncompiled regex (as I thought the uncompiled api was a wrapper around a compile-and-

Re: Hax's Edu Corner: the bug-trolling attitude

2006-01-02 Thread Coby Beck
"Hax Eel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The Bug-Trolling Attitude > > Hax Eel, 2006-01-02 > > People, > > There is a common behavior among people in software geek forums, that > whenever a software is crashing or behaving badly, they respond by writing > stupid essa

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread David Trudgett
[EMAIL PROTECTED] writes: > While preparing a Python411 podcast about classes and OOP, my mind > wondered far afield. I found myself constructing an extended metaphor > or analogy between the way programs are organized and certain > philosophical ideas. So, going where my better angels dare not, h

Re: Python or Java or maybe PHP?

2006-01-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: . [valuable remarks on scientific evidence and so on] . . >Finally, there's a camp that pushes static typin

Re: Python or Java or maybe PHP?

2006-01-02 Thread Hans Nowak
Alex Martelli wrote: > A Ruby example of reimplementing while: > > def WHILE(cond) > | return if not cond > | yield > | retry > | end > i=0; WHILE(i<3) { print i; i+=1 } > > Python's a bit less direct here, but: > > def WHILE(cond): > if not cond(): return > yield

Re: "Humane" programmer interfaces

2006-01-02 Thread Andrew Durdin
On 1/3/06, Alex Martelli <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > if somestr[:len(needle)] == needle: > > This is definitely more readable, and the same would apply if I tested > somestr[:len('glab')] == 'glab' -- the key point being that one knows > where th

Re: PYTHON INTERPRETER

2006-01-02 Thread Alex Martelli
Corey Carter <[EMAIL PROTECTED]> wrote: > I am interested in creating programs in python. I am not sure how I would > run the programs on other machines without having to install python on each > machine. Is there a way to run python programs on machines without the > python interpreter? There a

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
James <[EMAIL PROTECTED]> wrote: > Now I am curious. How do Python 2.5 and Ruby create new control > structures? Any code samples or links? A Ruby example of reimplementing while: def WHILE(cond) | return if not cond | yield | retry | end i=0; WHILE(i<3) { print i; i+=1 }

Programming Python, 3rd ed.??

2006-01-02 Thread Dick Moores
Several months ago I saw an item on the O'Reilly site to the effect that the 3rd. ed. of Programming Python was in the works. I made a note to myself to check back in January. I just did, but could find nothing at all about a 3rd. edition. Anyone know? Thanks, Dick Moores -- http://mail.pyth

Re: Python or Java or maybe PHP?

2006-01-02 Thread James
Now I am curious. How do Python 2.5 and Ruby create new control structures? Any code samples or links? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-02 Thread Roedy Green
On 2 Jan 2006 13:16:26 -0800, "Xah Lee" <[EMAIL PROTECTED]> wrote, quoted or indirectly quoted someone who said : >When a software is ostensibly incorrect, and if it is likely in >connection to egregious irresponsibility as most software companies are >thru their irresponsible licensing, the thing

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread Peter Hansen
Steven D'Aprano wrote: > Life is a process, not a thing -- > when a clock runs down and stops ticking, there is no essence of ticking > that keeps going, the gears just stop. When I stop walking, there is no > spirit of walk that survives me coming to a halt. I just stop walking. Yet when one list

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread Neal Becker
Steven D'Aprano wrote: > On Mon, 02 Jan 2006 13:38:47 -0800, UrsusMaximus wrote: > >> It seems to me that, if anything of a person survives death in any way, >> it must do so in some way very different from that way in which we >> exist now. > [snip] > > I don't dare ask where your evidence for

Re: Numeric RandomArray seed problem

2006-01-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello, > > I tried calling RandomArray.seed() > by calling RandomArray.get_seed() I get the seed number (x,y). > My problem is that x is always 113611 any advice? Well, RandomArray.seed() gets its seed from the computer's time. def seed(x=0,y=0): """seed(x, y), set

Re: "Humane" programmer interfaces

2006-01-02 Thread Alex Martelli
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: ... > > code goo.last than goo[-1]. For an analogy, consider, in Python, > > somestr.startswith('glab') as a more readable equivalent of > > somestr[:4]=='glab' -- the "why add?" question is easily answered, > > Using constants for the example does

Re: multidimensional array of objects in scipy core

2006-01-02 Thread Robert Kern
Stormslayer wrote: > Folks: How do you create a multidimesional array of objects w/ the size > of the array entered at runtime? So basically, for an arbitrary class, > create an array and then *.resize it to be of size NXM, and then > populate the elements of the objects. First, asking on the sci

Hax's Edu Corner: the bug-trolling attitude

2006-01-02 Thread Hax Eel
The Bug-Trolling Attitude Hax Eel, 2006-01-02 People, There is a common behavior among people in software geek forums, that whenever a software is crashing or behaving badly, they respond by writing stupid essays about it and cross-post it to multiple newsgroups as if it is the duty of Usenet r

Re: Python or Java or maybe PHP?

2006-01-02 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Mon, 02 Jan 2006 19:35:10 -0500, Mike Meyer wrote: >> What SPARK papers I have >> found concentrate more on correctness than productivity: IIRC, they >> claim millions of lines of production code with no errors. > Writing error-free code is easy. Tha

Re: HELP! on wxPython Error

2006-01-02 Thread Tim Roberts
Suranga Sarukkali <[EMAIL PROTECTED]> wrote: >Hello, I'm Sam and I've been under som trouble with using wxPython >that when I try to execute code containing wxPython gui programs >provided with wxPython geting started sample progams it's giving a >error but when I type the code to the shell prompt

python concurrency proposal

2006-01-02 Thread corey . coughlin
Alright, so I've been following some of the arguments about enhancing parallelism in python, and I've kind of been struck by how hard things still are. It seems like what we really need is a more pythonic approach. One thing I've been seeing suggested a lot lately is that running jobs in separate

Re: Sort dictionary

2006-01-02 Thread Luis M. González
You can't get a dictionary ordered by values, but you can get a list of key-value pairs ordered by value: def sortByValue(myDict): x = sorted( [(v,k) for k,v in myDict.items()] ) return [(k,v) for v,k in x] For getting only the first two pairs: sortByValue(x)[:2] Hope this helps

Re: Numeric RandomArray seed problem

2006-01-02 Thread Tim Roberts
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >I tried calling RandomArray.seed() >by calling RandomArray.get_seed() I get the seed number (x,y). >My problem is that x is always 113611 any advice? What did you expect? -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- htt

Re: Bug ??

2006-01-02 Thread Mike Meyer
"Eddy Ilg" <[EMAIL PROTECTED]> writes: > Hi, > > I have a class and I am trying to set the instance varirable 'variables' > (also tried different names). The variable gets initialized by > default-value parameter of the constructor. When I change the variable and > call the constructor again, the d

Re: Python or Java or maybe PHP?

2006-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2006 19:35:10 -0500, Mike Meyer wrote: > What SPARK papers I have > found concentrate more on correctness than productivity: IIRC, they > claim millions of lines of production code with no errors. Writing error-free code is easy. That's just a matter of incremental improvement of e

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread Mike Meyer
"John M. Gabriele" <[EMAIL PROTECTED]> writes: > Consider the following: > > #!/usr/bin/python > > #- > class Grand_parent( object ): > > def speak( self ): > print 'Grand_parent.speak()' > self.advise() > >

Re: Problem overriding sys.excepthook

2006-01-02 Thread Lunchtimemama
Try/except sounds like the way to go. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Productivity and Quality of IDE

2006-01-02 Thread Mike Meyer
"Daniel J. Rubin" <[EMAIL PROTECTED]> writes: > I say it entirely depends on what your programming. For instance, if > creating a GUI, there is no question that a well developed high quality > IDE is a huge help -- from the point of view of stub generation and code > completion, as well as the GUI

Re: Any wing2.0 users here?

2006-01-02 Thread Alvin A. Delagon
Thanks for all the recommendations! I took a look on wingide2.0 on my linux box and it seems pretty good and has a lot of nifty features (which is pretty daunting to use since I've been programming with no IDE at all) and it debugger work pretty well but for a price tag of $179 I think it not w

Re: Python or Java or maybe PHP?

2006-01-02 Thread Mike Meyer
"NOKs" <[EMAIL PROTECTED]> writes: > Thanks! That's really useful. I'm not sure if I'm a "dynamically typed" > guy - coming form C#, very strict language, and C++, statically typed, > but i definetly searched and see the debate going strong. Not try to > start it here, but do you think that statica

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread BartlebyScrivener
"The highest activities of consciousness have their origins in the physical occurrences of the brain just as the loveliest of melodies are not too sublime to be expressed by notes."--Somerset Maugham -- http://mail.python.org/mailman/listinfo/python-list

Re: application and web app technologies

2006-01-02 Thread Roedy Green
On 2 Jan 2006 10:24:54 -0800, [EMAIL PROTECTED] wrote, quoted or indirectly quoted someone who said : > * Java/JSP -- We have already made the decision to go with Java, but >we haven't started with it, and have not committed to Java. > * Python -- Some of us have had limited experience with Python

Re: indentation preservation/restoration

2006-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2006 14:19:15 -0800, smichr wrote: > I have (inadvertently) wiped out the functionality of my personal > python snippets by eliminating leading space. I have also just visited > http://www.python.org/tim_one/000419.html and saw a piece of code with > the indentation gone. Python cod

Re: Bug ??

2006-01-02 Thread Brian van den Broek
Eddy Ilg said unto the world upon 02/01/06 05:43 PM: > Hi, > > I have a class and I am trying to set the instance varirable 'variables' > (also tried different names). The variable gets initialized by > default-value parameter of the constructor. When I change the variable and > call the construct

Re: PYTHONDOCS

2006-01-02 Thread Mike Meyer
"J. D. Leach" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Chris Smith <[EMAIL PROTECTED]> writes: "J" == J D Leach <[EMAIL PROTECTED]> writes: >>> I'm stupider; I can't ATFQ for you. >>> But last night I stayed at a Holiday Inn Express, and can recommend >>> >>> http://projects.edge

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2006 13:38:47 -0800, UrsusMaximus wrote: > It seems to me that, if anything of a person survives death in any way, > it must do so in some way very different from that way in which we > exist now. [snip] I don't dare ask where your evidence for this hypothesis is, but I will ask wh

Re: Application architecture (long post - sorry)

2006-01-02 Thread Frithiof Andreas Jensen
<[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] > It would give me great satisfaction though to roll my own solution to > this Ahh - a bright young employee ready to meet the realities of corporate life, much like a bike rider meets the concrete he drives on ;-) > and then at

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Bengt Richter wrote: > ISTM you wouldn't get zero if you scaled by 10**significant_digits (however > many > you require) before dividing. E.g., expected hits per trillion (or septillion > or whatever) > expresses probability too. Perhaps that could work in your calculation? > > Regards, > Beng

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Bengt Richter wrote: > ISTM you wouldn't get zero if you scaled by 10**significant_digits (however > many > you require) before dividing. E.g., expected hits per trillion (or septillion > or whatever) > expresses probability too. Perhaps that could work in your calculation? > > Regards, > Bengt

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-02 Thread robic0
On 2 Jan 2006 13:16:26 -0800, "Xah Lee" <[EMAIL PROTECTED]> wrote: >The Bug-Reporting Attitude > >Xah Lee, 2005-02, 2006-01 > >People, > >There is a common behavior among people in software geek forums, that >whenever a software is crashing or behaving badly, they respond by >“go file a bug report

Re: Problem overriding sys.excepthook

2006-01-02 Thread Patrick Maupin
Lunchtimemama wrote: > What is the superior method of exception handling: ... For a start, note that the exception hook does not _really_ have to be in the main module, just imported before any "protected" code is to be executed. Having said that, what I personally typically do for exception trap

Re: About zipfile on WinXP

2006-01-02 Thread Kent Johnson
rzed wrote: > I create a zip file on my WinXP system, using this function: > > > import zipfile > import os > import os.path > > def zipdir(dirname, zfname): > zf = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED) > for root, dirs, files in os.walk(dirname): > for f in files: >

Bug ??

2006-01-02 Thread Eddy Ilg
Hi, I have a class and I am trying to set the instance varirable 'variables' (also tried different names). The variable gets initialized by default-value parameter of the constructor. When I change the variable and call the constructor again, the default value changes !!! Is this supposed to happe

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Scott David Daniels ha scritto: > You should really look into the timeit module -- you'll get nice > solid timings slightly easier to tweak. This seems a very interesting module, I will give it a try as soon as possible. Thanks Scott. Ale -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread John M. Gabriele
André wrote: > John M. Gabriele wrote: > > Since Child has no advice() method, it inherits the one for Parent. > Thus, Child can be thought of as being defined as follows: > > . class Child( Parent ): > . > . def speak( self ): > . print '\t\tChild.speak()' > . self.advise(

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread John M. Gabriele
Dustan wrote: > [snip] That is, Parent does have its > own critique method, not a reference to Grand_parent.critique(). Interesting. "It has its own" critique method? Hm. Not quite sure what that means exactly... Anyhow, I wasn't suggesting that Parent had a reference to Grand_parent.critique()

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread John M. Gabriele
Scott David Daniels wrote: > Dustan wrote: > >> From my experience, the methods are passed >> down, not referred to from the parent. That is, Parent does have its >> own critique method, not a reference to Grand_parent.critique(). > > This is typical of static binding as (for example) seen

Re: PYTHONDOCS

2006-01-02 Thread J. D. Leach
Peter Otten wrote: > > You are getting no match rather than the wrong one. Have you verified that > a subdirectory > > /usr/share/doc/python-2.4/html/lib > > exists on your system? If not, the documentation may not be properly > installed. > > Peter I checked it Peter and rearranged the files

Re: PyHtmlGUI Project is looking for developers

2006-01-02 Thread John J. Lee
Sybren Stuvel <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] enlightened us with: > > At the moment we don't work with javascript. But it should not be to > > hard to create a JavaScript Renderer similar to the css one we already > > have. > > Isn't CSS for rendering, and JavaScript for client-s

Re: indentation preservation/restoration

2006-01-02 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > I have (inadvertently) wiped out the functionality of my personal > python snippets by eliminating leading space. I have also just visited > http://www.python.org/tim_one/000419.html and saw a piece of code with > the indentation gone. Python code is fragile in this regar

Re: Work with Windows workgroups under Python?

2006-01-02 Thread Jarek Zgoda
Karlo Lozovina napisał(a): > I'm running Python 2.4 under WinXP Pro, and I would like to do some basis > operations on my LAN - get list of workgroups, list the computers in each > workgroup and possibly connect to specific computer and get > share/directory list? Is there some Pythonic way of

Re: Application architecture (long post - sorry)

2006-01-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: > In response to Mike's post... > > I know exactly where you're coming from and you are right a web based > solution is the simplest and would be the fastest to develop and > rollout etc. but.. > > The cost is in the data, in the uk you get charged for the amount of > dat

Re: Any wing2.0 users here?

2006-01-02 Thread Jarek Zgoda
Claudio Grondi napisał(a): > To be honest, the more experience I have, the less I can understand what > a debugger is for. Can't even remember when used one last time. This is > valid also for programming in C/C++ or Java, so in my eyes the > "Debugger? No, Thanks!" is not limited only to Python o

indentation preservation/restoration

2006-01-02 Thread smichr
I have (inadvertently) wiped out the functionality of my personal python snippets by eliminating leading space. I have also just visited http://www.python.org/tim_one/000419.html and saw a piece of code with the indentation gone. Python code is fragile in this regard. One solution that occurs to me

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-02 Thread Martin P. Hellwig
Anton Vredegoor wrote: > > Most people can survive (without damaging their souls so to speak) when > working for corruption themselves in this way, but sooner or later one > is asked to corrupt others (defending one's title during a promotion, > leading a community and so on). This is the crucial

Re: Any wing2.0 users here?

2006-01-02 Thread Claudio Grondi
Jarek Zgoda wrote: > Alvin A. Delagon napisał(a): > > >>emacs has been my long time companion for php, perl, and python. My boss >>recommended to me Wing2.0, I find it hard to adjust though. What can you >>say about this IDE? He say's if I think it could improve my productivity >>he's willing to

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread Claudio Grondi
There are many ways of going crazy, but the most valuable of them is this one which makes a genius out of an ordinary man. Claudio [EMAIL PROTECTED] wrote: > While preparing a Python411 podcast about classes and OOP, my mind > wondered far afield. I found myself constructing an extended metaphor

Re: Sort dictionary

2006-01-02 Thread Luis M. González
This function returns a tuple of value-key pairs, sorted by value: >>> x = {'a':3, 'b':2, 'c':4} >>> def sortByValue(myDict): return sorted( [(v,k) for k,v in myDict.items()] ) If you want to get the first two value-key pairs: >>> sortByValue(x)[:2] [(2, 'b'), (3, 'a')] Hope this helps..

Re: Sort dictionary

2006-01-02 Thread Luis M. González
This function return a tuple of value-key pairs, sorted by value: >>> x = {'a':3, 'b':2, 'c':4} >>> def sortByValue(myDict): return sorted( [(v,k) for k,v in myDict.items()] ) If you want to get the first two value-key pairs: >>> sortByValue(x)[:2] [(2, 'b'), (3, 'a')] Hope this helps..

Spiritual Programming (OT, but Python-inspired)

2006-01-02 Thread UrsusMaximus
While preparing a Python411 podcast about classes and OOP, my mind wondered far afield. I found myself constructing an extended metaphor or analogy between the way programs are organized and certain philosophical ideas. So, going where my better angels dare not, here is the forbidden fruit of my no

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread Scott David Daniels
Dustan wrote: > From my experience, the methods are passed > down, not referred to from the parent. That is, Parent does have its > own critique method, not a reference to Grand_parent.critique(). This is typical of static binding as (for example) seen in C++. If you think of dynamically bou

Re: Hypergeometric distribution

2006-01-02 Thread Bengt Richter
On 2 Jan 2006 03:35:33 -0800, "Raven" <[EMAIL PROTECTED]> wrote: [...] > >The problem with long integers is that to calculate the hypergeometric >I need to do float division and multiplication because integer division >returns 0. A solution could be to calculate log(Long_Factorial_Integer) ISTM yo

Re: how to scrape url out of href

2006-01-02 Thread [EMAIL PROTECTED]
actuall the full error is this: File "/home/felafela/BeautifulSoup.py", line 301, in __getitem__ return self._getAttrMap()[key] KeyError: 'href' -- http://mail.python.org/mailman/listinfo/python-list

Xah's Edu Corner: the bug-reporting attitude

2006-01-02 Thread Xah Lee
The Bug-Reporting Attitude Xah Lee, 2005-02, 2006-01 People, There is a common behavior among people in software geek forums, that whenever a software is crashing or behaving badly, they respond by “go file a bug report” as if it is the duty of software consumers. When a software is ostensibly

Re: how to scrape url out of href

2006-01-02 Thread [EMAIL PROTECTED]
hey ken thanks for writing. when i try that i get told KeyError: 'href' -- http://mail.python.org/mailman/listinfo/python-list

Re: About zipfile on WinXP

2006-01-02 Thread Scott David Daniels
rzed wrote: > I create a zip file on my WinXP system, using this function: > ... > However, WinXP has a "feature" (if that's what it is): if you click > on a zip file in explorer, an explorer window opens that shows the > contents of the zip file. If I use WinZip or UltimateZip to create > the

Work with Windows workgroups under Python?

2006-01-02 Thread Karlo Lozovina
I'm running Python 2.4 under WinXP Pro, and I would like to do some basis operations on my LAN - get list of workgroups, list the computers in each workgroup and possibly connect to specific computer and get share/directory list? Is there some Pythonic way of doing this? Or any other less Pytho

Re: PYTHONDOCS

2006-01-02 Thread Peter Otten
J. D. Leach wrote: > The response is: import pydoc print pydoc.help.docdir > None > > Obviously not there. You are getting no match rather than the wrong one. Have you verified that a subdirectory /usr/share/doc/python-2.4/html/lib exists on your system? If not, the documentation

Re: important for me!!

2006-01-02 Thread superfun
Aysun, out of curiousity: where do you go to school? is your teacher/professor making use of Python? what class is this for? I agree with previous posters, and I'm not trying to get you in trouble. I'm just curious. -Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Any wing2.0 users here?

2006-01-02 Thread Jarek Zgoda
Alvin A. Delagon napisał(a): > emacs has been my long time companion for php, perl, and python. My boss > recommended to me Wing2.0, I find it hard to adjust though. What can you > say about this IDE? He say's if I think it could improve my productivity > he's willing to buy it for me. Suggestions

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
Cameron Laird <[EMAIL PROTECTED]> wrote: ... > "c = d unless ...": it's possible to distinguish Python from > Ruby in another way. Python is arguably better for group work, > or at least more standard for team projects, because it more > consistently exposes "one correct solution", while Ruby

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread Dustan
> it calls it's own overriden critique method (overriden meaning the one that did the overriding) -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread André
John M. Gabriele wrote: > Consider the following: > [snip] > #- > class Parent( Grand_parent ): > > def speak( self ): > print '\tParent.speak()' > self.advise() > > def advise( self ): > print '\t

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread Dustan
Oh, I see what you mean. From my experience, the methods are passed down, not referred to from the parent. That is, Parent does have its own critique method, not a reference to Grand_parent.critique(). So when Child calls self.advise, it is calling its inherrited copy. Then, since the inherited Chi

Re: OOP: method overriding works in mysterious ways?

2006-01-02 Thread Dustan
Parent.critique() is calling self.critique(), which has been overriden by Child.critique() instead of Parent.critique. It makes perfect sense to me. -- http://mail.python.org/mailman/listinfo/python-list

OOP: method overriding works in mysterious ways?

2006-01-02 Thread John M. Gabriele
Consider the following: #!/usr/bin/python #- class Grand_parent( object ): def speak( self ): print 'Grand_parent.speak()' self.advise() def advise( self ): print 'Grand_parent.advise()'

Re: Tkinter Scrollbar not working

2006-01-02 Thread Dustan
BTW, experience tells me it is necessary for me to explicitly state that I'm a newbie (otherwise I get rude people saying I should already know such-and-such). -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONDOCS

2006-01-02 Thread J. D. Leach
Peter Otten wrote: > What do you get if you do > import pydoc pydoc.help.docdir > '/should/be/path/to/docs' The response is: >>>import pydoc >>>print pydoc.help.docdir None >>> Obviously not there. > > I believe there is a bug in the documentation-finding code. With the > current lo

Tkinter Scrollbar not working

2006-01-02 Thread Dustan
I'm trying to get a scrollbar bound with a Frame, and I keep on getting a scrollbar, but it doesn't actually scroll. Some help, please? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python or Java or maybe PHP?

2006-01-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: . [much valuable and correct detail that somehow managed to avoid mentioning Forth or Smalltalk]

Re: HELP! on wxPython Error

2006-01-02 Thread stelki
Hello, you smell. -- http://mail.python.org/mailman/listinfo/python-list

Re: application and web app technologies

2006-01-02 Thread Matt Garrish
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > January, 2006. > > * OO Perl/Perl6 -- Perl has worked real well for us, but we have > doubts that it is the best technology, and we want to make a serious > attempt to look at other things. It might help if you elaborated on what thes

Re: "Humane" programmer interfaces

2006-01-02 Thread Alex Martelli
Andrew Durdin <[EMAIL PROTECTED]> wrote: > On 29 Dec 2005 09:50:57 -0800, colinwb <[EMAIL PROTECTED]> wrote: > > > > >> puts ck.first, ck[0], '*', ck.last, ck[-1] > > One of the points at issue (minimalism/monotony) relates to TOOWTDI, > which has implications for language/module design and for c

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-02 Thread Jaap Spies
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: >... > only hire people with long backstabbing histories. >>> >>>Such as...? Guido van Rossum? Greg Stein? Vint Cerf? Ben Goodger? > >... > >>No insider information is necessary, the job requirements make it >>absol

Re: Why is 'None' not assignable but 'True'/'False' are?

2006-01-02 Thread Alex Martelli
Rodney Maxwell <[EMAIL PROTECTED]> wrote: > In Python 2.4.1: > > >>> None = 99 > SyntaxError: assignment to None > >>> True = 99 > >>> False = 99 > >>> True == False > True > --- > So why is 'None' special? A legacy/backwards compatibility issue: None has been there 'forever'

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
Peter Hansen <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > One great programming principle is "Dont' Repeat Yourself": when you're > > having to express the same thing over and over, there IS something > > wrong. I believe the "DYR" phrasing is due to the so-called Pragmatic > > Programme

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-02 Thread Alex Martelli
Anton Vredegoor <[EMAIL PROTECTED]> wrote: ... > > > only hire people with long backstabbing histories. > > > > Such as...? Guido van Rossum? Greg Stein? Vint Cerf? Ben Goodger? ... > No insider information is necessary, the job requirements make it > absolutely clear (at least to me) that

Why is 'None' not assignable but 'True'/'False' are?

2006-01-02 Thread Rodney Maxwell
In Python 2.4.1: >>> None = 99 SyntaxError: assignment to None >>> True = 99 >>> False = 99 >>> True == False True --- So why is 'None' special? -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >