Re: [Tutor] dont understand this error MySQLdb

2005-12-14 Thread Wolfram Kraus
nephish wrote: > hey there, > i am using the MySQLdb module and i keep getting this error, it doesnt > offer much in the way of explanation > > _mysql_exceptions.InterfaceError: (0, '') > > does anyone know what this means ? > > thanks > I think you should better post in the Mysql for Python fo

Re: [Tutor] Introspecting class and method names

2005-12-14 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > * Kent Johnson <[EMAIL PROTECTED]> [051214 16:00]: >>You can look at the stack frame to find out what method you are in. See for >>example >>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062 > > > Thanks! This is really nice! > > Must tie a string aroun

Re: [Tutor] FWD: How do I fix this error so that my exchange rates program will work?

2005-12-14 Thread Ismael Garrido
Simon Gerber wrote: >>store.write(rate + '\n') >> >> > >With this: > > store.write(`rate` + \n') > >Note that these are not your regular sungle quotes. You'll find them >above the tab key, under escape, on most standard keyboards. > > I have to say I don't like that. It's

Re: [Tutor] How do I fix this error so that my exchange rates program will work?

2005-12-14 Thread Kent Johnson
Nathan Pinno wrote: > I added the dictionary and loading and saving for the rates in my > exchange currency rates program, and when I ran it, I got the following > error: > > Traceback (most recent call last): > File "D:\Python24\exchange.py", line 84, in -toplevel- > save_rates(rates) >

Re: [Tutor] Introspecting class and method names

2005-12-14 Thread tim
* Kent Johnson <[EMAIL PROTECTED]> [051214 16:00]: > Tim Johnson wrote: > > I was pleasantly surprised to notice in a previous thread that python > > can automagically retrieve a class name thru __class__.__name__ > > 1)Can someone point me to further documentation on this topic? > > __name__ and

Re: [Tutor] Introspecting class and method names

2005-12-14 Thread Brian van den Broek
Tim Johnson said unto the world upon 2005-12-14 18:02: > I was pleasantly surprised to notice in a previous thread that python > can automagically retrieve a class name thru __class__.__name__ > 1)Can someone point me to further documentation on this topic? > 2)Is it possible for the name of a clas

Re: [Tutor] Introspecting class and method names

2005-12-14 Thread Kent Johnson
Tim Johnson wrote: > I was pleasantly surprised to notice in a previous thread that python > can automagically retrieve a class name thru __class__.__name__ > 1)Can someone point me to further documentation on this topic? __name__ and __module__ at least are documented here: http://docs.python.org

[Tutor] FWD: How do I fix this error so that my exchange rates program will work?

2005-12-14 Thread Simon Gerber
Sorry - Forgot to reply to the list as well. -- Forwarded message -- Hi Nathan, Let's take a look at the debugger message: > Traceback (most recent call last): > File "D:\Python24\exchange.py", line 84, in -toplevel- > save_rates(rates) > File "D:\Python24\exchange.py",

[Tutor] Introspecting class and method names

2005-12-14 Thread Tim Johnson
I was pleasantly surprised to notice in a previous thread that python can automagically retrieve a class name thru __class__.__name__ 1)Can someone point me to further documentation on this topic? 2)Is it possible for the name of a class method to be programmatically retrieved from within the sc

Re: [Tutor] Scope Problem with Files

2005-12-14 Thread Carroll, Barry
Thanks, Bob. I figured it was something simple. BGC "Never trust anything that can think for itself if you can't see where it keeps its brain" JK Rowling <> > > > > sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > > sock.settimeout(timetowait) > >

Re: [Tutor] Scope Problem with Files

2005-12-14 Thread bob
At 11:13 AM 12/14/2005, Carroll, Barry wrote: >Greetings: > >I am implementing a (crude but useful) debug facility in my test >system client software. Basically, I test the value of a global >Boolean. It True, I write pertinent data to a text file. I want to >do this in multiple functions in a

[Tutor] How do I fix this error so that my exchange rates program will work?

2005-12-14 Thread Nathan Pinno
I added the dictionary and loading and saving for the rates in my exchange currency rates program, and when I ran it, I got the following error:   Traceback (most recent call last):  File "D:\Python24\exchange.py", line 84, in -toplevel-    save_rates(rates)  File "D:\Python24\exchange.py", l

[Tutor] Is this a good idea to improve my currency program?

2005-12-14 Thread Nathan Pinno
I was thinking of using a dictionary to hold the currency exchange rates, and saving it to a file, and loading it every time the program opens. It still would not be GUI, but it would be a step towards a better program, I believe. Is this a good idea, or is there stronger ways of doing it?  

Re: [Tutor] Is this a good idea to improve my currency program?

2005-12-14 Thread Greg Lindstrom
>I was thinking of using a dictionary to hold the currency exchange rates, >and saving it to a file, and loading it every time the program opens. It >still would not be GUI, but it would be a step towards a better program, I >believe. Is this a good idea, or is there stronger ways of doing it? Is

Re: [Tutor] information needed to make a connection between computers

2005-12-14 Thread Tim Williams (gmail)
On 11/12/05, John Walton <[EMAIL PROTECTED]> wrote:  Hello again! I'm still working on that instant messenger (for science fair), and I have been reading about networking in some Java tutorials. In one part of it, it said to have a connection with another computer, you need to know the IP name of t

[Tutor] ElementTree in Python 2.5!

2005-12-14 Thread Kent Johnson
By some miracle of the gods smiling and the planets aligning, a comp.lang.python thread that started with the question "ElementTree - Why not part of the core?" has actually resulted in ElementTree *becoming* part of the core for Python 2.5! Pretty cool! So the core Python distribution will finally

[Tutor] ElementTree in Python 2.5!

2005-12-14 Thread Kent Johnson
By some miracle of the gods smiling and the planets aligning, a comp.lang.python thread that started with the question "ElementTree - Why not part of the core?" has actually resulted in ElementTree *becoming* part of the core for Python 2.5! Pretty cool! So the core Python distribution will fin

Re: [Tutor] empty class methods

2005-12-14 Thread Brian van den Broek
david said unto the world upon 2005-12-14 05:39: > > class foo: > def sayhi(self): > print 'hello world' > def saybye(self): ##is there any reason for this to be here? > pass > > class bar(foo): > def saybye(self): > print 'bye now' > > class baz(foo): > d

[Tutor] Scope Problem with Files

2005-12-14 Thread Carroll, Barry
Greetings: I am implementing a (crude but useful) debug facility in my test system client software. Basically, I test the value of a global Boolean. It True, I write pertinent data to a text file. I want to do this in multiple functions in a module. Rather than open and close the file each t

Re: [Tutor] Tkinter help required

2005-12-14 Thread Michael Lange
On Wed, 14 Dec 2005 15:05:07 +0200 Vlad Popescu <[EMAIL PROTECTED]> wrote: Hi Vlad, > Hello everyone, > > I have been desperately trying to get Tkinter to run, but without much > success thus far. I've followed the instructions at > http://wiki.python.org/moin/TkInter ; importing _tkinter does n

[Tutor] dont understand this error MySQLdb

2005-12-14 Thread nephish
hey there, i am using the MySQLdb module and i keep getting this error, it doesnt offer much in the way of explanation _mysql_exceptions.InterfaceError: (0, '') does anyone know what this means ? thanks ___ Tutor maillist - Tutor@python.org http://m

Re: [Tutor] Editors

2005-12-14 Thread Burge Kurt
Thaks to all.. I have started with Scite and may be change later; let me see first what can I do with python? Burge On 12/14/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Burge Kurt wrote: > > Btw I am using Suse Linux 9.0 .. > > > > Today I have tried to install drPython but could not manage

Re: [Tutor] Editors

2005-12-14 Thread Kent Johnson
Burge Kurt wrote: > Btw I am using Suse Linux 9.0 .. > > Today I have tried to install drPython but could not manage ; because > I could not install wxPython that was due to gtk problem (i was seeing > pkg-config but it could not) ... Is there something easy for me ?? > which does not require wxPy

Re: [Tutor] Editors

2005-12-14 Thread Burge Kurt
Btw I am using Suse Linux 9.0 .. Today I have tried to install drPython but could not manage ; because I could not install wxPython that was due to gtk problem (i was seeing pkg-config but it could not) ... Is there something easy for me ?? which does not require wxPython (consequently glib gtk at

Re: [Tutor] Editors

2005-12-14 Thread Burge Kurt
Hi; I am a newbie and want to find a suitable editor for myself.. I will not need a UI implementation just thinking to make file transportation over IP. If you will guide; I would be thankful :) Burge ___ Tutor maillist - Tutor@python.org http://mail

[Tutor] Tkinter help required

2005-12-14 Thread Vlad Popescu
Hello everyone, I have been desperately trying to get Tkinter to run, but without much success thus far. I've followed the instructions at http://wiki.python.org/moin/TkInter ; importing _tkinter does not work and I have no idea what files I should edit in order to add the module. Both Tcl and Tk,

Re: [Tutor] empty class methods

2005-12-14 Thread Kent Johnson
david wrote: > > > class foo: > def sayhi(self): > print 'hello world' > def saybye(self): ##is there any reason for this to be here? > pass Is foo.saybye() a default implementation or a placeholder for an 'abstract' method? A base class can have a default implementat

Re: [Tutor] ElementTree, TidyHTMLTreeBuilder, find

2005-12-14 Thread Kent Johnson
Bob Tanner wrote: > Having problem understanding how find() works. > > The html file I'm using is attached. > > Python 2.4.2 (No.2, Nov 20 2005, 17:04:48) > from elementtidy import TidyHTMLTreeBuilder doc = TidyHTMLTreeBuilder.parse('048229.html') root = doc.getroot() print root

Re: [Tutor] Python - SQL paradigm (Will I need a hammer to make it fit?)

2005-12-14 Thread Kent Johnson
Liam Clarke wrote: > Hi all, > > Just contemplating. > > If in Python I were organising a data index along the lines of - > > j = { > > "k_word1" : ["rec1","rec2","rec3","rec4"], > ... > "k_wordn" :["recX","rec4"] > > } > > and I was going to find records that matched by seeing what record >

[Tutor] empty class methods

2005-12-14 Thread david
    class foo:    def sayhi(self):    print 'hello world'    def saybye(self): ##is there any reason for this to be here?    pass   class bar(foo):    def saybye(self):    print 'bye now'   class baz(foo):    def saybye(self):    print 'later tater'   x = foo()y = bar()z =

[Tutor] Python - SQL paradigm (Will I need a hammer to make it fit?)

2005-12-14 Thread Liam Clarke
Hi all, Just contemplating. If in Python I were organising a data index along the lines of - j = { "k_word1" : ["rec1","rec2","rec3","rec4"], ... "k_wordn" :["recX","rec4"] } and I was going to find records that matched by seeing what record occurred in the most lists (via set intersections

Re: [Tutor] Editors

2005-12-14 Thread Franz Steinhaeusler
On Tue, 13 Dec 2005 23:28:31 -0500, Steven Bell <[EMAIL PROTECTED]> wrote: >Here's my two cents on ide's for Python. >Idle... It's got a nice color scheme but it's tkinter gui is a bit dated >and it's short many of the built-in convenience features. And no calltips and autocompletion, although t