Question about subclassing - version 2

2006-09-08 Thread Frank Millman
Hi all I recently posted a question about subclassing. I did not explain my full requirement very clearly, and my proposed solution was not pretty. I will attempt to explain what I am trying to do more fully, and describe a possible solution. It is still not pretty, so I would appreciate any comme

Re: the first arg to super() must be a type, not a class obj?

2006-09-08 Thread Georg Brandl
metaperl wrote: > On p.282 of "Python Cookbook" and in the Python docs on calling super: > http://www.python.org/download/releases/2.2.3/descrintro/#cooperation > > it is clear that the first argument to super is a class and not a type. > However, for the code below, I am getting an error when att

Re: Question about subclassing - version 2

2006-09-08 Thread bearophileHUGS
Frank Millman, just a short note, more expert people can give you better answers. There aren't abstract classes in Python. They are all concrete. You may have classes with undefined methods (they may raise NotImplementedError). Multiple inheritance isn't supported by Java and Ruby, but it is suppor

Re: the first arg to super() must be a type, not a class obj?

2006-09-08 Thread Andre Meyer
Another thing: how does super() work wrt. multiple inheritance? It seems like it returns only the first superclass.regardsAndreOn 9/8/06, Georg Brandl <[EMAIL PROTECTED]> wrote: metaperl wrote:> On p.282 of "Python Cookbook" and in the Python docs on calling super:> http://www.python.org/download/

Re: wxPython: StaticText Event

2006-09-08 Thread David
Il Fri, 08 Sep 2006 10:24:52 +1000, John McMonagle ha scritto: > If you want to create static text that responds to mouse events, try > using the wx.lib.stattext.GenStaticText class. > > Add the following import: > > import wx.lib.stattext > > Then, > > self.st = wx.lib.stattext.GenStaticTex

Re: Question about subclassing - version 2

2006-09-08 Thread Frank Millman
[EMAIL PROTECTED] wrote: > Frank Millman, just a short note, more expert people can give you > better answers. There aren't abstract classes in Python. They are all > concrete. You may have classes with undefined methods (they may raise > NotImplementedError). > Multiple inheritance isn't supporte

Re: wxPython: StaticText Event

2006-09-08 Thread David
Il Fri, 08 Sep 2006 02:32:41 +0200, Amaury Forgeot d'Arc ha scritto: > I quick Google search found the following thread: > > http://lists.wxwidgets.org/archive/wx-users/msg31855.html > or > http://lists.wxwidgets.org/archive/wx-users/msg31983.html > > It suggest that you use another kind of cont

Re: Positive lookahead assertion

2006-09-08 Thread Steve Holden
tobiah wrote: >>>Posted via a free Usenet account from http://www.teranews.com >> >>Its all about context. If you want to match something but only if it >>precedes something else, then you follow the regular expression for >>'something' by the regular expression for 'something else' where >>`someth

Javadoc style python manual?

2006-09-08 Thread xiong . xu . cn
Hi there, I'm new to python and I'm from the java world. Though I love to learn python, I'm not very comfortable with the python documentation. Because when i read jdk doc, i can see the class hierachy, class member, class methods etc in html docs. It's very easy for me to understand the Java lang

Re: Negation in regular expressions

2006-09-08 Thread Steve Holden
George Sakkis wrote: > It's always striked me as odd that you can express negation of a single > character in regexps, but not any more complex expression. Is there a > general way around this shortcoming ? Here's an example to illustrate a > use case: > > import re > > # split with '@' as d

Re: Question about subclassing - version 2

2006-09-08 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: > Frank Millman, just a short note, more expert people can give you > better answers. There aren't abstract classes in Python. Well... There's no "abstract" modifier at least - but there still are abstract classes, ie not meant to be directly instanciated. You mentioned No

Re: the first arg to super() must be a type, not a class obj?

2006-09-08 Thread Steve Holden
metaperl wrote: > On p.282 of "Python Cookbook" and in the Python docs on calling super: > http://www.python.org/download/releases/2.2.3/descrintro/#cooperation > > it is clear that the first argument to super is a class and not a type. > However, for the code below, I am getting an error when att

Re: help with unicode email parse

2006-09-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, neoedmund wrote: > john , you can look my code: > it downloads email and save to local filesystem(filename and email > contains non-english characters) > it works now. > but i still think python's unicode string is not as straightforward as > java's > string SHOULD always b

Re: Question about subclassing - version 2

2006-09-08 Thread Bruno Desthuilliers
Frank Millman wrote: > Hi all > > I recently posted a question about subclassing. I did not explain my > full requirement very clearly, and my proposed solution was not pretty. > I will attempt to explain what I am trying to do more fully, and > describe a possible solution. It is still not pretty

Re: the first arg to super() must be a type, not a class obj?

2006-09-08 Thread Steve Holden
Andre Meyer wrote: > Another thing: how does super() work wrt. multiple inheritance? It seems > like it returns only the first superclass. > The whole point of super is that it returns the first superclass in the MRO that *follows* the class of the (first) argument. It's this behaviour that mak

Re: Best Middle Tier Architechure?

2006-09-08 Thread Bruno Desthuilliers
Butternut Squash wrote: > What do you guys recommend for doing middle tier in python. > I want to hide the database from the application Why ? -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.

Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)

2006-09-08 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > Bruno Desthuilliers wrote: > > SQLite never pretended to be a full-blown RDBMS - just a lightweight > > simple embedded database as SQL-compliant as possible. > > Ah, *you* haven't read the documentation either! > > "as SQL-compliant as possible"? > > ROTFLMAO! No need t

Re: Javadoc style python manual?

2006-09-08 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > I'm new to python and I'm from the java world. > Though I love to learn python, I'm not very comfortable with the python > documentation. > Because when i read jdk doc, i can see the class hierachy, class > member, class methods etc in html docs. It's very easy for me to

mobile phone app

2006-09-08 Thread Aravind
hi, Can anyone tell me if python can be used for developing mobile phone apps as Java ? If yes, any comparisons ? Also pls tell me where i can get the tools and tutorials for the same... Thanks in advance... -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter listbox:get

2006-09-08 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> Wrote: | Hi, | I need help about Tkinter.I want,when somebody click on some item in | listbox,then | in new entry widget must write that item | | Regards, | Vedran I have already covered the retrieval from the listbox in another thread. You can set the entry box contents lik

Re: Javadoc style python manual?

2006-09-08 Thread Rob Wolfe
[EMAIL PROTECTED] wrote: > Hi there, > > I'm new to python and I'm from the java world. > Though I love to learn python, I'm not very comfortable with the python > documentation. > Because when i read jdk doc, i can see the class hierachy, class > member, class methods etc in html docs. It's very

Re: how do you get the name of a dictionary?

2006-09-08 Thread MonkeeSage
Simon Brunning wrote: > It's not inconcevable that Python could behave that way, it's just > that it would impose an overhead on the 99.999% of Python users who > would have no use for the feature. It's a price not worth paying. I guess I don't get the problem with the OP's request, either. There

Re: Javadoc style python manual?

2006-09-08 Thread db
On Fri, 08 Sep 2006 01:11:06 -0700, xiong.xu.cn wrote: > Hi there, > > I'm new to python and I'm from the java world. > Though I love to learn python, I'm not very comfortable with the python > documentation. > Because when i read jdk doc, i can see the class hierachy, class > member, class metho

Re: Question about subclassing - version 2

2006-09-08 Thread Bruno Desthuilliers
Frank Millman wrote: > [EMAIL PROTECTED] wrote: >> There aren't abstract classes in Python. They are all >> concrete. (snip) > I use the term 'abstract class' in the abstract sense :-) > > Say I have three classes where 90% of the attributes and methods are > common. It makes sense to create a ba

Re: Negation in regular expressions

2006-09-08 Thread Ant
Steve Holden wrote: > George Sakkis wrote: > > It's always striked me as odd that you can express negation of a single > > character in regexps, but not any more complex expression. Is there a > > general way around this shortcoming ? The whole point of regexes is that they define expressions to

Re: change property after inheritance

2006-09-08 Thread Maric Michaud
Le jeudi 07 septembre 2006 15:33, Steven Bethard a écrit : > Well, lambda's not going away[1], Sure, they won't. > but there's no *need* for lambda here. >   It could be written as:: Le jeudi 07 septembre 2006 17:16, George Sakkis a écrit : > Sure, it *could*; whether it *should* is a different

Re: mobile phone app

2006-09-08 Thread bryan rasmussen
The S60 series of phones from nokia supports python http://www.google.com/search?hl=en&q=s60+nokia Cheers, Bryan Rasmussen On 9/8/06, Aravind <[EMAIL PROTECTED]> wrote: > hi, > > Can anyone tell me if python can be used for developing mobile phone apps as > Java ? If yes, any comparisons ? Also p

Re: Question about subclassing - version 2

2006-09-08 Thread Frank Millman
Bruno Desthuilliers wrote: > Frank Millman wrote: > > [EMAIL PROTECTED] wrote: > >> There aren't abstract classes in Python. They are all > >> concrete. > (snip) > > I use the term 'abstract class' in the abstract sense :-) > > > > Say I have three classes where 90% of the attributes and methods a

Re: Question about subclassing - version 2

2006-09-08 Thread Maric Michaud
Le vendredi 08 septembre 2006 09:51, [EMAIL PROTECTED] a écrit : > Frank Millman, just a short note, more expert people can give you > better answers. There aren't abstract classes in Python. They are all > concrete. Really ? This is like saying there is no singleton in Python... class AbstractCla

Re: how do you get the name of a dictionary?

2006-09-08 Thread Simon Brunning
On 8 Sep 2006 02:24:49 -0700, MonkeeSage <[EMAIL PROTECTED]> wrote: > I guess I don't get the problem with the OP's request, either. There is > already a name<->identifier mapping in place for objects. Do you mean a name<->object mapping? This, I think, isn't true. There is a name->object mapping

Re: how do you get the name of a dictionary?

2006-09-08 Thread Steve Holden
MonkeeSage wrote: > Simon Brunning wrote: > >>It's not inconcevable that Python could behave that way, it's just >>that it would impose an overhead on the 99.999% of Python users who >>would have no use for the feature. It's a price not worth paying. > > > I guess I don't get the problem with th

Re: mobile phone app

2006-09-08 Thread Ganesan Rajagopal
> Aravind <[EMAIL PROTECTED]> writes: > Can anyone tell me if python can be used for developing mobile phone apps as > Java ? If yes, any comparisons ? Also pls tell me where i can get the tools > and tutorials for the same... Not in the same league as J2ME, but in some restricted cases, yes

Re: xmingw and f2py

2006-09-08 Thread Nick Craig-Wood
Flavio <[EMAIL PROTECTED]> wrote: > has anyone tried to build extensions for win32 on Linux using > xmingw? I don't know about xmingw, but we use mingw on linux to compile stuff for windows all the time. (We use the mingw package under debian) We build extensions using mingw but linked to the

Re: Request for tips on my first python script.

2006-09-08 Thread Bruno Desthuilliers
Lex Hider wrote: > Hi, > Apologies if this is against etiquette. I've just got my first python app up > and running. It is a podcast aggregator depending on feedparser. I've really > only learnt enough to get this up and running. > > Any tips on the code quality and use of python would be apprec

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-09-08 Thread Xah Lee
i just want to make it known that i think most if not all of the replies in this thread are of not much technical value. They are either wrong and or misleading, and the perl module mentioned about sorting or the Java language aspect on sorting, as they are discussed or represented, are rather stup

Re: xmingw and f2py

2006-09-08 Thread Flavio
Thanks Nick, It seems that xmingw package in gentoo is the same as the mingw on debian, from the directory structure and executables you mention. I'll give it a try and if works with f2py, I'll post a complete tutorial after I am done for other people to follow. Thanks a lot. Nick Craig-Wood w

Is it just me, or is Sqlite3 goofy?

2006-09-08 Thread Magnus Lycka
While I can understand your frustration, I think it is important to think about the tone in our postings here. Hydrocephalus is one of the most common birth defects, and it's not terribly unlikely that someone who reads this has a family member or someone else in his proximity who suffers from this

Re: Add NTLM proxy authentication to urllib2

2006-09-08 Thread looping
Thanks for the answers. I've done some tests with urllib2 and pywin32 and managed to partialy implement the NTLM authentication, but it look like you need a persistent connection (http 1.1 or 'Keep-Alive') to complete the authentication. Unfortunatly, urllib2 use a new connection for each request

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread Francach
Hi, thanks for the helpful reply. I wanted to do two things - learn to use Beautiful Soup and bring out all the information in the bookmarks file to import into another application. So I need to be able to travel down the tree in the bookmarks file. bookmarks seems to use header tags which can the

Re: Question about subclassing - version 2

2006-09-08 Thread Maric Michaud
Le vendredi 08 septembre 2006 10:15, Bruno Desthuilliers a écrit : > You > mentioned NotImplementedError, which is indeed the usual way to make > something "abstract" in Python. Hummm, some more thoughts about this. I can imagine class hierarchies where the presence of not implemented methods do

ctypes listing dll functions

2006-09-08 Thread marc . wyburn
hi all and before I start I apologise if I have this completely muddled up but here goes. I'm trying to call functions from a dll file in a python script but I can't work out what functions are available. I'm using ctypes. I've tried using dir(ctypes_object) but the resultant output looks like a

ctypes listing dll functions

2006-09-08 Thread marc . wyburn
hi all and before I start I apologise if I have this completely muddled up but here goes. I'm trying to call functions from a dll file in a python script but I can't work out what functions are available. I'm using ctypes. I've tried using dir(ctypes_object) but the resultant output looks like a

Re: Request for tips on my first python script.

2006-09-08 Thread Sybren Stuvel
Lex Hider enlightened us with: > Any tips on the code quality and use of python would be appreciated. > I've got a feeling the overall structure is up the creek. I'll post some remarks about the code ;-) > HOME = os.path.expanduser("~") I wouldn't use this. Just use os.environ['HOME']. In most c

Re: Request for tips on my first python script.

2006-09-08 Thread Maric Michaud
Le vendredi 08 septembre 2006 13:41, Sybren Stuvel a écrit : > > HOME = os.path.expanduser("~") > > I wouldn't use this. Just use os.environ['HOME']. In most cases it > turns out to be the same directory, but it adds more flexibility. If > someone wants your app to read/write to another directory,

Re: xmingw and f2py

2006-09-08 Thread Flavio
Hi Nick, I followed the steps you describe exactly and I am still gettin this error message when i try to compile. here is the command I give: f2py -c --compiler=/opt/xmingw/bin/i386-mingw32msvc-gcc --f77exec=opt/xmingw/bi n/i386-mingw32msvc-g77 -L /opt/xmingw/i386-mingw32msvc/lib/ -lpython2.4 -

Re: Request for tips on my first python script.

2006-09-08 Thread Maric Michaud
Le vendredi 08 septembre 2006 13:56, Maric Michaud a écrit : > [EMAIL PROTECTED] jeu sep 07 09:17:51:~/test$ export HOME=/etc > [EMAIL PROTECTED] ven sep 08 13:53:17:/home/maric/test$ cd ~ > [EMAIL PROTECTED] ven sep 08 13:53:22:~$ pwd > /etc > [EMAIL PROTECTED] ven sep 08 13:55:46:~$ python -c 'im

Re: Best Middle Tier Architechure?

2006-09-08 Thread Felipe Almeida Lessa
2006/9/7, Butternut Squash <[EMAIL PROTECTED]>: > right now we are using c# and .net remoting in a way that just is not > efficient. > > I want to rewrite a lot of what we do in python. I have seen XML-RPC and > soap. Are there other options? It surely depends on what's going to be on the other s

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread George Sakkis
Francach wrote: > George Sakkis wrote: > > Francach wrote: > > > Hi, > > > > > > I'm trying to use the Beautiful Soup package to parse through the > > > "bookmarks.html" file which Firefox exports all your bookmarks into. > > > I've been struggling with the documentation trying to figure out how to

ANN: Leo 4.4.1.1 final released

2006-09-08 Thread Edward K. Ream
Leo 4.4.1.1 final September 3, 2006 Leo 4.4.1.1 final is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo 4.4.1.1 corrects a last-minute unicode bug in Leo 4.4.1. This version also adds the new slideshow plugin. L

A static pychecker?

2006-09-08 Thread Edward K. Ream
I am wondering whether anyone knows of a static source-code analyzer for Python, kinda like a static pychecker. That is, instead of being a run-time tool as pychecker is, it would be a 'compile-time' tool. If I were writing such a thing it would use the ast returned from compiler.parse. Unl

Re: A static pychecker?

2006-09-08 Thread Jean-Paul Calderone
On Fri, 8 Sep 2006 08:00:25 -0500, "Edward K. Ream" <[EMAIL PROTECTED]> wrote: >I am wondering whether anyone knows of a static source-code analyzer for >Python, kinda like a static pychecker. > >That is, instead of being a run-time tool as pychecker is, it would be a >'compile-time' tool. If I we

Re: A static pychecker?

2006-09-08 Thread skip
Edward> I am wondering whether anyone knows of a static source-code Edward> analyzer for Python, kinda like a static pychecker. Pychecker v2 was supposed to use source analysis instead of importing the modules. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it just me, or is Sqlite3 goofy?

2006-09-08 Thread A.M. Kuchling
I've made the following edits: Index: whatsnew25.tex === --- whatsnew25.tex (revision 51828) +++ whatsnew25.tex (working copy) @@ -2116,14 +2116,16 @@ SQLite embedded database, has been added to the standard library under

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread Francach
Hi George, Firefox lets you group the bookmarks along with other information into directories and sub-directories. Firefox uses header tags for this purpose. I'd like to get this grouping information out aswell. Regards, Martin. the idea is to extract. George Sakkis wrote: > Francach wrote: > >

Re: split string problems

2006-09-08 Thread Larry Bates
Tempo wrote: > Hey. I am trying to grab the prices from the string below but I get a > few errors when I try to do it: Take a look at the code and error > messages below for me and thanks you in advanced to all that help. > Thank you. Here's the code & error messages: > p > [ >

Re: PILGraph Upgrade or Alternative Suggestion

2006-09-08 Thread Larry Bates
Roger wrote: > Anyone have an updated version of PILGraph beyond 0.1a7 or a suggestion > for a light-weight alternative? > > By light-weight I mean something that doesn't require many/any packages > other than PIL and will create plain old round pie-chart PNG graphics > with titles and legends. I

Re: Best Middle Tier Architechure?

2006-09-08 Thread Wolfgang Keller
On Fri, 8 Sep 2006 03:59:46 +0200, Butternut Squash wrote (in article <[EMAIL PROTECTED]>): > I have seen XML-RPC and > soap. Are there other options? OmniORBpy Sincerely, Wolfgang Keller -- My email-address is correct. Do NOT remove ".nospam" to reply. -- http://mail.python.org/mailman/li

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread Paul Boddie
Francach wrote: > > Firefox lets you group the bookmarks along with other information into > directories and sub-directories. Firefox uses header tags for this > purpose. I'd like to get this grouping information out aswell. import libxml2dom # http://www.python.org/pypi/libxml2dom d = libxml2dom.

Re: Negation in regular expressions

2006-09-08 Thread George Sakkis
Paddy wrote: > George Sakkis wrote: > > It's always striked me as odd that you can express negation of a single > > character in regexps, but not any more complex expression. Is there a > > general way around this shortcoming ? Here's an example to illustrate a > > use case: > > > > >>> import re

Re: Question about subclassing - version 2

2006-09-08 Thread Bruno Desthuilliers
Frank Millman wrote: > Bruno Desthuilliers wrote: >> Frank Millman wrote: >>> [EMAIL PROTECTED] wrote: There aren't abstract classes in Python. They are all concrete. >> (snip) >>> I use the term 'abstract class' in the abstract sense :-) >>> >>> Say I have three classes where 90% of the

Re: Javadoc style python manual?

2006-09-08 Thread Michele Simionato
Ben Sizer wrote: > I agree that the Python docs aren't quite as effective as reference > material due to the lack of simple function and method lists though. http://docs.python.org/lib/modindex.html, pydoc and ipython are more than enough for me. Michele Simionato -- http://ma

Re: Negation in regular expressions

2006-09-08 Thread Ant
> >>> re.split(r'@#', s) > ['', ' This ', ' is a ', '', ' test '] > >>> [g.group(1) for g in re.finditer(r'(.*?)(?:@#|$)', s)] > ['', ' This ', ' is a ', '', ' test ', ''] If it's duplicating the behaviour of split, but returning an iterator instead, how about avoiding hacking around with messy re

Re: Question about subclassing - version 2

2006-09-08 Thread Frank Millman
Bruno Desthuilliers wrote: > Frank Millman wrote: > > > > I have not gone to the trouble of raising NotImplementedError - the > > methods that the subclasses *must* override just have a 'pass' > > statement. I guess it would be more correct to raise the error, as it > > would give me a quicker ind

Help with ctypes pointer return values

2006-09-08 Thread cantankerousoldgit
I am trying to call a DLL with a function like this: """DESCRIPTION: Get a list of objects attributes matching attribute values ARGUMENTS: session: [in] the current session classId: [in] the class Id of objects owning attributes to be returned rec

Re: ANN: Leo 4.4.1.1 final released

2006-09-08 Thread Claudio Grondi
Edward K. Ream wrote: > Leo 4.4.1.1 final September 3, 2006 > Leo 4.4.1.1 final is available at: > http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Doesn't run on my system (installed with the .exe): Python 2.4.2 Microsoft Windows XP

Re: Javadoc style python manual?

2006-09-08 Thread Ben Sizer
Michele Simionato wrote: > Ben Sizer wrote: > > I agree that the Python docs aren't quite as effective as reference > > material due to the lack of simple function and method lists though. > > http://docs.python.org/lib/modindex.html, pydoc and ipython are more > than enough for me. modindex is co

Debugging Builds

2006-09-08 Thread David Coffin
Hi, Is there any documentation concerning the Python debugging builds beyond section 1.5 in the Python/C API reference manual and Misc/ SpecialBuilds.txt file in the source code? I'd like to know how people generally go about debugging memory leaks in C extensions. Thanks, David -- htt

Re: xmingw and f2py

2006-09-08 Thread Nick Craig-Wood
Flavio <[EMAIL PROTECTED]> wrote: > I followed the steps you describe exactly and I am still gettin this > error message when i try to compile. > > here is the command I give: > > f2py -c --compiler=/opt/xmingw/bin/i386-mingw32msvc-gcc > n/i386-mingw32msvc-g77 -L /opt/xmingw/i386-mingw32msvc

Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread vbfoobar
Hello I am looking for python code that takes as input a list of strings (most similar, but not necessarily, and rather short: say not longer than 50 chars) and that computes and outputs the python regular expression that matches these string values (not necessarily strictly, perhaps the code is a

Re: Request for tips on my first python script.

2006-09-08 Thread Roberto Bonvallet
Lex Hider wrote: > Any tips on the code quality and use of python would be appreciated. I've > got a feeling the overall structure is up the creek. [...] >for opt, arg in opts: >if opt in ("-l", "--latest"): >latest = int(arg) >elif opt in ("--notfound"): >

Re: Javadoc style python manual?

2006-09-08 Thread Michele Simionato
Ben Sizer wrote: > Michele Simionato wrote: > > Ben Sizer wrote: > > > I agree that the Python docs aren't quite as effective as reference > > > material due to the lack of simple function and method lists though. > > > > http://docs.python.org/lib/modindex.html, pydoc and ipython are more > > tha

Re: Question about subclassing - version 2

2006-09-08 Thread Steve Holden
Frank Millman wrote: > Bruno Desthuilliers wrote: > >>Frank Millman wrote: >> >>>I have not gone to the trouble of raising NotImplementedError - the >>>methods that the subclasses *must* override just have a 'pass' >>>statement. I guess it would be more correct to raise the error, as it >>>would g

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread Ant
[EMAIL PROTECTED] wrote: > Hello > > I am looking for python code that takes as input a list of strings > (most similar, > but not necessarily, and rather short: say not longer than 50 chars) > and that computes and outputs the python regular expression that > matches > these string values (not ne

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread Andy Dingley
[EMAIL PROTECTED] wrote: > I am looking for python code that takes as input a list of strings > [...] and outputs the python regular expression (s1|s2|s3|s4|s5) for strings of "s1" etc. Regex compilers are themselves quite good at optimising beyond this -- http://mail.python.org/mailman/l

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread bearophileHUGS
[EMAIL PROTECTED]: > I am looking for python code that takes as input a list of strings > (most similar, > but not necessarily, and rather short: say not longer than 50 chars) > and that computes and outputs the python regular expression that > matches > these string values (not necessarily strictl

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread Paul McGuire
"Andy Dingley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > [EMAIL PROTECTED] wrote: > >> I am looking for python code that takes as input a list of strings >> [...] and outputs the python regular expression > >(s1|s2|s3|s4|s5) > for strings of "s1" etc. > > Regex compilers

Re: Javadoc style python manual?

2006-09-08 Thread Paul Boddie
Ben Sizer wrote: > [EMAIL PROTECTED] wrote: > > I'm new to python and I'm from the java world. > > Though I love to learn python, I'm not very comfortable with the python > > documentation. > > Because when i read jdk doc, i can see the class hierachy, class > > member, class methods etc in html do

Re: Help with ctypes pointer return values

2006-09-08 Thread Lawrence Oluyede
<[EMAIL PROTECTED]> wrote: > Does anyone have a good idea how I should define recordList so that I > can retrieve the record pointers? POINTER(POINTER(c_void)) ? Maybe I misunderstood tough... -- Lawrence - http://www.oluyede.org/blog "Nothing is more dangerous than an idea if it's the only one

Re: Accessing Add/Remove Programs Details

2006-09-08 Thread Phoe6
Tim Golden wrote: > [Phoe6] > and perhaps you need something like > this (altho' obviously more sophisticated): > > import wmi > > appname = "Python 2.4.3" > c = wmi.WMI () > for product in c.Win32_Product (Caption=appname): > print product.Caption > # product.Uninstall () > > Thanks Tim for

Re: threading support in python

2006-09-08 Thread km
  Where is Guido ? would be great to hear  his opinion on GIL/ GC issues in future versions of Python.   regards, KM   On 7 Sep 2006 08:02:57 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: On 2006-09-06, [EMAIL PROTECTED] <

Get CPU usage of a single process in Windows

2006-09-08 Thread Tor Erik
Hi, This should be possible as Taskmanager tracks CPU usage for every process... Anyone know how this can be done? regards -- http://mail.python.org/mailman/listinfo/python-list

Re: change property after inheritance

2006-09-08 Thread Steven Bethard
Maric Michaud wrote: > Le jeudi 07 septembre 2006 15:33, Steven Bethard a écrit : >> Well, lambda's not going away[1], > > Sure, they won't. > >> but there's no *need* for lambda here. >> It could be written as:: > > Le jeudi 07 septembre 2006 17:16, George Sakkis a écrit : >> Sure, it *could

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hello > > I am looking for python code that takes as input a list of strings > (most similar, > but not necessarily, and rather short: say not longer than 50 chars) > and that computes and outputs the python regular expression that > matches > these string values (not

Re: Accessing Add/Remove Programs Details

2006-09-08 Thread Tim Golden
Phoe6 wrote: > Tim Golden wrote: > > [Phoe6] > > and perhaps you need something like > > this (altho' obviously more sophisticated): > > > > import wmi > > > > appname = "Python 2.4.3" > > c = wmi.WMI () > > for product in c.Win32_Product (Caption=appname): > > print product.Caption > > # prod

Re: Get CPU usage of a single process in Windows

2006-09-08 Thread Tim Golden
Tor Erik wrote: > Hi, > > This should be possible as Taskmanager tracks CPU usage for every > process... Anyone know how this can be done? > WMI can probably do the trick. If you can find something on Google for wmi cpu usage (or something similar) then translation to Python's usually quite easy.

Re: Add NTLM proxy authentication to urllib2

2006-09-08 Thread John J. Lee
"looping" <[EMAIL PROTECTED]> writes: > I've done some tests with urllib2 and pywin32 and managed to partialy > implement the NTLM authentication, but it look like you need a > persistent connection (http 1.1 or 'Keep-Alive') to complete the > authentication. > Unfortunatly, urllib2 use a new conn

mysqldb + multi-threading

2006-09-08 Thread hg
Hi, I am writing a transaction server (socket-based) under windows. I use mysqldb to log info into MySQL. It is all working and I need now to decide whether to use forks (CreateProcess I guess) or threads. I saw in another thread that some db engines did have issues with being called from threa

Re: should urlparse return user and pass in separate components?

2006-09-08 Thread John J. Lee
"metaperl" <[EMAIL PROTECTED]> writes: > The urlparse with Python 2.4.3 includes the user and pass in the site > aspect of its parse: > > >>> scheme, site, path, parms, query, fid = > >>> urlparse.urlparse("http://bill:[EMAIL > >>> PROTECTED]/lib/module-urlparse.html") > > >>> site > 'bill:[EM

cx_Oracle question

2006-09-08 Thread Richard Schulman
I'm having trouble getting started using Python's cx_Oracle binding to Oracle XE. In forthcoming programs, I need to set variables within sql statements based on values read in from flat files. But I don't seem to be able to get even the following stripped-down test program to work: import cx_Orac

Re: cx_Oracle question

2006-09-08 Thread Uwe Hoffmann
Richard Schulman schrieb: > > cursor.execute("""select mean_eng_txt from mean > where mean_id=:arg_1""",arg_1) cursor.execute("""select mean_eng_txt from mean where mean_id=:arg_1""",{"arg_1":arg_1}) > Traceback (most recent call last): >File "oracle_te

Re: cx_Oracle question

2006-09-08 Thread Diez B. Roggisch
Richard Schulman schrieb: > I'm having trouble getting started using Python's cx_Oracle binding to > Oracle XE. In forthcoming programs, I need to set variables within sql > statements based on values read in from flat files. But I don't seem > to be able to get even the following stripped-down tes

Re: cx_Oracle question

2006-09-08 Thread Diez B. Roggisch
> cursor.execute("""select mean_eng_txt from mean > where mean_id=:arg_1""",{"arg_1"=arg_1}) Needs quotes of course. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Javadoc style python manual?

2006-09-08 Thread John J. Lee
[EMAIL PROTECTED] writes: > Hi there, > > I'm new to python and I'm from the java world. > Though I love to learn python, I'm not very comfortable with the python > documentation. > Because when i read jdk doc, i can see the class hierachy, class > member, class methods etc in html docs. It's ver

super and __init__

2006-09-08 Thread Noah
Am I the only one that finds the super function to be confusing? I have a base class that inherits from object. In other words new style class: class foo (object): def __init__ (self, arg_A, arg_B): self.a = arg_A self.b = arg_B # Do I need to call __init__ on "objec

Best Python Books and Sites

2006-09-08 Thread VV
I have been enjoying the discussion here for a while, and would like to ask for some help. I recently launched a question answer site that connects people with problems to those with solutions. We let people with problems pay solution providers $0.25 for problems in over 100 categories. As part o

Re: Linear regression in 3 dimensions

2006-09-08 Thread Andrew McLean
Bernhard, Levenberg-Marquardt is a good solution when you want to solve a general non-linear least-squares problem. As Robert said, the OPs problem is linear and Robert's solution exploits that. Using LM here is unnecessary and I suspect a fair bit less efficient (i.e. slower). - Andrew [EMA

Re: tkinter text event

2006-09-08 Thread Jay
That makes sense, but it's not working. John McMonagle wrote: > On Wed, 2006-09-06 at 17:54 -0700, Jay wrote: > > I'm having trouble with using the event with the Text object. > > When I use them together (which is a logical combination), I use this > > code: > > > > textbox = Text(root, wra

Re: Best Python Books and Sites

2006-09-08 Thread Scott David Daniels
VV wrote: > I recently launched a question answer site that connects people with > problems to those with solutions. We let people with problems pay > solution providers $0.25 for problems in over 100 categories. ... > What are the best three sites for python information? > What are the best three

Re: tkinter text event

2006-09-08 Thread Jay
Nevermind. It works. Sorry. I got my files mixed up! :-) John McMonagle wrote: > On Wed, 2006-09-06 at 17:54 -0700, Jay wrote: > > I'm having trouble with using the event with the Text object. > > When I use them together (which is a logical combination), I use this > > code: > > > > textb

ANN: SQLObject 0.7.1rc1

2006-09-08 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.1rc1 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started

  1   2   >