How do you draw this layout with wxpython?

2005-10-16 Thread Young H. Rhiu
See: http://hilug.org/img/app_layout.GIF I'm implementing an album-like application with wxpython but I'm new to wxPython though I know how to program with python. The problem is that it's not easy for me to deal with drawing layout stuff with wxpython. What layout I'm thinking of looks like the g

can a cut-down Python still be Python?

2005-10-16 Thread The Eternal Squire
All, Regardless of the technical difficulties involved (and I know they are legion), I am considering developing a very limited subset of Python fit to run on embedded systems using 80188 or 68332 microchips. My main question regarding this is: even if I am successful, would the results be reje

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > As for it being illegal, it was illegal only because if was Microsoft > doing it. Actually, *any* company with a defacto monopoly pulling such a stunt would be found in violation of the law. Such companies operate under different legal rules than

Re: Microsoft Hatred FAQ

2005-10-16 Thread David Schwartz
"Roedy Green" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 15 Oct 2005 15:48:18 -0700, "David Schwartz" > <[EMAIL PROTECTED]> wrote or quoted : >>Go down to your local car dealer and see if you can buy a new car >>without an engine. > Given that that the OS and the

Re: Microsoft Hatred FAQ

2005-10-16 Thread David Schwartz
"John Bokma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> wrote: >> You don't get it. The point is, you can pick any Linux >> distribution and >> still use the same applications. This is exactly what Microsoft >> *doesn't* want. They

Re: Microsoft Hatred FAQ

2005-10-16 Thread David Schwartz
"Tor Iver Wilhelmsen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> writes: >> How is that better? Nothing in your car depends upon what tires you >> have >> on. But all of the rest of the software on your computer is dependent >> upon

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Schilling
"John Bokma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Mike Schilling" <[EMAIL PROTECTED]> wrote: > >> "John Bokma" <[EMAIL PROTECTED]> wrote in message > >>> No, it's a recommendation, an advise, nothing else. Otherwise they >>> would call it a standard. Why do you think W3C

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Meyer
John Bokma <[EMAIL PROTECTED]> writes: > Which standards? Again: w3c is not an official standards organization. > Moreover, Netscape added LiveScript, oh wait, I mean JavaScript, and the > *cough* blink element. >> By contracting with sites to include non-standard IE features to >> deliberately br

subtyping a builtin type in a C extension

2005-10-16 Thread shawn
I am trying to make a subtype of a string. Initially it will have no new methods or attributes, the C equivalent of: class myStr(str): pass I have experimented a bit, but am currently making a mess of it. Does anybody have an example they can point to of inheriting from a builtin, or a sugges

Please Help with replaceChild

2005-10-16 Thread George
How can I do the following in python: compare the text in the element tags with the elements tags in filling and if they match replace the text within the elements tags with the text in the matching element tag of fillin. For example Since the text Monday in form matches the Element tag in fil

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
Roedy Green <[EMAIL PROTECTED]> wrote: > On 16 Oct 2005 05:22:47 GMT, John Bokma <[EMAIL PROTECTED]> wrote > or quoted : > >>No, it's a recommendation, an advise, nothing else. Otherwise they >>would call it a standard. Why do you think W3C calls it >>recommendations? Because it are no standards.

Re: Why asci-only symbols?

2005-10-16 Thread Bengt Richter
On Sun, 16 Oct 2005 12:16:58 +0200, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> Perhaps string equivalence in keys will be treated like numeric equivalence? >> I.e., a key/name representation is established by the initial key/name >> binding, bu

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
Roedy Green <[EMAIL PROTECTED]> wrote: > On 15 Oct 2005 22:47:45 GMT, John Bokma <[EMAIL PROTECTED]> wrote > or quoted : > >>Opera seems to be making money with it. Also, Firefox gets money from >>Google kickback. Maybe MS had a similar idea in mind, but it failed >>(remember how they wanted to

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
"Mike Schilling" <[EMAIL PROTECTED]> wrote: > "John Bokma" <[EMAIL PROTECTED]> wrote in message >> No, it's a recommendation, an advise, nothing else. Otherwise they >> would call it a standard. Why do you think W3C calls it >> recommendations? Because it are no standards. There is an ISO HTML >

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
[EMAIL PROTECTED] wrote: > Thanks for spelling it out for me. Now could you spell out what this > has to do with Microsoft's intentions? Making sure that even if there is a move of applications locally to running on the web, that they are selling 80% of the software that makes it happen. -- J

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
Roel Schroeven <[EMAIL PROTECTED]> wrote: > John Bokma wrote: >> Roel Schroeven <[EMAIL PROTECTED]> wrote: >> >>>John Bokma wrote: >> web based applications that work with any browser make OS irrelevant -> not true, since for OpenOffice it doesn't matter which Linux distribution one

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 16 Oct 2005 14:57:19 +, John Bokma wrote: > >> As soon as products can't evolve >> much more, the producers will find ways to make them even better >> compared to last week. > > So once a product can't evolve any more, then it will sudde

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
[EMAIL PROTECTED] wrote: > > John Bokma wrote: > >> No: the historical fact is that MS whiped Netscape of the planet. > > By giving IE away for free, by ripping off spyglass, by _paying_ OEMs > to not include Netscape. By bundling IE. By abusing standards. Which standards? Again: w3c is not an

The value of Big-O notation is for scale ability and the value of the constant of proportionality!

2005-10-16 Thread Casey Hawthorne
The value of Big-O notation is for scale ability, since quite often a an algorithm used for small N is forgotten about in a large program and not changed when the program has to deal with larger inputs. It's also useful to know the constant of proportionality, for different platforms, for code opt

Re: os.access with wildcards

2005-10-16 Thread mike
os.path.exists() -- http://mail.pyth

Perl-Python-a-Day: split a file full path

2005-10-16 Thread Xah Lee
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core part and a extension part. For example: '/Users/t/web/perl-python/I_Love_You.html' becomes &#x

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > But if you are unlikely to discover this worst case behaviour by > experimentation, you are equally unlikely to discover it in day to > day usage. Yes, that's the whole point. Since you won't discover it by experimentation and you won't discover it by

Re: UI toolkits for Python

2005-10-16 Thread Robert Hicks
Grant Edwards wrote: > Aside from the look & feel issue with Tk, the other objection > sometimes heard is that Tk is integrated into Python by > including Tcl as well (as opposed to doing an actual Tk binding > the way some other languages have done). It's an eminently > practical approach, but

Re: Comparing lists

2005-10-16 Thread James Dennett
Steven D'Aprano wrote: > On Sat, 15 Oct 2005 18:17:36 +0200, Christian Stapfer wrote: > > I'd prefer a (however) rough characterization of computational complexity in terms of Big-Oh (or Big-whatever) *anytime* to marketing-type characterizations like this one... >>> >>>Oh how nai

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On 16 Oct 2005 12:30:06 -0700, [EMAIL PROTECTED] wrote or quoted : >The only reason that Linux/OpenOffice/GIMP/Apachee/MySQL/ The catch is there are SO many SQL engines, even if MS bought up MySQL and PostGre SQL one of the others would just pop to the fore as the new free standard bearer. see h

Re: Python on the Power PC

2005-10-16 Thread Peter Milliken
Nope, spoke too soon! The Pocket PC seemed to be doing something and I thought it was OK - obviously you can't just copy "lib-tk" into the Pocket PC Python\Lib directory. What else might I be missing? Peter "Peter Milliken" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks for

Re: Python on the Power PC

2005-10-16 Thread Peter Milliken
Thanks for the reply Matt - you must have customised things though from the distribution because this can't (and doesn't! :-)) work i.e. I have (already) placed the python23.zip into \Program Files\Python\Lib but there is no lib-tk off that point (which is what I believe the .append instruction doe

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Steven D'Aprano
On Sun, 16 Oct 2005 14:07:37 -0700, Paul Rubin wrote: > The complexity of hashing depends intricately on the the data and if > the data is carefully constructed by someone with detailed knowledge > of the hash implementation, it may be as bad as O(n) rather than O(1) > or O(sqrt(n)) or anything li

Re: Jargons of Info Tech industry

2005-10-16 Thread Mike Meyer
Roedy Green <[EMAIL PROTECTED]> writes: > On Sat, 15 Oct 2005 23:24:21 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote or > quoted : >>How about pdf? > My complaint with it is it is Adobe proprietary. This make the tools > very expensive. No, it isn't. The standard is publicly available, so anyone c

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Steven D'Aprano
On Sun, 16 Oct 2005 20:28:55 +0200, Christian Stapfer wrote: > Experiments > (not just in computer science) are quite > frequently botched. How do you discover > botched experiments? Normally by comparing them to the results of other experiments, and being unable to reconcile the results. You may

Re: Microsoft Hatred FAQ

2005-10-16 Thread Ten
> Q: Are you confident enough to bet your wifes and daughters for > what you say? > > A: No. But I put my reputation in. > --- Hang on... ... BAHAHAHAHAHA!! Your "reputation", sir, is of import only to billy-goats who happen to be debating whether to cross the bridge today. Thanks for o

Re: UI toolkits for Python

2005-10-16 Thread Claudio Grondi
"Steve Holden" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Claudio Grondi wrote: > > "Kenneth McDonald" <[EMAIL PROTECTED]> wrote in > > news:[EMAIL PROTECTED] > > > >>Thanks for reminding me of Gtk. OK, add that to the list. > >> > >>The Web Browser interface is good for si

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Meyer
"Jeroen Wenting" writes: >>> IBM's prediction that there would be 5 computers (not counting game >>> computers like the Comodores and Spectrums) by 2000 would likely have >>> come >>> true. >> I see. You're a troll. > nope, I'm just sick and tired of trolls like you calling everyone who > doesn'

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Meyer
Greymaus <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> You clearly weren't paying attention to what the rest >> of the microcomputer industry was doing while Gates was selling IBM >> non-existent software. While IBM was introducing 16-bit processors and >> DOS was doing a flat file system, Tan

Re: Calling an exe from Python?

2005-10-16 Thread SPE - Stani's Python Editor
Slightly offtopic, but you can translate any double clicking (*.exe, *.pdf, *.html, ...) in the Windows Explorer into: import os os.startfile(fileName) Stani -- SPE - Stani's Python Editor http://pythonide.stani.be -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > I don't really know why and I don't particularly care. I think it has a > lot to do with support costs and may also have to do with the type of deals > Microsoft offers. It has nothing to do with support costs. It has everything to do with the t

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Meyer
"Peter T. Breuer" <[EMAIL PROTECTED]> writes: > In comp.os.linux.misc Jeroen Wenting > wrote: >> Without Microsoft 90% of us would never have seen a computer more powerful >> than a ZX-81 and 90% of the rest of us would never have used only dumb >> mainframe terminals. > Uh - when microsoft pro

Re: UI toolkits for Python

2005-10-16 Thread Mike Meyer
Malte Clasen <[EMAIL PROTECTED]> writes: > Claudio Grondi wrote: >> What is that complex, that it can't be solved using an Internet Browser as a >> GUI? > > Nothing, but session management isn't trivial with http > interfaces. You have to deal with the back button of the browsers, > bookmarks to p

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-16 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > The underlying implementation is an AVL balanced binary tree with > inorder threading. Dan Bernstein argues for switching from hash tables to crit-bit trees (a/k/a Patricia trees), because of their guaranteed worst case performance. He also claims:

popen4

2005-10-16 Thread billie
Hi all. I'm trying to execute system commands and capture the output by using popen4: stdout example: >>>exec_cmd = popen2.popen4("echo hello!") >>>output = exec_cmd[0].read() hello stderr example: >>>exec_cmd = popen2.popen4("echobv hello!") >>>output = exec_cmd[0].read() Unrecognized command

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Paul Rubin
Ognen Duzlevski <[EMAIL PROTECTED]> writes: > > Optimizations have a tendency to make a complete mess of Big O > > calculations, usually for the better. How does this support your > > theory that Big O is a reliable predictor of program speed? > > There are many things that you cannot predict, how

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roel Schroeven
John Bokma wrote: > Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>John Bokma wrote: > > >>>web based applications that work with any browser make OS irrelevant >>>-> not true, since for OpenOffice it doesn't matter which Linux >>>distribution one runs (or even if it's Linux), yet people seem

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Ognen Duzlevski
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 16 Oct 2005 15:16:39 +0200, Christian Stapfer wrote: > > It turned out that the VAX compiler had been > > clever enough to hoist his simple-minded test > > code out of the driving loop. > Optimizations have a tendency to make a complete me

Re: Calling an exe from Python?

2005-10-16 Thread Sam Pointon
from subprocess import Popen proc = Popen('my_programme.exe') Use proc.communicate(input) to send input to stdin, and get a tuple of (stdout, stderr) back. If you need the returncode, use proc.poll() or proc.wait(), depending on if you want it to block or not. -- http://mail.python.org/mailman/l

Re: tuple versus list

2005-10-16 Thread Bryan
[EMAIL PROTECTED] wrote: > In this particular case, it seems that (width,height) looks nicer. But > I think otherwise, list constuct is easier to read, even though it is > supposed to be slower. > > With list you can : > [a] + [ x for x in something ] > > With tuple it looks like this : > (a,) +

Calling an exe from Python?

2005-10-16 Thread will . h . brown
Hi! I'm new to Python and I need to call an executable file from my script. Is that possible, and if so, how? Thank you! whb -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-16 Thread Pascal Bourguignon
Roedy Green <[EMAIL PROTECTED]> writes: > 3. You don't have to guess what the end user will see. If you include the fonts, which makes big documents which slows down the loading and rendering... I've seen quite a number of PDF that are ill-rendered or not rendered at all. -- "You cannot really

Re: Jargons of Info Tech industry

2005-10-16 Thread Bengt Richter
On 16 Oct 2005 00:31:38 GMT, John Bokma <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Bengt Richter) wrote: > >> On Tue, 04 Oct 2005 17:14:45 GMT, Roedy Green >> <[EMAIL PROTECTED]> wrote: >> >>>On Tue, 23 Aug 2005 08:32:09 -0500, l v <[EMAIL PROTECTED]> wrote or quoted : >>> I think e-mail

Re: Microsoft Hatred FAQ

2005-10-16 Thread riplin
John Bokma wrote: > No: the historical fact is that MS whiped Netscape of the planet. By giving IE away for free, by ripping off spyglass, by _paying_ OEMs to not include Netscape. By bundling IE. By abusing standards. By contracting with sites to include non-standard IE features to deliberately

Re: Comparing lists

2005-10-16 Thread Ron Adam
Christian Stapfer wrote: > "Ron Adam" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Christian Stapfer wrote: >> >>>"Ron Adam" <[EMAIL PROTECTED]> wrote in message >>>news:[EMAIL PROTECTED] >>> >>> Christian Stapfer wrote: >This discussion begins to sound

Problem with Win32all

2005-10-16 Thread Cy Edmunds
I am running Python 2.4 on Windows XP. My Win32all was working fine until recently. Now whenever I run the UI, no other application will start! I did all the obvious things like uninstall and reinstall win32all, reboot, etc. Any ideas? -- Cy http://home.rochester.rr.com/cyhome/ -- http://m

Re: subtle side effect of generator/generator expression

2005-10-16 Thread [EMAIL PROTECTED]
> Are you saying that the bugs it causes aren't subtle? *wink* Exactly. Destructive generator problems are caught almost immediately. -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 16 Oct 2005 19:42:11 +0200, Christian Stapfer wrote: > >> Pauli's prediction of >> the existence of the neutrino is another. It took >> experimentalists a great deal of time and patience >> (about 20 years, I am

Re: Need advice on finding memory leak

2005-10-16 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >I am having trouble identifying the source of a memory leak in a >Windows Python program. The basic gist is as follows: Perhaps Python Memory Validator can help you? http://www.softwareverify.com/beta.php Stephen -- Stephen Kelle

Re: How to get a raised exception from other thread

2005-10-16 Thread Lasse Vågsæther Karlsen
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > >> Nevermind. I found a better solution. I used shared memory to create >> a keep-alive flag. I then use the select function with a specified >> timeout, and recheck the keep-alive flag after each timeout. > > > As Dennis points out, your origi

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 16 Oct 2005 15:16:39 +0200, Christian Stapfer wrote: > >> Come to think of an experience that I shared >> with a student who was one of those highly >> creative experimentalists you seem to have >> in mind. He

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-16 Thread Andrew Koenig
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dave Hansen wrote: >> So lose the "if." >> >>R = C then A else B I think that part of the argument for the "A if C else B" syntax is that "then" is not currently a reserved word. -- http://mail.python.org/mailman

[ANN] Speed up Charmap codecs with fastcharmap module

2005-10-16 Thread Tony Nelson
Fastcharmap is a python extension module that speeds up Charmap codecs by about 5 times. Usage: import fastcharmap fastcharmap.hook('codec_name') Fastcharmap will then speed up calls that use that codec, such as unicode(str, 'codec_name') an

Re: TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)

2005-10-16 Thread Peter Otten
arotem wrote: > Hi, > > I am trying to call an unbound method (PrintInput) with the object > instance as the first argument but getting the following error: > "TypeError: unbound method PrintInput() must be called with test > instance as first argument (got test instance instead)" > > Below is t

Re: Comparing lists

2005-10-16 Thread Steven D'Aprano
On Sun, 16 Oct 2005 19:42:11 +0200, Christian Stapfer wrote: > Pauli's prediction of > the existence of the neutrino is another. It took > experimentalists a great deal of time and patience > (about 20 years, I am told) until they could finally > muster something amounting to "experimental proof"

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Ron Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: >> "Ron Adam" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>Christian Stapfer wrote: >>> >>> This discussion begins to sound like the recurring arguments one hears betwe

Need advice on finding memory leak

2005-10-16 Thread mark . engelberg
I am having trouble identifying the source of a memory leak in a Windows Python program. The basic gist is as follows: 1. Generate a directed graph (approx. 1000 nodes). 2. Write the graph to a file. 3. Use the os.system command to invoke another program which processes the graph file (graphViz), a

Re: Microsoft Hatred FAQ

2005-10-16 Thread Steven D'Aprano
On Sun, 16 Oct 2005 14:57:19 +, John Bokma wrote: > As soon as products can't evolve > much more, the producers will find ways to make them even better > compared to last week. So once a product can't evolve any more, then it will suddenly start evolving much more. Right. Well, I thin

Re: Jargons of Info Tech industry

2005-10-16 Thread Ben Pfaff
Roedy Green <[EMAIL PROTECTED]> writes: > End users HATE PDF. Why? > > It takes so long for the reader to load. xpdf comes up almost instantly here. Maybe end users should consider finding a better PDF reader. -- "Your correction is 100% correct and 0% helpful. Well done!" --Richard Heathfield

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Ron Adam
Christian Stapfer wrote: > It turned out that the VAX compiler had been > clever enough to hoist his simple-minded test > code out of the driving loop. In fact, our VAX > calculated the body of the loop only *once* > and thus *immediately* announced that it had finished > the whole test - the

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: > >> As to the value of complexity theory for creativity >> in programming (even though you seem to believe that >> a theoretical bent of mind can only serve to stifle >> creativity), the story of

Re: Function to execute only once

2005-10-16 Thread Lasse Vågsæther Karlsen
Bengt Richter wrote: > >>> tmp = 0 > >>> def execute(): > ... global tmp, execute > ... tmp = cellvar = tmp + 1 > ... def execute(): > ... return cellvar > ... return tmp On man did this put my head into a spin :P -- Lasse Vågsæther Karlsen http://usinglvkblog.bl

Re: Microsoft Hatred FAQ

2005-10-16 Thread Greymaus
Tim Hammerquist wrote: > > I loved my little CoCo! I had the original CoCo, upgraded with > the 5 1/4" floppy drive, and later upgraded the whole system to > CoCo 3 with OS9. > I put the piggyback RAM board in, which gave me, I think, 1 Meg of RAM. I also found that the whole system ran faster

Re: Comparing lists

2005-10-16 Thread Ron Adam
Christian Stapfer wrote: > "Ron Adam" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Christian Stapfer wrote: >> >> >>>This discussion begins to sound like the recurring >>>arguments one hears between theoretical and >>>experimental physicists. Experimentalists tend >>>to overra

Re: TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)

2005-10-16 Thread Diez B. Roggisch
arotem wrote: > Hi, > > I am trying to call an unbound method (PrintInput) with the object > instance as the first argument but getting the following error: > "TypeError: unbound method PrintInput() must be called with test > instance as first argument (got test instance instead)" > > Below is th

keeping unit test info out of pydoc -w?

2005-10-16 Thread schwehr
Hi All, Is there an easy way to keep the unittest stuff out of the documentation that gets generated by pydoc -w? I just want to exclude the "Methods inherited from unittest.TestCase:" section. Thanks! -kurt -- http://mail.python.org/mailman/listinfo/python-list

TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)

2005-10-16 Thread arotem
Hi, I am trying to call an unbound method (PrintInput) with the object instance as the first argument but getting the following error: "TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)" Below is the sample code (test) for this

Re: Microsoft Hatred FAQ

2005-10-16 Thread Richard Gration
On Sun, 16 Oct 2005 11:51:16 +, Tim Tyler wrote: > Acorn computers. Manufacturers of the best computer I ever owned. I'm willing to bet that was an Arc ... ? I never used one but everyone I've ever talked to who used one said it was fantastic. Myself I was pretty impressed with the BBC B ...

Re: Function to execute only once

2005-10-16 Thread Bengt Richter
On 14 Oct 2005 12:11:58 -0700, "PyPK" <[EMAIL PROTECTED]> wrote: >Hi if I have a function called >tmp=0 >def execute(): >tmp = tmp+1 >return tmp > >also I have >def func1(): >execute() > >and >def func2(): >execute() > > >now I want execute() function to get execute

Re: Jargons of Info Tech industry

2005-10-16 Thread Roedy Green
On Sat, 15 Oct 2005 23:24:21 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote or quoted : >>I try to explain Java each day both on my website on the plaintext >>only newsgroups. It is so much easier to get my point across in HTML. >How about pdf? End users HATE PDF. Why? It takes so long for the re

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On Sun, 16 Oct 2005 11:49:58 +0200, "Jeroen Wenting" wrote or quoted : >They are the ones who lowered the price of shrinkwrapped software for home >and office application from thousands or tens of thousands to hundreds of >dollars. Come now. While software generally has reduced in price, MS so

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On Sat, 15 Oct 2005 22:22:58 -0700, "David Schwartz" <[EMAIL PROTECTED]> wrote or quoted : >I guess I wasn't explicit enough. Most people who want cars also want an >engine. Some don't. Dealers could sell cars and engines separately. They >just (generally) don't. There is nothing illegal or

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On Sat, 15 Oct 2005 15:48:18 -0700, "David Schwartz" <[EMAIL PROTECTED]> wrote or quoted : >Go down to your local car dealer and see if you can buy a new car >without an engine. Given that that the OS and the hardware come from completely different companies, I think that a specious analogy.

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On 16 Oct 2005 05:22:47 GMT, John Bokma <[EMAIL PROTECTED]> wrote or quoted : >No, it's a recommendation, an advise, nothing else. Otherwise they would >call it a standard. Why do you think W3C calls it recommendations? Because >it are no standards. There is an ISO HTML standard though, but when

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On 16 Oct 2005 00:47:09 GMT, John Bokma <[EMAIL PROTECTED]> wrote or quoted : >Ok, let me spell it out for you: If all your applications are web based, >and the OS shouldn't matter, why do Linux distributions matter? The point is you make your choice based on quality of the OS and distribution,

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On 15 Oct 2005 22:47:45 GMT, John Bokma <[EMAIL PROTECTED]> wrote or quoted : >Opera seems to be making money with it. Also, Firefox gets money from >Google kickback. Maybe MS had a similar idea in mind, but it failed >(remember how they wanted to add ads to keywords in webpages?) There also ha

Re: Length of read in in python-gpib

2005-10-16 Thread Dietmar Schwertberger
In article <[EMAIL PROTECTED]>, Madhusudan Singh mailto:[EMAIL PROTECTED]> wrote: > python-gpib provides Gpib.py (see end of post) for Linux. > > I am trying to use the method called read. I usually use it without > arguments (the default length being 512). However, I am trying to read in a > stri

Re: Microsoft Hatred FAQ

2005-10-16 Thread Roedy Green
On Sat, 15 Oct 2005 22:30:41 GMT, Tim Roberts <[EMAIL PROTECTED]> wrote or quoted : > >>Without Microsoft 90% of us would never have seen a computer more powerful >>than a ZX-81 and 90% of the rest of us would never have used only dumb >>mainframe terminals. > >Utter hogwash. Computer hardware

Re: Microsoft Hatred FAQ

2005-10-16 Thread Mike Schilling
"John Bokma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Mike Schilling" <[EMAIL PROTECTED]> wrote: > >> >> "John Bokma" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> Which standards? W3C doesn't make standards (they talk about working >>> drafts and rec

Re: subtle side effect of generator/generator expression

2005-10-16 Thread [EMAIL PROTECTED]
thanks. I was looking for scanl in itertools but can't find it so I implement my own then run into some subtle bugs which first made me think my scanl is the problem. Then notice my wrong perception about generator(and iterable in general, though the built-in iterables like list, dict don't seem to

Re: subtle side effect of generator/generator expression

2005-10-16 Thread Steven D'Aprano
On Sun, 16 Oct 2005 15:52:54 +0200, Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >> I initially thought that generator/generator expression is cool (sort of >> like the lazy evaluation in Haskell) until I notice this side effect. >> >> >>>a=(x for x in range(2)) >> >>>list(a) >> [1,2] >> >>>

Re: subtle side effect of generator/generator expression

2005-10-16 Thread [EMAIL PROTECTED]
True. That is why I have now reverted back to use list whenever possible. As while list can also be modified(say in a multi-thread situation), at least if I don't do the update(coding policy, practice or whatever), they are sort of "guaranteed". I would only use generator as IO monad in Haskell, i

Re: subtle side effect of generator/generator expression

2005-10-16 Thread Simon Percivall
If you find that you want to iterate over an iterable multiple times, have a look at the solution that the tee() function in the itertools module provides (http://docs.python.org/lib/itertools-functions.html). (Have a look at the rest of the itertools module as well, for that matter.) -- http://m

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Steven D'Aprano
On Sun, 16 Oct 2005 15:16:39 +0200, Christian Stapfer wrote: > Come to think of an experience that I shared > with a student who was one of those highly > creative experimentalists you seem to have > in mind. He had just bought a new PC and > wanted to check how fast its floating point > unit was

Re: subtle side effect of generator/generator expression

2005-10-16 Thread Fredrik Lundh
Diez B. Roggisch wrote: > Files allow to seek, in addition to stream semantics. Some files. Not all files support seek operations. Some only support forward seek. -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-16 Thread joe
John Bokma <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > > John Bokma <[EMAIL PROTECTED]> writes: > > > >> [EMAIL PROTECTED] wrote: > >> > >> > John Bokma <[EMAIL PROTECTED]> writes: > >> > > >> >> "David Schwartz" <[EMAIL PROTECTED]> wrote: > >> >> > > >> >> > "Tim Roberts" <[EM

Re: wxPython & Cygwin

2005-10-16 Thread Diez B. Roggisch
> I'm sure the Cygwin world would be grateful if you or someone else were > to establish the correct build procedure. For Qt? I found it on the Qt free edition site, and followed the instructionbs. Not much to do there. But make sure you have _plenty_ of time. It took me _days_ to compile Qt. N

Re: odbc errors

2005-10-16 Thread Roger Upole
[EMAIL PROTECTED] wrote: > hi > > i have a piece of code: > ... > > def connectdb(sql): >import dbi >import odbc >import sys >try: >s = odbc.odbc('DSN=CONN;UID=user;PWD=pass') >cur = s.cursor() > # cur.execute("set nocount on") >cur.execute(sql) >

Re: subtle side effect of generator/generator expression

2005-10-16 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > That is exactly what I meant, in fact. These IO thing are expected to > have side effects so they are not subtle. Generator on the other hand, > is sort of "clever iteratables". > > Now that I notice that, Of course I can be sure I would be careful. But > what about the

Re: Comparing lists

2005-10-16 Thread Fredrik Lundh
Christian Stapfer wrote: > As to the value of complexity theory for creativity > in programming (even though you seem to believe that > a theoretical bent of mind can only serve to stifle > creativity), the story of the discovery of an efficient > string searching algorithm by D.E.Knuth provides a

Re: wxPython & Cygwin

2005-10-16 Thread Steve Holden
Diez B. Roggisch wrote: >>>Why? Use windows python, wxPython for it - and put it in your path to >>>use it inside cygwin. >>> >> >>Don't think that'll work for an extension module. > > > Sure it will. You can call whatever program you want from cygwin, as > long as it is in the path. No differe

Re: tuple versus list

2005-10-16 Thread [EMAIL PROTECTED]
In this particular case, it seems that (width,height) looks nicer. But I think otherwise, list constuct is easier to read, even though it is supposed to be slower. With list you can : [a] + [ x for x in something ] With tuple it looks like this : (a,) + tuple(x for x in something) I think the li

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
Roel Schroeven <[EMAIL PROTECTED]> wrote: > John Bokma wrote: >> web based applications that work with any browser make OS irrelevant >> -> not true, since for OpenOffice it doesn't matter which Linux >> distribution one runs (or even if it's Linux), yet people seem to >> make a point of which d

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 16 Oct 2005 05:26:51 +, John Bokma wrote: > >> Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> >>> On Sun, 16 Oct 2005 00:47:09 +, John Bokma wrote: >>> Ok, let me spell it out for you: If all your applications are web based,

Re: Microsoft Hatred FAQ

2005-10-16 Thread John Bokma
"David Schwartz" <[EMAIL PROTECTED]> wrote: > > "John Bokma" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> Ok, let me spell it out for you: If all your applications are web >> based, and the OS shouldn't matter, why do Linux distributions >> matter? It doesn't matter which

  1   2   >