Re: Probability Problem

2006-04-25 Thread Elliot Temple
I think I got it. I noticed my code is essentially the same as Tim Peter's (plus the part of the problem he skipped). I read his code 20 minutes before recreating mine from Alex's hints. Thanks! def main(): ways = ways_to_roll() total_ways = float(101**10) running_total = 0

Re: MS VC++ Toolkit 2003, where?

2006-04-25 Thread Fredrik Lundh
Robert Kern wrote: > Martin v. Löwis wrote: > > Robert Kern wrote: > > > >>Oh, that's right, you need an import library for Python24.dll . > > > > That shouldn't be a problem: that library is included with Python. > > For mingw, too? I.e. a .a not a .lib? last time I tinkered with mingw, it could

Re: MS VC++ Toolkit 2003, where?

2006-04-25 Thread Ron Adam
Alex Martelli wrote: > Ron Adam <[EMAIL PROTECTED]> wrote: >... >> I still get the following with the tinyurl link: >> >> ~~~ >> The download you requested is unavailable. If you continue to see this >> message when trying to access this download, go to the "Search for a >> Download" area on t

Re: python application ideas.

2006-04-25 Thread Tim Parkin
Anthony Greene wrote: > Hello, I know this isn't really a python centric question, but I'm seeking > help from my fellow python programmers. I've been learning python for the > past year and a half, and I still haven't written anything substantial nor > have I found an existing project which blows

Re: MinGW and Python

2006-04-25 Thread Fredrik Lundh
Brian Elmegaard wrote > > the gcc project is to provide a portable compiler, not one that > > generates the best code for any given platform. And in that goal, it > > succeeds remarkably well. > > Will a python program be slower on the same machine running windows > compared to linux? a better op

Re: Why new Python 2.5 feature "class C()" return old-style class ?

2006-04-25 Thread Bengt Richter
On Sun, 23 Apr 2006 22:12:01 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: [...] >(IMO the proper way to indicate the you don't have a tuple is to use None or >some other sentinel, >not abuse a perfectly legal tuple value). > > >>> dis.dis(compile('class X:pass','','exec')) > 1 0 LOAD_

A QFB agent: how to catch C-level crashes and last Python stack ?

2006-04-25 Thread robert
When employing complex UI libs (wx, win32ui, ..) and other extension libs, nice "only Python stack traces" remain a myth. Currently I'm hunting again a rare C-level crash bug of a Python based Windows app with rare user reports - and still in the dark (I get snippets of machine stack traces / s

Re: MS VC++ Toolkit 2003, where?

2006-04-25 Thread Edward Elliott
Alex Martelli wrote: > OK, I've placed on http://www.aleax.it/Python/ the files that pybench > writes (with the -file option) for each machines, the names are > onmbp.txt and onwin2k.txt -- just 20k each (I'm not sure their format is > documented, but I guess that, worst case, one just needs to stu

Re: Counting elements in a list wildcard

2006-04-25 Thread Iain King
hawkesed wrote: > If I have a list, say of names. And I want to count all the people > named, say, Susie, but I don't care exactly how they spell it (ie, > Susy, Susi, Susie all work.) how would I do this? Set up a regular > expression inside the count? Is there a wildcard variable I can use? > He

Re: Counting elements in a list wildcard

2006-04-25 Thread John Machin
On 25/04/2006 3:15 PM, Edward Elliott wrote: > Phoneme matching seems overly complex and might > grab things like Tsu-zi. It might *only* if somebody had a rush of blood to the head and devised yet another phonetic key "algorithm". Tsuzi does *not* give the same result as any of Suzi, Suzie, Su

Re: Instruction at "0x00FC3D70" use memory address "0x00000000". Can't be "read".

2006-04-25 Thread bruno at modulix
> On Apr 24, 2006, at 5:38 PM, Neil Adams wrote: > >> How do Ifix memory message Ox033fc512 at Ox can't be read I think the first think to do would be to read this: http://www.catb.org/~esr/faqs/smart-questions.html -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1]

Re: python application ideas.

2006-04-25 Thread bruno at modulix
Tim Parkin wrote: > Anthony Greene wrote: > >>Hello, I know this isn't really a python centric question, but I'm seeking >>help from my fellow python programmers. I've been learning python for the >>past year and a half, and I still haven't written anything substantial nor >>have I found an existi

Re: Multiple hierarchies and method overloading

2006-04-25 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "Ben Cartwright" <[EMAIL PROTECTED]> wrote: >Philippe Martin wrote: > >> I renamed A_Func(self) to fix that ... but is there a cleaner way around ? > >When using multiple inheritence, the order of the base classes matters! When you have to start worrying about com

Re: Can you create an instance of a subclass with an existing instance of the base class?

2006-04-25 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, bruno at modulix <[EMAIL PROTECTED]> wrote: >Lawrence D'Oliveiro wrote: >(snip) >> I think you're taking Python's OO-ness too seriously. One of the >> strengths of Python is that it can _look_ like an OO language without >> actually being OO. > >According to whic

Re: Multiple hierarchie and method overloading

2006-04-25 Thread bruno at modulix
Philippe Martin wrote: > Hi, > > > > > I have something like this: > > Class A: > def A_Func(self, p_param): > . > Class B: > def A_Func(self): > . > > Class C (A,B): > A.__init__(self) If that's really your code, you should have an exception

Re: need a thread to keep a socket connection alive?

2006-04-25 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > the data comming in is alway in 158 bytes though. And one day it may not. :) Consider yourself warned! (In a friendly manner.) -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple hierarchie and method overloading

2006-04-25 Thread bruno at modulix
Philippe Martin wrote: > Hi, > > I have something like this: > > Class A: > def A_Func(self, p_param): > . > Class B: > def A_Func(self): > . > > Class C (A,B): > A.__init__(self) > B.__init__(self) > > . > > self.A_Func() #

Re: python application ideas.

2006-04-25 Thread momolulu
That's really the right thing I want to know , I am a Python newbie ,and learn to know that python is very strong ability in large scale application , as a beginner , what is the first useful and meaningful widget can we create through Python ? -- http://mail.python.org/mailman/listinfo/python

Re: catching doctype using xml.sax -- please

2006-04-25 Thread Diez B. Roggisch
Sakcee wrote: > Hi > > I would really appreciate if soemone can point me to the direction. how > can I use xml.sax to catch doctype entities. > > there is a xml.sax.DTDHandler , but how should i use it? As all other handlers: XMLReader.setDTDHandler(handler) Diez -- http://mail.python.org/m

Re: test assignmet problem

2006-04-25 Thread bruno at modulix
Paolo Pantaleo wrote: (snip) > Thnx for the help, > actually the problme is not solved > > i have [well I want to do...] something like: > > if a=b(): >do stuff with a > else if a=c(): >do stuff with b where does this 'b' come from ? > else: >do other stuff > > well, two solutions

Re: Counting elements in a list wildcard

2006-04-25 Thread John Machin
On 25/04/2006 6:26 PM, Iain King wrote: > hawkesed wrote: >> If I have a list, say of names. And I want to count all the people >> named, say, Susie, but I don't care exactly how they spell it (ie, >> Susy, Susi, Susie all work.) how would I do this? Set up a regular >> expression inside the count?

Re: Looking for resources for making the jump from Java to Python easier and more productive

2006-04-25 Thread bruno at modulix
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > bruno at modulix <[EMAIL PROTECTED]> wrote: > > >>Lawrence D'Oliveiro wrote: >> (snip) >>>I suppose this is an instance of the more general rule: "using OO when >>>you don't have to". >> >>Lawrence, I'm afraid you're confusing OO wi

Re: RESOLVED Re: PYTHONPATH

2006-04-25 Thread bruno at modulix
Brian van den Broek wrote: > Hi all, > > As a fairly new linux user running ubuntu 5.10 I'd had problems > persistently setting my PYTHONPATH environment variable. bruno and > Edward got me most of the way (thanks!); I'm posting what worked for > future googling. > (snip) > The syntax that worked

Re: test assignmet problem

2006-04-25 Thread Duncan Booth
bruno at modulix wrote: > Almost : > > a = b() > if a: > do_stuff_with_b(a) > else: > a = c() > if a: > do_stuff_with_c(a) > else: > do_other_stuff() > > > Now there are probably better ways to write this, but this would require > more knowledge about your real code. if there a

Re: Multiple hierarchies and method overloading

2006-04-25 Thread bruno at modulix
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > "Ben Cartwright" <[EMAIL PROTECTED]> wrote: > > >>Philippe Martin wrote: >> >> >>>I renamed A_Func(self) to fix that ... but is there a cleaner way around ? >> >>When using multiple inheritence, the order of the base classes matters!

Re: The whitespaceless frontend

2006-04-25 Thread bearophileHUGS
Stelios Xanthakis: >in my opinion nested functions are not so important and I wouldn't spend any >time to improve them. Usually you can do anything with classes< Some people like and use them often (like those ones coming from Pascal-like languages, etc), some other people (like those coming fro

Re: The whitespaceless frontend

2006-04-25 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > Some people like and use them often (like those ones coming from > Pascal-like languages, etc), some other people (like those coming > from C-like languages like Java) use them rarely and like classes > more. Python can choose to have just one way to solve

OOP / language design question

2006-04-25 Thread cctv . star
I was wondering, why you always have to remember to call bases' constructors explicitly from the derived class constructor? Why hasn't this been enforced by the language? -- http://mail.python.org/mailman/listinfo/python-list

Re: python application ideas.

2006-04-25 Thread Daniel Nogradi
> Hello, I know this isn't really a python centric question, but I'm seeking > help from my fellow python programmers. I've been learning python for the > past year and a half, and I still haven't written anything substantial nor > have I found an existing project which blows my hair back. Python i

Re: Probability Problem

2006-04-25 Thread Peter Tillotson
I had a possibly similar problem calculating probs related to premium bond permutation. With 10^12 memory ran out v quickly. In the end I got round it by writing a recursive function and quantising the probability density function. Elliot Temple wrote: > Problem: Randomly generate 10 integers from

Re: OOP / language design question

2006-04-25 Thread Rene Pijlman
[EMAIL PROTECTED]: >I was wondering, why you always have to remember to call bases' >constructors explicitly from the derived class constructor? Why hasn't >this been enforced by the language? Probably because the language doesn't know whether the subclass wants to override its base class's constr

Re: OOP / language design question

2006-04-25 Thread Heiko Wundram
Am Dienstag 25 April 2006 12:34 schrieb [EMAIL PROTECTED]: > I was wondering, why you always have to remember to call bases' > constructors explicitly from the derived class constructor? Why hasn't > this been enforced by the language? Because sometimes you don't want to call the base classes cons

Re: OOP / language design question

2006-04-25 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I was wondering, why you always have to remember to call bases' > constructors explicitly from the derived class constructor? Why hasn't > this been enforced by the language? I have another question for you: why does JAVA enforce that a constructor of a base-class must

Re: MinGW and Python

2006-04-25 Thread Brian Elmegaard
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > It would certainly be possible to distribute a gcc-compiled python. > However, what is the point in doing so? Cygwin already includes > a gcc-compiled Python, for Windows: Interesting. > That is simply not true. Actually, you answered me then too

Re: Counting elements in a list wildcard

2006-04-25 Thread Iain King
John Machin wrote: > On 25/04/2006 6:26 PM, Iain King wrote: > > hawkesed wrote: > >> If I have a list, say of names. And I want to count all the people > >> named, say, Susie, but I don't care exactly how they spell it (ie, > >> Susy, Susi, Susie all work.) how would I do this? Set up a regular >

Re: Looking for resources for making the jump from Java to Python easier and more productive

2006-04-25 Thread ToddLMorgan
Thanks for those ... just by looking at the colour of the links in my browser I'd only found 4 of those already so I appreciate the heads up :- ) -- http://mail.python.org/mailman/listinfo/python-list

Re: MinGW and Python

2006-04-25 Thread Brian Elmegaard
Robert Kern <[EMAIL PROTECTED]> writes: > If you meant writing extension modules for Python instead of extending > distutils, I thought about extending distutils to make non-python installers. I may have misunderstood the answers I got. http://groups.google.com/group/comp.lang.python/browse_thre

Re: MinGW and Python

2006-04-25 Thread Brian Elmegaard
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > a better optimizer usually results in programs that run faster, not slower. Got it the wrong after some editing ;-( -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://www.rugbyklubben-speed.dk -- http://mail.py

Re: OOP / language design question

2006-04-25 Thread cctv . star
Diez B. Roggisch wrote: > I have another question for you: why does JAVA enforce that a constructor of > a base-class must be called prior to everything else in the derived class's > constructor? Well, I can imagine it's done to make sure that the base(s) are properly constructed. Sound s sensible

Re: OOP / language design question

2006-04-25 Thread cctv . star
Heiko Wundram wrote: > Because sometimes you don't want to call the base classes constructors? Sounds strange to me at the moment, but I'll try to adjust to this thought. > Python zen says: "Better explicit than implicit," and in this case it hits > the nail on the head. Better to see right away

Re: OOP / language design question

2006-04-25 Thread Rene Pijlman
[EMAIL PROTECTED]: >I think I'll need some shift in thinking after C++. +1 qotw -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP / language design question

2006-04-25 Thread Diez B. Roggisch
> Well, I can imagine it's done to make sure that the base(s) are > properly constructed. Sound s sensible to me. It often is - there are popular examples in python where missing a constructor will cause a program to fail spectacular. But is it _always_ a sensible thing to do? No. If you only want

Re: Counting elements in a list wildcard

2006-04-25 Thread John Machin
On 25/04/2006 8:51 PM, Iain King wrote: > John Machin wrote: >> On 25/04/2006 6:26 PM, Iain King wrote: >>> hawkesed wrote: If I have a list, say of names. And I want to count all the people named, say, Susie, but I don't care exactly how they spell it (ie, Susy, Susi, Susie all work

Re: OOP / language design question

2006-04-25 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Heiko Wundram wrote: >> Because sometimes you don't want to call the base classes constructors? > Sounds strange to me at the moment, but I'll try to adjust to this > thought. It makes sense in more static languages such as C++. The base class is initialised by the con

RE: Accessing Parallel Port in Python Error : Priviledged Instruction

2006-04-25 Thread your
type your message here -- http://mail.python.org/mailman/listinfo/python-list

Zope 3

2006-04-25 Thread Derick van Niekerk
I have been developing in PHP for some time now and needed to look into application frameworks to speed up my development. I was looking into Horde and CakePHP before I was introduced to Python. I started learing python and within a few *hours* I already wrote my first small program and I still use

Re: Hooking things up in GUI application

2006-04-25 Thread sturlamolden
Ryan Ginstrom wrote: > Apropos recent threads about GUI editors, coming from a Win32/WTL C++ > background, I actually like the idea of being able to (easily) create GUIs > programmatically. > > But I still see a lot of the same tedium: hooking up events to handlers, and > getting data into and ou

Re: OOP / language design question

2006-04-25 Thread bruno at modulix
Duncan Booth wrote: (snip) > Usually though, if a subclass doesn't immediately call the base class > constructors as the first thing it does in __init__ it indicates poor code > and should be refactored. Not necessarily. It's a common case to have some computations to do/some attributes to set i

Re: OOP / language design question

2006-04-25 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > I was wondering, why you always have to remember to call bases' > constructors s/constructors/__init__/ the __init__() method is *not* the constructor. Object's instanciation is a two-stage process: __new__() is called first, then __init__(). -- bruno desthuillier

Re: Can you create an instance of a subclass with an existing instance of the base class?

2006-04-25 Thread bruno at modulix
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > bruno at modulix <[EMAIL PROTECTED]> wrote: > > >>Lawrence D'Oliveiro wrote: >>(snip) >> >>>I think you're taking Python's OO-ness too seriously. One of the >>>strengths of Python is that it can _look_ like an OO language without >

Re: MinGW and Python

2006-04-25 Thread sturlamolden
Martin v. Löwis wrote: > - there is no build process available to do that In MSYS: $ ./configure --prefix=/c/mingw $ make $ make install This should be obvious to any with Unix experience. MinGW actually distribute precompiled Python binaries as well (in MSYS-DTK). > - people building extens

PIL / libjpeg install problem

2006-04-25 Thread mikko . koivunen
Hello all, I am installing the Python Imaging Library (1.1.5). Following the README that came with PIL sources, I ran "path/to/python setup.py build_ext -i" which informed me that JPEG support is OK. However when I run "path/to/python selftest.py" from the same package, I get an IOError: decoder

Re: Zope 3

2006-04-25 Thread bruno at modulix
Derick van Niekerk wrote: > I have been developing in PHP for some time now and needed to look into > application frameworks to speed up my development. I was looking into > Horde and CakePHP before I was introduced to Python. I started learing > python and within a few *hours* I already wrote my f

Re: Parsing XML/XSLT

2006-04-25 Thread Stefan Behnel
veracon wrote: > I'm looking to use XML and XSLT for templates in a system I'm writing, > however I'm not really sure which parser is the "best". Basically, > which library has the most features, and which is the most supported? lxml arguably has the most features by now, as it is based on libxml2

Re: MinGW and Python

2006-04-25 Thread sturlamolden
Robert Kern wrote: > - gcc does not optimize particularly well. That is beyond BS. The more recent gcc releases optimize as well as any commercial compiler. GCC 4 may even optimize better than MSVC. GCC is the compiler used to build the Linux kernel and MacOSX. If it can deal with this I say it

Re: How to search HUGE XML with DOM?

2006-04-25 Thread Stefan Behnel
Sullivan WxPyQtKinter wrote: > My search needs: > 1. Search and return all the record (an element) with specific id. > 2. Search and return all the record whose child nodes has a specific id > or attribute. Try lxml, which is based on the libxml2 library. The current SVN version has support for xm

Re: OOP / language design question

2006-04-25 Thread Carl Banks
[EMAIL PROTECTED] wrote: > Heiko Wundram wrote: > > Because sometimes you don't want to call the base classes constructors? > Sounds strange to me at the moment, but I'll try to adjust to this > thought. In Java and C++, classes have private members that can only be accessed by the class itself (a

Re: MinGW and Python

2006-04-25 Thread sturlamolden
Robert Kern wrote: > Dunno. Depends on the machine. Depends on the program. Depends on how the > interpreter and any extension modules and underlying libraries were built. > Depends on which Linux and which Windows. > > I'm sorry, but your question is a non sequitur. I don't understand its > rel

Re: need a thread to keep a socket connection alive?

2006-04-25 Thread nephish
yeah, he he -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP / language design question

2006-04-25 Thread Duncan Booth
bruno at modulix wrote: > Duncan Booth wrote: > (snip) >> Usually though, if a subclass doesn't immediately call the base class >> constructors as the first thing it does in __init__ it indicates poor >> code and should be refactored. > > Not necessarily. It's a common case to have some computati

Re: MinGW and Python

2006-04-25 Thread sturlamolden
I forgot to mention that C libraries built with Visual C++ and MinGW are binary compatible. MinGW can link libararies and object files from Visual C++. Although Python may be build with Visual C++, you can still compile and link your C extensions with MinGW. -- http://mail.python.org/mailman/lis

RE: MinGW and Python

2006-04-25 Thread Ames Andreas
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > g] On Behalf Of sturlamolden > Sent: Tuesday, April 25, 2006 2:27 PM > Subject: Re: MinGW and Python > > > Robert Kern wrote: > > > - gcc does not optimize particularly well. > > That is beyond BS. The more re

Re: OOP / language design question

2006-04-25 Thread Carl Banks
bruno at modulix wrote: > [EMAIL PROTECTED] wrote: > > I was wondering, why you always have to remember to call bases' > > constructors > > > s/constructors/__init__/ > > the __init__() method is *not* the constructor. Object's instanciation > is a two-stage process: __new__() is called first, t

Re: python application ideas.

2006-04-25 Thread Fredrik Lundh
"momolulu" wrote: > That's really the right thing I want to know , I am a Python newbie > ,and learn to know that python is very strong ability in large scale > application , as a beginner , what is the first useful and meaningful > widget can we create through Python ? What makes you think tha

EuroPython 2006: Call for papers

2006-04-25 Thread Armin Rigo
Hi all, A shameless plug and reminder for EuroPython 2006 (July 3-5): * you can submit talk proposals until May 31st. * there is a refereed papers track; deadline for abstracts: May 5th. See the full call for papers below. A bientot, Armin Rigo & Carl Friedrich Bolz ==

Re: OOP / language design question

2006-04-25 Thread Duncan Booth
Carl Banks wrote: > You know, Python's __init__ has almost the same semantics as C++ > constructors (they both initialize something that's already been > allocated in memory, and neither can return a substitute object). There is a significant difference: imagine B is a base type and C a subclas

Re: python application ideas.

2006-04-25 Thread RK
I need a python source code diagrammer that actually works out-of-the-box to explore all the code already written out there. something like SmallWorlds was to java before they got rid of it. -- http://mail.python.org/mailman/listinfo/python-list

RE: Hooking things up in GUI application

2006-04-25 Thread Ryan Ginstrom
> Behalf Of sturlamolden > If you use PyGTK (it also runs on Windows), you can design > the GUI with > GLADE and then use libglade to import the gui as an xml-resource. Yes, I've tried something similar with wxGlade. Nice, but it doesn't seem to remove the most tedious work -- hooking up handlers

MySQLdb "begin()" -

2006-04-25 Thread shearichard
Hi - Feeling a bit weird about this but I cannot find the 'begin' method on a connection object of MySQLdb. Can anyone explain why ? I'm using version 1.2.0 which is pretty recent and I've read that 'begin' should be a method of connection but it's not there ! Feeling pretty puzzled ! Below are t

Re: Zope 3

2006-04-25 Thread Benji York
bruno at modulix wrote: > Zope is a world in itself - and is certainly not the simplest tool to > learn (nor the most pythonic). Those statements apply more to Zope 2 than Zope 3 (and Zope 2 is moving more and more toward Zope 3 these days). One of Zope 3's main goals was to focus on the Python

Re: Python on Nintendo DS

2006-04-25 Thread Richard Tew
An update to my Python on Nintendo DS efforts. Summary: - Working bug free port of Python for the Nintendo DS. - Programmers wanted to help write extensions to expose the DS hardware to Python. - Stackless Python supported, but not bug free. When I last worked on it, it had several remaining bu

I have problems with creating the classic game Wumpus. the file: http://esnips.com/webfolder/b71bfe95-d363-4dd3-bfad-39999a9e36d0

2006-04-25 Thread conny . ledin
Im trying to create a version of the game Wumpus. Mine is called Belzebub. But im STUCK! And its due tuesday 2 maj. Im panicing! Can some one help me?? here is the file: http://esnips.com/webfolder/b71bfe95-d363-4dd3-bfad-3a9e36d0 What i have the biggest problems with now is between line 8 and

I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-25 Thread connyledin
Im trying to create a version of the game Wumpus. Mine is called Belzebub. But im STUCK! And its due tuesday 2 maj. Im panicing! Can some one help me?? here is the file: http://esnips.com/webfolder/b71bfe95-d363-4dd3-bfad-3a9e36d0 What i have the biggest problems with now is between line 8 a

Re: Multiple hierarchies and method overloading

2006-04-25 Thread Philippe Martin
Well, the whole point was to clean up my code: Actually this is what I have: Class A: def A_Func(self, p_param): . Class B: def A_Func(self): . Class C (A,B): A.__init__(self) B.__init__(self) Class D (A,B): A.__init__(self)

Re: Multiple hierarchie and method overloading

2006-04-25 Thread Philippe Martin
Thanks, I'll try that. Philippe Ben Cartwright wrote: > Philippe Martin wrote: >> I have something like this: >> >> Class A: >> def A_Func(self, p_param): >> . >> Class B: >> def A_Func(self): >> . >> >> Class C (A,B): >> A.__init__(self) >>

Re: MySQLdb "begin()" -

2006-04-25 Thread Geoffrey Clements
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi - Feeling a bit weird about this but I cannot find the 'begin' > method on a connection object of MySQLdb. Can anyone explain why ? > > I'm using version 1.2.0 which is pretty recent and I've read that > 'begin' should be a method of

Re: Hooking things up in GUI application

2006-04-25 Thread sturlamolden
Ryan Ginstrom wrote: > > Behalf Of sturlamolden > > If you use PyGTK (it also runs on Windows), you can design > > the GUI with > > GLADE and then use libglade to import the gui as an xml-resource. > > Yes, I've tried something similar with wxGlade. Nice, but it doesn't seem to > remove the most t

Re: MinGW and Python

2006-04-25 Thread Alex Martelli
sturlamolden <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: > > > Dunno. Depends on the machine. Depends on the program. Depends on how > > the interpreter and any extension modules and underlying libraries were > > built. Depends on which Linux and which Windows. > > > > I'm sorry, but your que

Re: MinGW and Python

2006-04-25 Thread Alex Martelli
sturlamolden <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: > > > - gcc does not optimize particularly well. > > That is beyond BS. The more recent gcc releases optimize as well as any > commercial compiler. GCC 4 may even optimize better than MSVC. > > GCC is the compiler used to build the Li

Re: Hooking things up in GUI application

2006-04-25 Thread sturlamolden
Ryan Ginstrom wrote: > Yes, I've tried something similar with wxGlade. But GLADE is not wxGlade :-) wxGlade is a GUI designer for wxWidgets and wxPython. It looks a bit like GLADE on the surface, but does not share any code with GLADE. GLADE is a GUI designer for GTK, gtkmm, Mono, GNOME and Py

Re: OOP / language design question

2006-04-25 Thread Carl Banks
Duncan Booth wrote: > In other words, the object is constructed in Python before any __init__ is > called, but in C++ it isn't constructed until after all the base class > constructors have returned. That's true. Good point. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: python application ideas.

2006-04-25 Thread Thomas Bartkus
"Anthony Greene" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, I know this isn't really a python centric question, but I'm seeking > help from my fellow python programmers. I've been learning python for the > past year and a half, and I still haven't written anything substant

Re: Zope 3

2006-04-25 Thread Steve Juranich
Derick van Niekerk wrote: > I love Python! Then I was introduced to Zope by freak accident. While > Zope looked like the answer to my dillemma, I still can't get my head > wrapped around it. Is it because I don't know Python well enough? Or is > it just that difficult to learn? I've been hacking

Re: OOP / language design question

2006-04-25 Thread bruno at modulix
Duncan Booth wrote: > bruno at modulix wrote: > > >>Duncan Booth wrote: >>(snip) >> >>>Usually though, if a subclass doesn't immediately call the base class >>>constructors as the first thing it does in __init__ it indicates poor >>>code and should be refactored. >> >>Not necessarily. It's a comm

Re: Zope 3

2006-04-25 Thread bruno at modulix
Benji York wrote: > bruno at modulix wrote: > >> Zope is a world in itself - and is certainly not the simplest tool to >> learn (nor the most pythonic). > > > Those statements apply more to Zope 2 than Zope 3 (and Zope 2 is moving > more and more toward Zope 3 these days). One of Zope 3's main

How do I open a mysql database with python

2006-04-25 Thread Moishy Gluck
How do I open a mysql database with python. I nead a module that is compatible with windows, and will be on any regular server I singup with. if you could give me some documentation on the module that would be good also. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Zope 3

2006-04-25 Thread bruno at modulix
Steve Juranich wrote: > Derick van Niekerk wrote: (snip) >>I would like to start my next web project (a database of demographic >>info on scientists in Africa) on Zope 3. Could anybody point me in the >>right direction? Where should I start? > > > After you look through the tutorial (which is si

RE: Hooking things up in GUI application

2006-04-25 Thread Ryan Ginstrom
> Behalf Of sturlamolden > Ryan Ginstrom wrote: > > > Yes, I've tried something similar with wxGlade. > > But GLADE is not wxGlade :-) Yes, I'm just saying that I've done something similar to your example. In fact, wxCard also does this auto-generation of handlers. That's a start, but it's still

Re: How do I open a mysql database with python

2006-04-25 Thread sturlamolden
http://sourceforge.net/projects/mysql-python -- http://mail.python.org/mailman/listinfo/python-list

Re: FOUNDIT (was Re: massive threading performance)

2006-04-25 Thread Paul Sijben
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > Paul Sijben <[EMAIL PROTECTED]> wrote: > >> I found that the problem was caused by the sending thread not giving >> control back quickly enough to the receiving thread. >> >> Also in going through the code I found an old self.s.setblo

How do I set the __debug__ flag in a win32com server?

2006-04-25 Thread ago
Hi all, When I use my win32com.server object from an excel client, the python process running the server always has __debug__==True. When using a python client the __debug__ flag for the server is determined by the client (i.e. if I start the client with 'python -o client.py' then __debug__ == Fal

Re: Coming from delphi - looking for an IDE - willing to spend money

2006-04-25 Thread RunLevelZero
Check out SciTE. It is from the creator of Scintilla and it's great. It's not a full IDE but with python you'll learn you really don't need it, at least IMHO. It's fast and works on windows and Linux. http://www.scintilla.org/SciTE.html I would also checkout WingIDE. Its one of the best, again

Re: Zope 3

2006-04-25 Thread Egon Frerich
What is pythonic? See: http://faassen.n--tree.net/blog/view/weblog/2005/08/06/0 bruno at modulix schrieb am 25.04.2006 17:10: > Benji York wrote: >> bruno at modulix wrote: >> >>> Zope is a world in itself - and is certainly not the simplest tool to >>> learn (nor the most pythonic). >> >> Those

Re: MinGW and Python

2006-04-25 Thread Scott David Daniels
sturlamolden wrote: > Robert Kern wrote: >> - gcc does not optimize particularly well. > That is beyond BS. > The more recent gcc releases optimize as well as any > commercial compiler. This is an outrageous claim. Having worked a bit doing compilers, I no of no commercial compiler that wou

Re: Hooking things up in GUI application

2006-04-25 Thread sturlamolden
Ryan Ginstrom wrote: > But I don't want to argue this point, just state that this isn't the problem > I want to solve. I really liked the idea of KVO/KVC in Cocoa that James > Stroud mentioned. That is what I am after, or something like that. If there > isn't anything like that, I think that it m

Re: Zope 3

2006-04-25 Thread Steve Juranich
bruno at modulix wrote: > Actually, the OP was asking about Zope3, which is a *very* different > beast. Okay, so my ignorance is showing (/me pauses to stuff it back where it belongs). So is there some big master diff, along the lines of "What's new in Python X.X" that I could look at to get an

Tkinter: Dynamic entry widget

2006-04-25 Thread Arne
Hello ! I want to create entry widgets dynamically. var = ["one", "two", "three"] i=0 for x in var: textbox = "t_", x textbox = entry(frame) textbox.grid(row=4+i, column=0) i = i + 1 This works ok. On the window are the entries like I want. When I want to get to entered data from

Dell Support Web Site Automation.

2006-04-25 Thread S. D. Rose
Hello all. Awhile back I was playing with win32all package to get system information from the Dell PCs. However, I'm using a win32 program, bginfo, to get the information on the PC and insert it into a MySQL database. Of the fields I'm recording, I am saving the system serial number. I was w

Re: MinGW and Python

2006-04-25 Thread Edward Elliott
Alex Martelli wrote: > At the same time, if the 14% slowdown is representative, then it's not > true that the compiler responsible for it "optimizes as well" as the > other; indeed, "does not optimize particularly well", under such a > hypothesis, would be far from a "beyond BS" assertion. Maybe s

Re: MinGW and Python

2006-04-25 Thread Edward Elliott
Alex Martelli wrote: > about MacOSX, which also uses gcc: 14% faster pybench using Python 2.4.3 this is the second time I've seen that 14% figure. OOC, where does it come from? the data sets you posted show an average 12.6% speedup. 14 is an odd way to round. :) I don't think it's very useful

  1   2   3   >