Re: where is python on linux?

2007-01-07 Thread rzed
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Frank Potter a écrit : >> I installed fedora core 6 and it has python installed. >> But the question is, where is the executable python file? >> I can't find it so I come here for help. > > man which > > mmm... slo

Re: how to find the longst element list of lists

2007-01-07 Thread Thomas Ploch
Michael M. schrieb: >> Err... this makes three distinct lists, not a list of lists. >> > > Sure. Logically spoken. Not in Python code. Or a number of lists. > Sure not [[ bla... ] [bla.]] etc. ??? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why less emphasis on private data?

2007-01-07 Thread Steven D'Aprano
On Sun, 07 Jan 2007 04:09:13 -0800, Paul Rubin wrote: > "Felipe Almeida Lessa" <[EMAIL PROTECTED]> writes: >> What is the chance of having to inherit from two classes from >> different modules but with exactly the same name *and* the same >> instance variable name? >> >> Of course you're being ve

Re: Working with Excel inside Python

2007-01-07 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I have a .plt file (which is a tab delimited ASCII file) and I want to > format it to get a .dbf with data in rows and columns, detele some > rows/columns and substitute decimal '.' with ','. All this using Python Then you may want to have a look here: http://docs.pyt

Re: strange for loop construct

2007-01-07 Thread Gabriel Genellina
On 7 ene, 18:52, "Dustan" <[EMAIL PROTECTED]> wrote: > Shouldn't that same page be found on the python > website?http://www.python.org/doc/2.0/ > Any clue as to why it isn't? For 2.0 it's on http://www.python.org/download/releases/2.0/new-python.htm For later ones, it's on http://www.python.org/

Re: (newbie) Is there a way to prevent "name redundancy" in OOP ?

2007-01-07 Thread Carl Banks
Martin Miller wrote: > Carl Banks wrote: > > > Martin Miller wrote: > > > ### non-redundant example ### > > > import sys > > > > > > class Pin: > > > def __init__(self, name, namespace=None): > > > self.name = name > > > if namespace == None: > > > # default to call

Re: Working with Excel inside Python

2007-01-07 Thread gblais
Or, you might want to look at two packages: xlrd pyExcelerator The first can "read" .xls files, and the second can write them. I've had great results with both. Gerry -- http://mail.python.org/mailman/listinfo/python-list

Additional pyparsing examples in latest release (1.4.5)

2007-01-07 Thread Paul McGuire
It seems I left out some examples from my announcement of pyparsing 1.4.5. Here is a more complete list of the new examples: parsePythonValue.py - parses strings representing lists, dicts, and tuples, with nesting support; safe alternative to using eval sql2dot.py - SQL diagram generator, parsed

Re: how to find the longst element list of lists

2007-01-07 Thread Michael M.
Bruno Desthuilliers wrote: > > Err... this makes three distinct lists, not a list of lists. > Sure. Logically spoken. Not in Python code. Or a number of lists. Sure not [[ bla... ] [bla.]] etc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find the longst element list of lists

2007-01-07 Thread Michael M.
Sorry, wrong place. -- http://mail.python.org/mailman/listinfo/python-list

lxml namespaces problem

2007-01-07 Thread Maxim Sloyko
Hi All! I have a little problem with XML namespaces. In my application I have two XML processors, that process the same document, one after the other. The first one looks for nodes in 'ns1' namespace, and substitutes them, according to some algorithm. After this processor is finished, it is guara

Re: (newbie) Is there a way to prevent "name redundancy" in OOP ?

2007-01-07 Thread Martin v. Löwis
Stef Mientki schrieb: > Can this be achieved without redundancy ? You can use the registry design to use the object's name also to find the object. In the most simple way, this is registry = {} class pin: def __init__(self, name): registry[name] = self self.name = name pin('aap') prin

Table

2007-01-07 Thread [EMAIL PROTECTED]
Hello Someone know how do I get the collunm's number of a gkt.Table ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with Excel inside Python

2007-01-07 Thread John Machin
[EMAIL PROTECTED] wrote: > Or, you might want to look at two packages: > > xlrd > > pyExcelerator > > The first can "read" .xls files, and the second can write them. I've had > great results with both. > Hi Gerry, Thanks for the testimonial for xlrd :-) However I don't understand how a reasonab

Recommendations (or best practices) to define functions (or methods)

2007-01-07 Thread vizcayno
Hello: Need your help in the "correct" definition of the next function. If necessary, I would like to know about a web site or documentation that tells me about best practices in defining functions, especially for those that consider the error exceptions management. I have the next alternatives but

Re: how to find the longst element list of lists

2007-01-07 Thread Dan Sommers
On Sun, 07 Jan 2007 22:23:22 +0100, "Michael M." <[EMAIL PROTECTED]> wrote: > How to find the longst element list of lists? > I think, there should be an easier way then this: > s1 = ["q", "e", "d"] > s2 = ["a", "b"] > s3 = ["a", "b", "c", "d"] [ snip ] One more thing to think about: if

Re: C++/Python programmers for a MUD's gamedriver wanted.

2007-01-07 Thread [EMAIL PROTECTED]
Paul McGuire wrote: > Have you considered whether the C++ Driver is even necessary? Python's > run-time engine already implements the memory and process management tasks, > and does so in compiled C code (and has been tested and retested by > hundreds, nay thousands, perhaps even millions of Pyth

Module to read svg

2007-01-07 Thread [EMAIL PROTECTED]
I'm looking for a module to load an SVG document so that I can read out its contents in some graphics-centric way. For example, path elements store their vertices in a long attribute string you need to parse. An ideal module would get me these vertices in a list. SVGdraw seems to only write, but n

Re: Why less emphasis on private data?

2007-01-07 Thread Paul Rubin
"Paul Boddie" <[EMAIL PROTECTED]> writes: > > Consider that the above three class definitions might be in separate > > files and you see how clumsy this gets. > > What are you trying to show with the above? The principal benefit of > using private attributes set on either the class or the instance

Re: Why less emphasis on private data?

2007-01-07 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > If you want to write bug-free code, pessimism is the name of the game. > > I wonder whether Paul uses snow chains all year round, even in the blazing > summer? After all, "if you want to drive safely, pessimism is the name of > the game". No. I'm w

Re: Why less emphasis on private data?

2007-01-07 Thread Paul Rubin
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > I'd be quite concerned about the design environment rather than the > immediate code... Probably need something ugly like... > > from mod1 import B as B1 > from mod2 import B as B2 > class A(B1, B2): > Interesting. I just tried that. mo

Re: how to find the longst element list of lists

2007-01-07 Thread Scott David Daniels
Dan Sommers wrote: > ... > longest_list, longest_length = list_of_lists[ 0 ], len( longest_list ) > for a_list in list_of_lists[ 1 : ]: > a_length = len( a_list ) > if a_length > longest_length: > longest_list, longest_length = a_list, a_length > will run faster

Re: Recommendations (or best practices) to define functions (or methods)

2007-01-07 Thread George Sakkis
vizcayno wrote: > Hello: > Need your help in the "correct" definition of the next function. If > necessary, I would like to know about a web site or documentation that > tells me about best practices in defining functions, especially for > those that consider the error exceptions management. > I h

Re: how to find the longst element list of lists

2007-01-07 Thread Steven Bethard
Scott David Daniels wrote: > Dan Sommers wrote: >> ... >> longest_list, longest_length = list_of_lists[ 0 ], len( >> longest_list ) >> for a_list in list_of_lists[ 1 : ]: >> a_length = len( a_list ) >> if a_length > longest_length: >> longest_list, longest_lengt

regex question

2007-01-07 Thread proctor
hello, i hope this is the correct place... i have an issue with some regex code i wonder if you have any insight: import re, sys def makeRE(w): print w + " length = " + str(len(w)) reString = "r'" + w[:1] w = w[1:] if len(w) > 0:

multi-threaded webcam with SimpleAsyncHTTPServer.py

2007-01-07 Thread Ray Schumacher
The class seems to work pretty well - very basic and fast, it just serves images from the specified port and camera device (USB cam). I added an ImageServer class and some code to __main__ class ImageServer(RequestHandler): def __init__(self, conn, addr, server): asynchat.async_chat.

Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread W. Watson
Gabriel Genellina wrote: > On 7 ene, 16:20, "W. Watson" <[EMAIL PROTECTED]> wrote: > >> We seem to be looping. I have the Python interpreter. I would like the >> pythonwin editor. The download link doesn't work on SourceForge. Where can I >> get it? If not there, where? If it can't be obtained, th

Re: regex question

2007-01-07 Thread Paul McGuire
"proctor" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > hello, > > i hope this is the correct place... > > i have an issue with some regex code i wonder if you have any insight: > > There's nothing actually *wrong* wth your regex. The problem is your misun

Re: Recommendations (or best practices) to define functions (or methods)

2007-01-07 Thread Martin v. Löwis
vizcayno schrieb: > Need your help in the "correct" definition of the next function. If > necessary, I would like to know about a web site or documentation that > tells me about best practices in defining functions, especially for > those that consider the error exceptions management. I agree with

Re: Why less emphasis on private data?

2007-01-07 Thread Steven D'Aprano
On Sun, 07 Jan 2007 19:30:05 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > If you want to write bug-free code, pessimism is the name of the game. >> >> I wonder whether Paul uses snow chains all year round, even in the blazing >> summer? After all, "if you want to dr

Re: Module to read svg

2007-01-07 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > Does anyone know if there's an actual free implementation of this? For the dom module in it, xml.dom.minidom should work. Depending on your processing needs, that might be sufficient. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why less emphasis on private data?

2007-01-07 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Just how often do you inherit from two identically-named classes > both of which use identically-named private attributes? I have no idea how often if ever. I inherit from library classes all the time, without trying to examine what superclasses they

<    1   2