Re: Scanning a file

2005-10-31 Thread Lasse Vågsæther Karlsen
David Rasmussen wrote: snip 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 various reasons. I don't want it to take forever. snip Don't you risk getting more frames than the file actually have?

Re: Expanding Python as a macro language

2005-10-31 Thread qwweeeit
I am further commenting on new replies. Mike Meyer wrote: In general, application scripting facilities are one thing that Unix hasn't dealt with well. ...so each application is left up to it's own devices. Some of them now export APIs that can be hooked up to a variety of languages. Now I

Re: Would there be support for a more general cmp/__cmp__

2005-10-31 Thread Antoon Pardon
Op 2005-10-28, Ron Adam schreef [EMAIL PROTECTED]: I haven't heard he was removing __cmp__, I read somewhere he was considering it. but I would think the sort or sorted functions would just use the available comparisons methods or equivalent C code for base types. So I expect it would

Why the nonsense number appears?

2005-10-31 Thread Johnny Lee
Hi, Pls take a look at this code: -- t1 = 1130748744 t2 = 461 t3 = 1130748744 t4 = 500 time1 = t1+.+t2 time2 = t3+.+t4 print time1, time2 1130748744.461 1130748744.500 float(time2) - float(time1) 0.03934332275391 Why are there so many nonsense tails? thanks for your

meschach + Python

2005-10-31 Thread Cyril Bazin
Hello, I need to compute eigenvalues and eigenvectors on sparse matrix. I found a C library meschach which seems to do the work. Unfortunatly, this libray doesn't seem to be interfaced in Python. Has anyone ever used this library and interfaced it in Python or has a solution to compute

Re: Why the nonsense number appears?

2005-10-31 Thread Sybren Stuvel
Johnny Lee enlightened us with: Why are there so many nonsense tails? thanks for your help. Because if the same reason you can't write 1/3 in decimal: http://docs.python.org/tut/node16.html Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for

Re: Why the nonsense number appears?

2005-10-31 Thread Daniel Dittmar
Johnny Lee wrote: print time1, time2 1130748744.461 1130748744.500 float(time2) - float(time1) 0.03934332275391 Why are there so many nonsense tails? thanks for your help. http://en.wikipedia.org/wiki/Floating_point#Problems_with_floating-point, especially 'Rounding'. Or

Re: Why the nonsense number appears?

2005-10-31 Thread Ben O'Steen
On Mon, October 31, 2005 9:39, Sybren Stuvel said: Johnny Lee enlightened us with: Why are there so many nonsense tails? thanks for your help. Because if the same reason you can't write 1/3 in decimal: http://docs.python.org/tut/node16.html Sybren -- The problem with the world is

tachometer diagram

2005-10-31 Thread Andreas Kaiser
Hello, I'am searching for a python solution for display a tachometer diagram. I prefer a solution for wxPython. The plot libraries I've found do not implement this diagram type. Any hints welcome! Thanks Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: tachometer diagram

2005-10-31 Thread Jorge Godoy
Andreas Kaiser [EMAIL PROTECTED] writes: I'am searching for a python solution for display a tachometer diagram. I prefer a solution for wxPython. The plot libraries I've found do not implement this diagram type. Any hints welcome! In case you change your mind, I believe there's such a thing

Re: Why the nonsense number appears?

2005-10-31 Thread Yu-Xi Lim
Johnny Lee wrote: snip Why are there so many nonsense tails? thanks for your help. I guess you were expecting 0.039? You first need to understand floating point numbers: http://docs.python.org/tut/node16.html What you see are the effects of representation errors. The solution is presented

Re: tachometer diagram

2005-10-31 Thread Andreas Kaiser
Hello Jorge, I can change my mind, sorry. The target OS for this app is Win. When pyQt4 is available, I will check QT. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Scanning a file

2005-10-31 Thread Steven D'Aprano
David Rasmussen wrote: Steven D'Aprano wrote: On Fri, 28 Oct 2005 06:22:11 -0700, [EMAIL PROTECTED] wrote: Which is quite fast. The only problems is that the file might be huge. What *you* call huge and what *Python* calls huge may be very different indeed. What are you calling huge?

Re: tachometer diagram

2005-10-31 Thread Andreas Kaiser
I can change my mind, sorry. Should be: I _can't_ change ... Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why the nonsense number appears?

2005-10-31 Thread Sybren Stuvel
Ben O'Steen enlightened us with: I think that the previous poster was asking something different. It all boils down to floating point inprecision. If t1 = 0.500 t2 = 0.461 print t1-t2 0.039 Then why: t1 += 12345678910 t2 += 12345678910 # Note, both t1 and t2 have been incremented by

Re: Problem With Insert with MySQLdb

2005-10-31 Thread Sibylle Koczian
Gerhard Häring schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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

Re: Why the nonsense number appears?

2005-10-31 Thread Ben O'Steen
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 is 1/1000th precision when

data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
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 underscore) - just cosmetic, a convention to let someone

mixin helper class for unknown attribute access?

2005-10-31 Thread Alex Hunsley
I know that I can catch access to unknown attributes with code something like the following: class example: def __getattr__(self, name): if name == 'age': return __age else: raise AttributeError but is there an existing mixin helper class

Re: tachometer diagram

2005-10-31 Thread Jorge Godoy
Andreas Kaiser [EMAIL PROTECTED] writes: I can change my mind, sorry. The target OS for this app is Win. When pyQt4 is available, I will check QT. Dunnon the licensing, but there's a Qt3 GPL available for Win... It is not official, but it runs :-) You'd have to Google for it, though, since I

Re: process and spinning slash

2005-10-31 Thread benz
I have rewrited my code as follow, but it still not working. import os, sys pid = os.fork() if pid == 0: os.execvp(du,(du,-shc,/usr/share)) else: while 1: try: os.kill(pid,0) sys.stdout.write('running') sys.stdout.flush() sys.stdout.write('\b\b\b\b\b\b\b')

Re: data hiding/namespace pollution

2005-10-31 Thread bruno at modulix
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) OT Hmmm... Are data-hiding and encapsulation really the same things ? /OT in

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
bruno at modulix wrote: 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) OT Hmmm... Are data-hiding and encapsulation really

Re: Automatically creating a HOME environ variable on Windows?

2005-10-31 Thread Maciej Dziardziel
Jorgen Grahn wrote: Best solution would be to have portable function that returns user home directory and knows about all platfom quirks. Why is that better than Python creating a HOME in os.environ, if it doesn't already exist? I can think of a few reasons it's better, and a few reasons

Re: data hiding/namespace pollution

2005-10-31 Thread Jorge Godoy
Alex Hunsley [EMAIL PROTECTED] writes: Sorry, I wasn't being clear. What I should have said is that I don't like the idea of a typo in an assignment causing the assigning of the wrong thing. e.g. imagine a simple value-holding class: class Values: pass v = Values() v.conductoin

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: Alex Hunsley [EMAIL PROTECTED] writes: Sorry, I wasn't being clear. What I should have said is that I don't like the idea of a typo in an assignment causing the assigning of the wrong thing. e.g. imagine a simple value-holding class: class Values: pass v = Values()

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: Alex Hunsley [EMAIL PROTECTED] writes: Sorry, I wasn't being clear. What I should have said is that I don't like the idea of a typo in an assignment causing the assigning of the wrong thing. e.g. imagine a simple value-holding class: class Values: pass v = Values()

Re: data hiding/namespace pollution

2005-10-31 Thread Jorge Godoy
Alex Hunsley [EMAIL PROTECTED] writes: Btw, can you recall the subject line of the thread? I'd like to google groups for it and have a read of that thread... ta! Search for: alex martelli pychecker on comp.lang.python... I don't have the thread's name anymore. You'll probably find more than

taking x-window screen shot

2005-10-31 Thread Sinan Nalkaya
hi i have some python practice and want to develop tiny prgramme that takes screen shots from command line, im using gnome now but my programme should support the others especially pure X - window. also i want to learn some more about inside when taking screen shots. thanks. --

Tkinter problem

2005-10-31 Thread dale cooper
Hi everybody! I've recently installed python2.4.2 on Fedora 4 (from downloaded sources), but it appeared, that I can't use Tkinter module: import Tkinter Traceback (most recent call last): File stdin, line 1, in ? File /usr/local/lib/python2.4/lib-tk/Tkinter.py, line 38, in ? import

Re: Need Python Pro for Help!! Plzz

2005-10-31 Thread Ruben Charles
A stranger from the land of Woot came to Master Foo as he was eating the morning meal with his students. I hear y00 are very l33t, he said. Pl33z teach m3 all y00 know. Master Foo's students looked at each other, confused by the stranger's barbarous language. Master Foo just smiled and replied:

Re: data hiding/namespace pollution

2005-10-31 Thread Steven D'Aprano
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 python are: method 1: _X -

Re: mixin helper class for unknown attribute access?

2005-10-31 Thread Alex Hunsley
Steven D'Aprano wrote: On Mon, 31 Oct 2005 10:39:40 +, Alex Hunsley wrote: I know that I can catch access to unknown attributes with code something like the following: class example: def __getattr__(self, name): if name == 'age': return __age

Re: taking x-window screen shot

2005-10-31 Thread jepler
I recommend using 'xwd' to actually get the screenshot, because xwd is installed nearly everwhere X is. xwd-format images are documented by the header file X11/XWDFile.h. This program works in a pipeline to convert certain xwd-format images to postscript. You can use it something like this:

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: Alex Hunsley [EMAIL PROTECTED] writes: Btw, can you recall the subject line of the thread? I'd like to google groups for it and have a read of that thread... ta! Search for: alex martelli pychecker on comp.lang.python... I don't have the thread's name anymore.

PyCon: proposal deadline is today

2005-10-31 Thread A.M. Kuchling
Today is your last chance to get in your PyCon 2006 submissions. (If you can't finish an outline today, you can still submit a summary and provide the outline in a few days.) Conference site:http://www.python.org/pycon/2006/ Call for Proposals: http://www.python.org/pycon/2006/cfp Submission

Re: mixin helper class for unknown attribute access?

2005-10-31 Thread Steven D'Aprano
On Mon, 31 Oct 2005 12:47:16 +, Alex Hunsley wrote: Sorry, as I noted in another reply not long ago, I was having a 'braino' and not saying what I actually meant! What I was talking about was the accidental _setting_ of the wrong attribute. And the mixin class I'm looking for is one

Re: Need Python Pro for Help!! Plzz

2005-10-31 Thread Alex Hunsley
[EMAIL PROTECTED] wrote: Need python Pro at [EMAIL PROTECTED] , if u wanna help, 1) Why would anyone want to help you when you're not even willing to spend the (small) time and effort to spell simple words like you correctly or make sure your post actually makes sense? Start by helping

Re: mixin helper class for unknown attribute access?

2005-10-31 Thread Steven D'Aprano
On Mon, 31 Oct 2005 05:12:11 -0800, Sam Pointon wrote: One alrady exists, __slots__. class Foo(object): __slots__ = ['bar', 'baz', 'qig'] f = Foo() f.foo = 'bar' Traceback (most recent call last): File pyshell#5, line 1, in -toplevel- f.foo = 'bar' AttributeError:

Re: learning emacs lisp

2005-10-31 Thread Jaime Wyant
I really appreciate the fact that while Xah is an inflammatory nut, he hasn't been `censored' by the folks that run the mailing list. Free speech is awesome, no? jw On 10/30/05, Steve Holden [EMAIL PROTECTED] wrote: [To new readers: please ignore the rantings of this unbalanced person, who

Re: Scanning a file

2005-10-31 Thread Paul Watson
Alex Martelli wrote: ... gc.garbage [__main__.a object at 0x64cf0, __main__.b object at 0x58510] So, no big deal -- run a gc.collect() and parse through gc.garbage for any instances of your wrapper of file class, and you'll find ones that were forgotten as part of a cyclic garbage loop and

Re: data hiding/namespace pollution

2005-10-31 Thread bruno at modulix
Alex Hunsley wrote: bruno at modulix wrote: Alex Hunsley wrote: (snip) method 1: _X - (single underscore) - just cosmetic, a convention to let someone know that this data should be private. method 2: __X - (double underscore) - mangles the name (in a predictable way).

Arguments for button command via Tkinter?

2005-10-31 Thread [EMAIL PROTECTED]
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 same purpose so they need to call the same method,

Re: Need Python Pro for Help!! Plzz

2005-10-31 Thread Gerhard Häring
Alex Hunsley wrote: [EMAIL PROTECTED] wrote: Need python Pro at [EMAIL PROTECTED] , if u wanna help, [...] 2) Why should someone willing to help you enter into a private email discussion? [...] Actually, it's a Google Group mailing list (formerly eGroups):

Re: Automatically creating a HOME environ variable on Windows?

2005-10-31 Thread Jorgen Grahn
On Mon, 31 Oct 2005 12:26:30 +0100, Maciej Dziardziel [EMAIL PROTECTED] wrote: Jorgen Grahn wrote: Best solution would be to have portable function that returns user home directory and knows about all platfom quirks. Why is that better than Python creating a HOME in os.environ, if it

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

2005-10-31 Thread bruno at modulix
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

Re: Arguments for button command via Tkinter?

2005-10-31 Thread [EMAIL PROTECTED]
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 has any other ideas please tell. --

Re: need start point for getting html info from web

2005-10-31 Thread alex_f_il
You can easily do it with SW Explorer Automation (http://home.comcast.net/~furmana/SWIEAutomation.htm). The program creates an automation API for any Web application which uses HTML and DHTML and works with Microsoft Internet Explorer. The Web application becomes programmatically accessible from

Re: Need Python Pro for Help!! Plzz

2005-10-31 Thread Fredrik Lundh
Alex Hunsley wrote: 2) Why should someone willing to help you enter into a private email discussion? Newsgroups like this exist to help people looks like Fan wants to run his own group: http://groups.google.com/group/newtopython/about There are no experts or PHD's, all are simple

Re: Tkinter problem

2005-10-31 Thread Fredrik Lundh
dale cooper wrote: I've recently installed python2.4.2 on Fedora 4 (from downloaded sources), but it appeared, that I can't use Tkinter module: import Tkinter Traceback (most recent call last): File stdin, line 1, in ? File /usr/local/lib/python2.4/lib-tk/Tkinter.py, line 38, in ?

Re: process and spinning slash

2005-10-31 Thread Fredrik Lundh
benz [EMAIL PROTECTED] wrote I have rewrited my code as follow, but it still not working. import os, sys pid = os.fork() if pid == 0: os.execvp(du,(du,-shc,/usr/share)) else: while 1: try: os.kill(pid,0) sys.stdout.write('running') sys.stdout.flush()

Re: Expanding Python as a macro language

2005-10-31 Thread Jorgen Grahn
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 GUI. Side note: lots of people would disagree with that. For

Re: Scanning a file

2005-10-31 Thread Steve Holden
Paul Watson wrote: Alex Martelli wrote: ... gc.garbage [__main__.a object at 0x64cf0, __main__.b object at 0x58510] So, no big deal -- run a gc.collect() and parse through gc.garbage for any instances of your wrapper of file class, and you'll find ones that were forgotten as part of a cyclic

Windows - Need to process quotes in string...

2005-10-31 Thread Ernesto
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_0403PID_6010MI_00\715E4F681$) I want to send the string parameter: enable @USB\VID_0403PID_6010MI_00\715E4F681 to the program devcon. The argument

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Steve Holden
[EMAIL PROTECTED] wrote: 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 has any other ideas please tell. I'm

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

2005-10-31 Thread Sybren Stuvel
Ernesto enlightened us with: I'm trying to use a $ delimeter Why? I want to send the string parameter: enable @USB\VID_0403PID_6010MI_00\715E4F681 launchWithoutConsole(devcon.exe 'enable @USB\VID_0403PID_6010MI_00\715E4F681') Or, if you should also be able to send single

Re: handling ExpatError exception raised from ElementTree.XML() method

2005-10-31 Thread Paul Boddie
[EMAIL PROTECTED] wrote: It's not clear how a grep of the site-packages directory revealed the most likely location of the ExpatError class is xml.parsers.expat. Here's what I did: grep -e ExpatError -r /usr/lib/python2.4/site-packages/ What is interesting is that most of the hits belonged

Re: Expanding Python as a macro language

2005-10-31 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: I know, but nowadays almost any relevant application has a GUI. I can't think of any relevant server application running on Linux that has a GUI. My text processor, email client, Usenet client, IRC client, address book and agenda are all without GUI too.

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 python are:

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: 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 whatever

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 underscore) -

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_0403PID_6010MI_00\715E4F681$) I want to send the string parameter: enable

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 name

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

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

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 same

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,

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

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: snip 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 various

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 but a

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 the overlap

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 better

Re: textwidget.tag_bind(name, Any-KeyPress, 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: 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

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: 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. --

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 is.

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

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: 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: 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 GUI. Side note:

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

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 method

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: 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 definition of

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: 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: 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 significantly.

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: 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. See

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 reads:

Re: Function returns none

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

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 first

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 substitute from

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

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 distinction that there

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\srcc:\Program Files\swigwin-1.3.25\swig.exe -python net-snmp.i

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 demonstrate

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 microsoft

  1   2   >