Re: [Tutor] How does pickle save files?

2005-11-30 Thread Danny Yoo
On Wed, 30 Nov 2005, Nathan Pinno wrote: > In what format does pickle save files as? I mean it is .txt, .dat, or > some other way? Hi Nathan, pickle actually has three formats: there's a textual format that looks weird, and two binary formats that looks even weirder. *grin* You should probab

[Tutor] How does pickle save files?

2005-11-30 Thread Nathan Pinno
Hey all,   In what format does pickle save files as? I mean it is .txt, .dat, or some other way?   Thanks Nathan Pinno, Owner/operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/ MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705 

Re: [Tutor] Class Inheritance -> NameError

2005-11-30 Thread Tim Johnson
* John Fouhy <[EMAIL PROTECTED]> [051130 19:21]: <..snip...> > On 01/12/05, Tim Johnson <[EMAIL PROTECTED]> wrote: > superclass __init__ methods, or when you want to call them. So, it is > up to you to make that call. > > You can do that like this: > > class sub(test): > def __init__(self): >

Re: [Tutor] Class Inheritance -> NameError

2005-11-30 Thread John Fouhy
On 01/12/05, Tim Johnson <[EMAIL PROTECTED]> wrote: > My thanks to Christopher and Liam. I've revisited this > with the following: > class test: > def __init__(self): > self.s = ' there' > def val(self,V): > print '%s%s' % (V,self.s) > class sub(test): > def __init__(sel

Re: [Tutor] Class Inheritance -> NameError

2005-11-30 Thread Tim Johnson
My thanks to Christopher and Liam. I've revisited this with the following: class test: def __init__(self): self.s = ' there' def val(self,V): print '%s%s' % (V,self.s) class sub(test): def __init__(self): pass The following console session: >>> T = mylib.test() >

Re: [Tutor] Class Inheritance -> NameError

2005-11-30 Thread Liam Clarke-Hutchinson
Hi Tim, Either - class test: def __init__(self,v): self.__val = v def val(self): print self.__val class sub(test): def __init__(self, v): test.__init__(v) self.val() or - class sub(test): def __init__(self, v): test.__init__(v)

Re: [Tutor] Class Inheritance -> NameError

2005-11-30 Thread Christopher Arndt
Tim Johnson schrieb: > The following code snippet is meant to test inheritance: > class test: > def __init__(self,v): > self.__val = v > def val(self): > print self.__val > class sub(test): > def __init__(self): > val() > The following console session has an erro

[Tutor] Class Inheritance -> NameError

2005-11-30 Thread Tim Johnson
The following code snippet is meant to test inheritance: class test: def __init__(self,v): self.__val = v def val(self): print self.__val class sub(test): def __init__(self): val() The following console session has an error: >>> T = mylib.test('hello') >>> s = my

[Tutor] Need help with wxListCtrl

2005-11-30 Thread Jacob S.
Resending due to change in subject line -- adding [Tutor] Also, I wish to point out now that I've noticed, the spacing on the diagram hasn't persisted If anyone wants a jpg or something, let me know. > Hi, long time no see. > > For you Spanish speakers: > > Yo tenía que aprender a poco españ

[Tutor] Need help with wxListCtrl

2005-11-30 Thread Jacob S.
Hi, long time no see. For you Spanish speakers: Yo tenía que aprender a poco español mientras no estaba aquí. Si ustedes son aburrido y me desean ayudar aprender más, mandan una -- ¿Qué desea decir "email"? Y no mandan el (email) en el (mailing list), por favor. (It would be much, much apprec

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Michael Lange wrote: > On Wed, 30 Nov 2005 13:41:54 -0500 > Kent Johnson <[EMAIL PROTECTED]> wrote: >This is the full error: >Traceback (most recent call last): > File >"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", >line 310, in RunScript > ex

Re: [Tutor] Unicode trouble

2005-11-30 Thread Michael Lange
On Wed, 30 Nov 2005 13:41:54 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > >>>This is the full error: > >>>Traceback (most recent call last): > >>> File > >>>"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > >>>line 310, in RunScript > >>>exec codeObject in __main

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Øyvind wrote: > Øyvind wrote: > >>>Where are you getting these errors (what line of the program)? Do you >> >>know >what kind of strings objSelection.Find.Execute() is expecting? >> >> >>>Kent >> >> >>>The program stops working and gives me these errors when I try to run it >>>when it encounters a

[Tutor] Unicode trouble

2005-11-30 Thread Øyvind
Øyvind wrote: > >>Where are you getting these errors (what line of the program)? Do you > > know >what kind of strings objSelection.Find.Execute() is expecting? > >>Kent > > >> The program stops working and gives me these errors when I try to run it >> when it encounters a non-english letter. > >>

[Tutor] Scientific Notation + 18 Digit Pecision

2005-11-30 Thread Hubert Fitch
Hi Danny!  (Python 2.3 IDLE GUI  in WindowsXP Home edition) Thank you and the others who have sent replies!   Attached to this file is a Rich Text File using "Save Copy As" from the Python Shell display. This will give an example of the desired formatted output. Some displayed lines are long,

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Øyvind wrote: > >>Where are you getting these errors (what line of the program)? Do you > > know >what kind of strings objSelection.Find.Execute() is expecting? > >>Kent > > > The program stops working and gives me these errors when I try to run it > when it encounters a non-english letter. >

Re: [Tutor] rare matrix

2005-11-30 Thread Kent Johnson
János Juhász wrote: > Dear All, > > do you know any python solution to handle big big rare matrices effectively > with python. > I would make matrix multiplications with 3000x3000 matrices, but with 1-2% > data in them. > Could you recommend any starting point for that ? Googling "python sparse m

Re: [Tutor] log parsing

2005-11-30 Thread Will Harris
Cool, thanks Kent.On 11/29/05, Kent Johnson <[EMAIL PROTECTED]> wrote: Will Harris wrote:> I am trying to work out doing a bit of log parsing in python. Below is> the code I have gotten so far, It works in an earlier version of this> one but this one doesn't print out the lines in my log files. Doe

Re: [Tutor] rare matrix

2005-11-30 Thread Pujo Aji
try numeric or numpy in :http://www.numpy.org/Cheers,pujoOn 11/30/05, János Juhász < [EMAIL PROTECTED]> wrote:Dear All,do you know any python solution to handle big big rare matrices effectively with python.I would make matrix multiplications with 3000x3000 matrices, but with 1-2%data in them.Could

[Tutor] rare matrix

2005-11-30 Thread János Juhász
Dear All, do you know any python solution to handle big big rare matrices effectively with python. I would make matrix multiplications with 3000x3000 matrices, but with 1-2% data in them. Could you recommend any starting point for that ? Yours sincerely, __ János Juh

[Tutor] Unicode trouble

2005-11-30 Thread Øyvind
>Where are you getting these errors (what line of the program)? Do you know >what kind of strings objSelection.Find.Execute() is expecting? > >Kent The program stops working and gives me these errors when I try to run it when it encounters a non-english letter. This is the full error: Traceback

Re: [Tutor] Unicode trouble

2005-11-30 Thread Kent Johnson
Øyvind wrote: > Hello. > > I am writing a program that reads in a text file, extracts each of the > words and replaces a different document with the words. It works great > until it encounter a non-english letter. > > I have tried the following: > > self.f = codecs.open(ordliste, 'r', 'utf-8') >

[Tutor] Unicode trouble

2005-11-30 Thread Øyvind
Hello. I am writing a program that reads in a text file, extracts each of the words and replaces a different document with the words. It works great until it encounter a non-english letter. I have tried the following: self.f = codecs.open(ordliste, 'r', 'utf-8') where I open the first file. And

Re: [Tutor] my text adventure

2005-11-30 Thread Kent Johnson
david wrote: > i just now learned what setter and getter is. > i did this to make my inventory function work properly. > i'll try to remove my getter. The inventory list can be just for a in self.inventory: print a.name You can access object attributes from outside the

Re: [Tutor] my text adventure

2005-11-30 Thread david
> You might want to make coords an init parameter for Room, rather than > assigning it separately. You could also have Rooms register themselves > with world as part of their initialization, that would be better than > having to repeat yourself in the definition of world. brilliant! i'll do th