Re: Rich __repr__

2005-10-31 Thread Erik Max Francis
Ben Finney wrote: > The builtin types have __repr__ attributes that return something nice, > that looks like the syntax one would use to create that particular > instance. > > The default __repr__ for custom classes show the fully-qualified class > name, and the memory address of the instance. >

Re: Forced to Embed?

2005-10-31 Thread Miki Tebeka
Hello Lloyd, > I have about 10 shared libraries that up until now have only been > statically linked into an application and used from C++. I'd like to > expose a lot of this functionality as different Python modules ( core, > network, input, etc ), however the interdependency between the libra

Re: looking for a good python module for MS SQL server

2005-10-31 Thread Frank Millman
Anat wrote: > Hi, > Does anyone know a good python mudule that works with MS SQL server? > Thanks, > Anat I use the odbc module from pywin32. I believe that it is not 100% DB-API 2.0 compliant, but it works fine for me. It has the advantage that if you have installed pywin32 (which is advisable o

Forced to Embed?

2005-10-31 Thread Lloyd
Hi After researching on Extending and Embedding it appears Extending is favoured greatly over Embedding. I've tested Boost::Python successfully in a test project but have run into an issue. I have about 10 shared libraries that up until now have only been statically linked into an application

Re: Looking for info on Python's memory allocation

2005-10-31 Thread Edvard Majakari
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I'm discussing memory allocation techniques with somebody, and I'm trying to > find a quote from -- I think -- Tim Peters where he discusses the way Python > allocates memory when you append to lists. In basic terms, he says that every > time you try t

Re: Storing empties

2005-10-31 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Alex Martelli <[EMAIL PROTECTED]> wrote: > > > >the canonical idiom when you need such distinction is: > > > >_not_there = object() > >def foo(bar=_not_there, baz=_not_there, bap=_not_there): > >if bar is _not_there: ... > > >

Re: Scanning a file

2005-10-31 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: ... > > The runtime knows it is doing it. Please allow the runtime to tell me > > what it knows it is doing. Thanks. > > In point oif fact I don't believe the runtime does any such thing > (though I must admit I haven't checked the source, so you may p

Re: Rename files with numbers

2005-10-31 Thread Dave Benjamin
On Mon, 31 Oct 2005, Micah Elliott wrote: > On Oct 31, Micah Elliott wrote: >> Now I need to go beautify my collection. :-) > > While a fun exercise, there are probably already dozens (or > thousands?) of utilities in existence that do this and much more. Seconded. I initially considered writing

how to import extension module from embedding application on aix5

2005-10-31 Thread zhang xiaoning
Hi, I download and extract python-2.4.2 source code for unix, and then, build and install it on aix5, the configure option I used is: ./configure --enable-shared --disable-ipv6 --prefix=/usr/python then, I run: make and make install because I want to embed python in other language, so I contin

Re: Why the nonsense number appears?

2005-10-31 Thread Dan Bishop
Steve Horsley wrote: > Ben O'Steen wrote: > > On Mon, October 31, 2005 10:23, Sybren Stuvel said: > >> Ben O'Steen enlightened us with: > >>> Using decimal as opposed to float sorts out this error as floats are > >>> not built to handle the size of number used here. > >> They can handle the size ju

Re: Reuse base-class implementation of classmethod?

2005-10-31 Thread Bengt Richter
On Tue, 01 Nov 2005 00:24:37 GMT, "Giovanni Bajo" <[EMAIL PROTECTED]> wrote: >Hello, > >what's the magic needed to reuse the base-class implementation of a >classmethod? > >class A(object): > @classmethod > def foo(cls, a,b): > # do something > pass > >class B(A): >@classmethod

Re: Does Asyncore Send require newline?

2005-10-31 Thread John W
Hi Steve, Here is what I have for my server (This code is really not that pretty, I apologize): import socket import SocketServer class CommonServer(SocketServer.ThreadingTCPServer):     def server_bind(self):     """Override server_bind to store the server name."""     SocketServer.TCPS

Re: Does Asyncore Send require newline?

2005-10-31 Thread Steve Holden
John W wrote: > Hello, > > I have a test environment that consists of a server and an application that > opens an asyncore socket and communicates with it. > > In my application, on the handle_write call, if I do not append a "\n" to my > message the server never gets the message. If I do append

Re: Reuse base-class implementation of classmethod?

2005-10-31 Thread David Wahler
Giovanni Bajo wrote: > Hello, > > what's the magic needed to reuse the base-class implementation of a > classmethod? > > class A(object): >@classmethod >def foo(cls, a,b): ># do something >pass > > class B(A): > @classmethod > def foo(cls, a, b): > A.foo(cl

Does Asyncore Send require newline?

2005-10-31 Thread John W
Hello, I have a test environment that consists of a server and an application that opens an asyncore socket and communicates with it. In my application, on the handle_write call, if I do not append a "\n" to my message the server never gets the message.  If I do append it, the server can read the

Re: Where to save classes? How to access classes?

2005-10-31 Thread David Wahler
David Mitchell wrote: > Hi, > > I'm trying to get into the object oriented aspect of Python. If I create > a custom class (in it's own file), how do I access that class in a > function in a different file? In Java there's the notion of a CLASSPATH, > where you can tell the compiler to look for cla

Re: Where to save classes? How to access classes?

2005-10-31 Thread jepler
This section of the tutorial discusses the module search path: http://docs.python.org/tut/node8.html 6.1.1 The Module Search Path When a module named spam is imported, the interpreter searches for a file named spam.py in the current directory, and then in the list of director

Re: data hiding/namespace pollution

2005-10-31 Thread Steven Bethard
Alex Hunsley wrote: > The two main versions I've encountered for data pseudo-hiding > (encapsulation) in python are: > > method 1: > > _X - (single underscore) - just cosmetic, a convention to let someone > know that this data should be private. > > > method 2: > > __X - (double unders

Where to save classes? How to access classes?

2005-10-31 Thread David Mitchell
Hi, I'm trying to get into the object oriented aspect of Python. If I create a custom class (in it's own file), how do I access that class in a function in a different file? In Java there's the notion of a CLASSPATH, where you can tell the compiler to look for classes. Is there something simil

Re: Scanning a file

2005-10-31 Thread Paul Rubin
[EMAIL PROTECTED] (John J. Lee) writes: > Closing off this particular one would make it harder to get benefit of > non-C implementations of Python, so it has been judged "not worth it". > I think I agree with that judgement. The right fix is PEP 343. -- http://mail.python.org/mailman/listinfo/pyt

Re: Rename files with numbers

2005-10-31 Thread Dudu Figueiredo
Oh, forget what i've just said, i didn't read the __debug__ part. It worked perfectly =] Realy good Python classes! Eduardo Figueiredo http://dudufigueiredo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Rename files with numbers

2005-10-31 Thread Dudu Figueiredo
Micah, thanks a lot, nice script! But its not completly working, i ran this: fix_ugly_song_names('C:\My Shared Folder\Rubber Soul', 'The Beatles', spacerepl=' ') And the shell prints this: 01 drive my car.mp3 --> The Beatles - Drive My Car.mp3 02 norwegian wood (this bird has flo).mp

Re: Tkinter problem

2005-10-31 Thread jepler
On Mon, Oct 31, 2005 at 03:17:05PM -0800, dale cooper wrote: > Thanks, but I've got another question: > > can't find Tcl configuration script "tclConfig.sh" This file comes from the following package: $ rpm -qf /usr/lib*/tclConfig.sh tcl-devel-8.4.9-3 Fedora generally splits packages which are

Re: OpenSSL in Python

2005-10-31 Thread dcrespo
First, is the PYTHON OpenSSL C wrapper what I need to get running. Second, if you don't know how to answer, then limit your opinion to yourself. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: OpenSSL in Python

2005-10-31 Thread dcrespo
> wouldn't your question then not be more appropriate on the > OpenSSL newsgroup/mailinglist/forum/whatever? Well, I think that because python is the language where I want it to run, I ask it right here. OpenSSL is written in C, so they wont help me. I need the right wrappers to that C library. T

Re: MySQLdb and cgi

2005-10-31 Thread robert
I am sending it again, since it didn't appear on the mailing list.  Dear group, I have a problem with importing MySQLdb in a cgi-script. The code fragment at the beginning:   1 #!/usr/bin/env python   2   3 print "Content-Type: text/html\n\n"   4   5 import re   6 import cgi

Re: Scanning a file

2005-10-31 Thread John J. Lee
Paul Watson <[EMAIL PROTECTED]> writes: [...] > How "ill" will things be when large bodies of code cannot run > successfully on a future version of Python or a non-CPython > implementation which does not close files. Might as well put file > closing on exit into the specification. [...] There

Re: Expanding Python as a macro language

2005-10-31 Thread gmilas
[EMAIL PROTECTED] wrote: > Imagine you want to access a big database from a html server which > only allows you to access such data in chunks pressing a "next" > button on an ASP file. It will take several hours to click the button > and then save the new data supplied by the server! > That is a ty

Re: looking for a good python module for MS SQL server

2005-10-31 Thread Grig Gheorghiu
I successfully used mxODBC () Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a good python module for MS SQL server

2005-10-31 Thread Steve Holden
Jarek Zgoda wrote: > Anat napisał(a): > > >>Does anyone know a good python mudule that works with MS SQL server? > > > Google will yield something, but I prefer adodbapi over specialized > modules. Works good with SQLServer using SSPI auth (others rather not). > Though it does have problems wi

Re: Asyncore Loop Question

2005-10-31 Thread Steve Holden
John W wrote: > On 10/31/05, Steve Holden <[EMAIL PROTECTED]> wrote: > >>John W wrote: >> >>>Hello, >>> >>>I have a gui application where I am trying to use the asyncore module to >>>gather data from other computers. I am able to connect, but I am getting >>>constant handle_write_event method call

Re: looking for a good python module for MS SQL server

2005-10-31 Thread Brian
I've had good results with adodbapi as well. -- http://mail.python.org/mailman/listinfo/python-list

Re: 'super' to only be used for diamond inheritance problems?

2005-10-31 Thread Giovanni Bajo
Alex Hunsley wrote: > I've seen a few discussion about the use of 'super' in Python, > including the opinion that 'super' should only be used to solve > inheritance diamond problem. (And that a constructor that wants to > call the superclass methods should just call them by name and forget > about

Reuse base-class implementation of classmethod?

2005-10-31 Thread Giovanni Bajo
Hello, what's the magic needed to reuse the base-class implementation of a classmethod? class A(object): @classmethod def foo(cls, a,b): # do something pass class B(A): @classmethod def foo(cls, a, b): A.foo(cls, a, b) # WRONG! I need to call the base-clas

Re: Scanning a file

2005-10-31 Thread Steve Holden
Paul Watson wrote: > Steve Holden wrote: > >>>Since everyone needs this, how about building it in such that files >>>which are closed by the runtime, and not user code, are reported or >>>queryable? Perhaps a command line switch to either invoke or suppress >>>reporting them on exit. >>> >> >>

Re: MacOS Extension Carbon.File.FSCatalogInfo file sizes should be UInt64?

2005-10-31 Thread donbro
Kevin, Thanks for the tip. I'll post this to the pythonmac-sig mailing list. Don -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-31 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> writes: >> You have not disproved that. The closest you've come to a disproof is >> one case where the word "theft" was used (while earlier in the thread, >> actual physical force

Re: cx_Oracle, is anything selected?

2005-10-31 Thread Diez B. Roggisch
Damjan wrote: > Is there a way to see if the SELECT in cx_Oracle didn't return anything? > I want to optimize the situation when the number of selected rows is zero. > Is select count(*) the only option, seems inefficient? I don't understand your problem - if your select doesn't return anything,

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> "David Schwartz" <[EMAIL PROTECTED]> writes: I'm trying to find out why you regularly ignore that difference for everyone but MS. >>> To substantiate that cla

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Ron Adam
Steve Holden wrote: > Francesco Bochicchio wrote: > >> Il Mon, 31 Oct 2005 06:23:12 -0800, [EMAIL PROTECTED] ha scritto: >> >> >>> And yet the stupidity continues, right after I post this I finnally >>> find an answer in a google search, It appears the way I seen it is to >>> create a class for

Re: Tkinter problem

2005-10-31 Thread dale cooper
Thanks, but I've got another question: can't find Tcl configuration script "tclConfig.sh" This is what I received trying to install TkBLT. What is tclConfig.sh? I did installed tcl/tk 8.4.9-3 as I mentioned before, I tried to find this file, but I don't have it in my filesystem. How to get it? -

Re: Microsoft Hatred FAQ

2005-10-31 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> writes: >>> I'm trying to find out why you regularly ignore that difference for >>> everyone but MS. >> To substantiate that claim, you'd have to point to some cases where I >> talk

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: >> I'm trying to find out why you regularly ignore that difference for >> everyone but MS. > To substantiate that claim, you'd have to point to some cases where I > talk about something other than MS. You do that *every time* someone compares MS wi

Storing empties (was Re: Automatic binding of **kwargs to variables)

2005-10-31 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: > >the canonical idiom when you need such distinction is: > >_not_there = object() >def foo(bar=_not_there, baz=_not_there, bap=_not_there): >if bar is _not_there: ... > >Other unique objects can be substituted for the 'se

cx_Oracle, is anything selected?

2005-10-31 Thread Damjan
Is there a way to see if the SELECT in cx_Oracle didn't return anything? I want to optimize the situation when the number of selected rows is zero. Is select count(*) the only option, seems inefficient? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

[Ann] RO package 2005-10-31

2005-10-31 Thread Russell E. Owen
RO package 2005-10-31 is now available from What is it? A package of python utilities I wrote to support a telescope control interface. RO has a strong emphasis on the Tkinter GUI library, networking, astronomy and cross-platform support (uni

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mouser
It's good to see that tilting at windmills hasn't gone out of style since Cervantes' time. [[hehehehehe...]] -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-31 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Another straw man. I'm not trying to oblitarate that difference No matter how many times I quote to you where you specifically do exactly this, you insist you aren't. Yes, you are. You equate metaphorical force wit

Re: Rename files with numbers

2005-10-31 Thread Micah Elliott
On Oct 31, Micah Elliott wrote: > Now I need to go beautify my collection. :-) While a fun exercise, there are probably already dozens (or thousands?) of utilities in existence that do this and much more. -- _ _ ___ |V|icah |- lliott http://micah.elliott.name [EMAIL PROTECTED] " " """

Re: Using graphviz to visualize trace.py output, anybody?

2005-10-31 Thread svenn . are
I am referring to the trace.py which comes with python2.3 which is installed on Panther by default. (I found it with 'locate trace.py' after reading about its existence here) I was thinking in the direction of your suggestion 2) but before I reinvent the wheel, I would like to know if someone has

Re: Rename files with numbers

2005-10-31 Thread Micah Elliott
On Oct 31, [EMAIL PROTECTED] wrote: > but my focus is to learn how to acess a folder and rename all files in > this folder. This is a little more flexible than my last post, and it does the whole job:: #! /usr/bin/env python import glob, os, string def fix_ugly_song_names(songdir, b

Re: looking for a good python module for MS SQL server

2005-10-31 Thread Jarek Zgoda
Anat napisał(a): > Does anyone know a good python mudule that works with MS SQL server? Google will yield something, but I prefer adodbapi over specialized modules. Works good with SQLServer using SSPI auth (others rather not). -- Jarek Zgoda http://jpa.berlios.de/ -- http://mail.python.org/ma

looking for a good python module for MS SQL server

2005-10-31 Thread Anat
Hi, Does anyone know a good python mudule that works with MS SQL server? Thanks, Anat -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Of course, you've dropped the real point, which is your own inabillity >> to distinguish between, as you put it, "guns and arguments." You >> always act as if every mention

Re: frozenset/subclassing/keyword args

2005-10-31 Thread Bengt Richter
On Mon, 31 Oct 2005 19:31:33 GMT, "Mark E. Fenner" <[EMAIL PROTECTED]> wrote: >Hello all, > >I was migrating some code from sets.ImmutableSet to frozenset and noticed >the following: > >**code >#!/usr/bin/env python > >from sets import ImmutableSet > > >class MSet1(ImmutableSet): >

Re: Why the nonsense number appears?

2005-10-31 Thread Steve Horsley
Ben O'Steen wrote: > On Mon, October 31, 2005 10:23, Sybren Stuvel said: >> Ben O'Steen enlightened us with: >>> Using decimal as opposed to float sorts out this error as floats are >>> not built to handle the size of number used here. >> They can handle the size just fine. What they can't handle i

Re: Python Linked list?

2005-10-31 Thread Michael P. Soulier
On 10/31/05, Simon Roses Femerling <[EMAIL PROTECTED]> wrote: > I'm looking for a linked list class or lib ? Any suggestions ? I'm not sure anyone would bother making one for Python. Why do you feel that you need one? Are dictionaries and lists not enough? Can you not simply make one via referenc

Re: Problem With Insert with MySQLdb

2005-10-31 Thread Steve Horsley
David Mitchell wrote: > Hello, > > I am a complete beginner with Python. I've managed to get mod_python up and > running with Apache2 and I'm trying to a simple insert into a table in a > MySQL database. > > I'm using the MySQLdb library for connectivity. I can read from the database > no proble

Re: Microsoft Hatred FAQ

2005-10-31 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Of course, you've dropped the real point, which is your own inabillity > to distinguish between, as you put it, "guns and arguments." You > always act as if every mention of a crime committed by someone other > than micro

Re: Recursive generators and backtracking search

2005-10-31 Thread Tim Peters
[Talin] > I've been using generators to implement backtracking search for a while > now. Unfortunately, my code is large and complex enough (doing > unification on math expressions) that its hard to post a simple > example. So I decided to look for a simpler problem that could be used > to demonstr

yapsnmp - on windows

2005-10-31 Thread py
I have installed net-snmp and of course python on windows xp. I downloaded yapsnmp (http://yapsnmp.sourceforge.net/) and I can't seem to use it. It has a swig interface...but I get errors when trying to swig it.. C:\yapsnmp-0.7.8\src>"c:\Program Files\swigwin-1.3.25\swig.exe" -python net-snmp.i

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >>> Microsoft's behavior consisted of arguments, that is, did not >>> involve force, the threat of force, fraud, or the threat of >>> fraud. This is perhaps the most vital dist

Re: Rename files with numbers

2005-10-31 Thread dudufigueiredo
Micah, thanks a lot, but my focus is to learn how to acess a folder and rename all files in this folder. Somyhing like this: def renamer(folder, band): folder = #place to act archive = #file to transform rest = archive[3:] print band + " -", rest.capitalize() And t

Re: Scanning a file

2005-10-31 Thread Paul Watson
Steve Holden wrote: >> Since everyone needs this, how about building it in such that files >> which are closed by the runtime, and not user code, are reported or >> queryable? Perhaps a command line switch to either invoke or suppress >> reporting them on exit. >> > This is a rather poor substi

Re: Asyncore Loop Question

2005-10-31 Thread John W
Steve, Ar you saying that I should close the connection until I have data to write?  Or should I be using the readable and writable methods to turn it off? Thanks for your help, unfortunatly, I have struggled with the documentation and getting a clear understanding of everything.  This is my firs

Re: Function returns none

2005-10-31 Thread noahlt
Thanks, that worked! -- http://mail.python.org/mailman/listinfo/python-list

Re: frozenset/subclassing/keyword args

2005-10-31 Thread Kent Johnson
Mark E. Fenner wrote: > Speaking of which, in the docs at the bottom of the description of the > builtin set/frozenset, there is a link to a page describing differences > between the builtin sets and the sets module sets. This link is broken > locally and on the python.org docs. > Locally, it read

Re: Function returns none

2005-10-31 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > I'm trying to write a website updating script, but when I run the > script, my function to search the DOM tree returns None instead of what > it should. When you call findelement() recursively you have to return the value from the recursive call to the next caller up. S

frozenset/subclassing/keyword args

2005-10-31 Thread Mark E. Fenner
Hello all, I was migrating some code from sets.ImmutableSet to frozenset and noticed the following: **code #!/usr/bin/env python from sets import ImmutableSet class MSet1(ImmutableSet): def __init__(self, iterArg, myName="foo"): ImmutableSet.__init__(self, iterArg)

Re: Asyncore Loop Question

2005-10-31 Thread Steve Holden
John W wrote: > Hello, > > I have a gui application where I am trying to use the asyncore module to > gather data from other computers. I am able to connect, but I am getting > constant handle_write_event method calls into my application. It is > obviously slowing down the gui processing significa

Re: Rename files with numbers

2005-10-31 Thread Micah Elliott
On Oct 31, [EMAIL PROTECTED] wrote: > ... > obs: the file names came this way(with spaces or apostrophes) from > the cd i imported. So remove them first. Here's a possible solution:: #! /usr/bin/env python import glob, os.path uglies = glob.glob("*.mp3") print 'uglies:', uglies

Re: Oh what a twisted thread we weave....

2005-10-31 Thread GregM
Tom, Thanks for the reply and sorry for the delay in getting back to you. Thanks for pointing out my logic problem. I had added the 2nd part of the if statement at the last minute... Yes I have a single threaded version its several hundred lines and uses COM to write the results out to and Excel

Re: Microsoft Hatred FAQ

2005-10-31 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Microsoft's behavior consisted of arguments, that is, did not >> involve force, the threat of force, fraud, or the threat of >> fraud. This is perhaps the most vital distinction that there is. > Wrong. Either your defin

Re: Function returns none

2005-10-31 Thread Carsten Haese
On Mon, 2005-10-31 at 14:12, [EMAIL PROTECTED] wrote: > I'm trying to write a website updating script, but when I run the > script, my function to search the DOM tree returns None instead of what > it should. > > I have this program: > > import sys > from xml.dom.minidom import parse > >

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Steve Holden
Francesco Bochicchio wrote: > Il Mon, 31 Oct 2005 06:23:12 -0800, [EMAIL PROTECTED] ha scritto: > > >>And yet the stupidity continues, right after I post this I finnally >>find an answer in a google search, It appears the way I seen it is to >>create a class for each button and have it call the m

Function returns none

2005-10-31 Thread noahlt
I'm trying to write a website updating script, but when I run the script, my function to search the DOM tree returns None instead of what it should. I have this program: import sys from xml.dom.minidom import parse # search the tree for an element with a particular class def findelemen

Re: Expanding Python as a macro language

2005-10-31 Thread Mike Meyer
Jorgen Grahn <[EMAIL PROTECTED]> writes: > On 29 Oct 2005 17:25:58 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... >> Michel wrote: > ... >> > Linux can run perfectly happily without any form of windowing >> > environment. >> >> I know, but nowadays almost any relevant application has a

Re: Arguments for button command via Tkinter?

2005-10-31 Thread [EMAIL PROTECTED]
Yah, thats how i learned how to do it, thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Print to printer

2005-10-31 Thread avnit
I just want to print text. I'll try macpython. Thanks for the help. -- http://mail.python.org/mailman/listinfo/python-list

Re: MacOS Extension Carbon.File.FSCatalogInfo file sizes should be UInt64?

2005-10-31 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 donbro wrote: | If my read of the extension source (Mac/Modules/file/_Filemodule.c) is | correct, the parameter sizes specified for data and resource file sizes | are UInt32 where they should be UInt64. | | In both OS9 and OSX Carbon, the MacOS File Ma

Re: Instantiating Classes in python (newbie)

2005-10-31 Thread infidel
> Hello, I am learning python for work from knowing java,c#,c. I had a > couple questions. > 1) IntegerClass - to instantiate this class how come I use i = > IntegerClass.IntegerClass() and then this works while i = > IntegerClass() i.method. I receive an error. It depends on what IntegerClass

Re: Rename files with numbers

2005-10-31 Thread dudufigueiredo
Ok, so the function simplifyed without loops: def renamer(folder, band): archive = #file to transform rest = archive[3:] print band + " -",rest.capitalize() obs: the file names came this way(with spaces or apostrophes) from the cd i imported. -- http://mail.python.org/m

Python Linked list?

2005-10-31 Thread Simon Roses Femerling
Hi there!   I'm looking for a linked list class or lib ? Any suggestions ?   Is for a project I'm working on.   Sincerely,   Simon Roses Femerling -- http://mail.python.org/mailman/listinfo/python-list

Re: Print to printer

2005-10-31 Thread avnit
I just want to print text. I'll try macpython. Thanks for the help. -- http://mail.python.org/mailman/listinfo/python-list

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-31 Thread shannonl
Thanks for your help and the link. From the link it sounds like no one is sure how this is supposed to act. I will dig around in the tcl forum and see what I can find. -- http://mail.python.org/mailman/listinfo/python-list

Re: Rename files with numbers

2005-10-31 Thread Micah Elliott
On Oct 31, [EMAIL PROTECTED] wrote: > I have one folder containing mp3 files, the folder is: > C:\My Shared Folder\Rubber Soul > > And the files are: > 03 you won't see me.mp3 > . > > I'm trying to rename files to: > The Beatles - You Won't See Me.mp3 > . My first suggestion is that you make bet

Re: Scanning a file

2005-10-31 Thread Bengt Richter
On Mon, 31 Oct 2005 09:19:10 +0100, Peter Otten <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> I still smelled a bug in the counting of substring in the overlap region, >> and you motivated me to find it (obvious in hindsight, but aren't most ;-) >> >> A substring can get over-counted if t

Re: Using graphviz to visualize trace.py output, anybody?

2005-10-31 Thread David E. Konerding DSD staff
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hi, > > has anybody thought of / already used graphviz to convert the output of > trace.py into a graph? I looked at PyUMLGraph, but 1. PyUMLGraph does > not successfully create a dot file, and 2. I don't really want a UML > representation

Re: Scanning a file

2005-10-31 Thread Bengt Richter
On Mon, 31 Oct 2005 09:41:02 +0100, =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= <[EMAIL PROTECTED]> wrote: >David Rasmussen wrote: > >> If you must know, the above one-liner actually counts the number of >> frames in an MPEG2 file. I want to know this number for a number of >> files for variou

Asyncore Loop Question

2005-10-31 Thread John W
Hello, I have a gui application where I am trying to use the asyncore module to gather data from other computers.  I am able to connect, but I am getting constant handle_write_event method calls into my application.  It is obviously slowing down the gui processing significantly. My understanding

Instantiating Classes in python (newbie)

2005-10-31 Thread DaBeef
Hello, I am learning python for work from knowing java,c#,c. I had a couple questions. 1) IntegerClass - to instantiate this class how come I use i = IntegerClass.IntegerClass() and then this works while i = IntegerClass() i.method. I receive an error. 2) Also using self in the method (self, d

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Recently, I have been needing to do this alot and I can never find a > way around it, the main reason I want to do this is because for example > in the application I am making right now, it creates a grid of buttons > in a loop and they all have the

Python -- CGI -- Take SQL database, make it download in CSV

2005-10-31 Thread [EMAIL PROTECTED]
I currently have a cgi-bin which I use to authenticate users against a SQL database, which holds info about them, and their login info. I would like to have the 'admin' section take part of the table and put it in CSV and allow them to download it, somehow making it so that the 'members' cannot do

Rename files with numbers

2005-10-31 Thread dudufigueiredo
I have one folder containing mp3 files, the folder is: C:\My Shared Folder\Rubber Soul And the files are: 01 drive my car.mp3 02 norwegian wood.mp3 03 you won't see me.mp3 04 nowhere man.mp3 . . . I'm trying to rename files to: The Beatles - Drive My Car.mp3 The Beatles - Norwegian Wood.mp3 The B

Re: 'super' to only be used for diamond inheritance problems?

2005-10-31 Thread Alex Martelli
Alex Hunsley <[EMAIL PROTECTED]> wrote: > I've seen a few discussion about the use of 'super' in Python, including > the opinion that 'super' should only be used to solve inheritance > diamond problem. (And that a constructor that wants to call the > superclass methods should just call them by n

Re: Windows - Need to process quotes in string...

2005-10-31 Thread Francesco Bochicchio
Il Mon, 31 Oct 2005 07:18:31 -0800, Ernesto ha scritto: > I'm trying to use a $ delimeter, but it doesn't seem to work. Here is > the code: > > > launchWithoutConsole("devcon.exe",d'$enable > "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&"$) > > I want to send the string parameter: > > enable

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Martelli
Alex Hunsley <[EMAIL PROTECTED]> wrote: > There's no really specific questions in this post, but I'm looking for > people's thought on the issues within... > > > The two main versions I've encountered for data pseudo-hiding > (encapsulation) in python are: > > method 1: > > _X - (single unde

Re: mixin helper class for unknown attribute access?

2005-10-31 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > Trying to prevent setting new attributes is a pretty heavy-handed act just > to prevent a tiny subset of errors. Many people argue strongly that even > if you could do it, it would be pointless -- or at least, the cost is far > greater than whatev

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Francesco Bochicchio
Il Mon, 31 Oct 2005 06:23:12 -0800, [EMAIL PROTECTED] ha scritto: > And yet the stupidity continues, right after I post this I finnally > find an answer in a google search, It appears the way I seen it is to > create a class for each button and have it call the method within that. > If anyone else

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Steven D'Aprano wrote: > On Mon, 31 Oct 2005 10:35:19 +, Alex Hunsley wrote: > > >>There's no really specific questions in this post, but I'm looking for >>people's thought on the issues within... >> >> >>The two main versions I've encountered for data pseudo-hiding >>(encapsulation) in pyt

  1   2   >