Kevin M wrote:
> Good news. I've fixed it up and all seems to be well.
>
> Thanks, all. I've learned a lot from this -:)
Kindly share the learning by feeding back:
(1) What the original problem ("class data being zapped by method")
really was.
(2) What was the cause of the drama with pyc files.
Good news. I've fixed it up and all seems to be well.
Thanks, all. I've learned a lot from this :)
John Machin wrote:
> Kevin M wrote:
> > Inline
> >
> > > 1.) Why are you removing the .pyc file?
> >
> > After I had run the script once and subsequently changed the class
> > file, I would run the
Sion Arrowsmith wrote:
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>> fpath = os.path.join('datafiles', filename + ".tabdata")
>
> fpath = os.path.join('datafiles', filename + os.path.extsep + "tabdata")
> 8-) I'm a bit bemused by extsep -- it didn't appear until 2.2, by
> which time there
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>fpath = os.path.join('datafiles', filename + ".tabdata")
fpath = os.path.join('datafiles', filename + os.path.extsep + "tabdata")
8-) I'm a bit bemused by extsep -- it didn't appear until 2.2, by
which time there can't have been many people with an
Simon Forman wrote:
(snip)
> Not that this has anything to do with your actual question, but there
> are a number of small details that I noticed while reading your code:
>
>
> 2.) Reading lines from a file is better done like so:
>
> arrLines = open('datafiles/'+filename+'.tabdata').readlines()
Kevin M wrote:
> Inline
>
> > 1.) Why are you removing the .pyc file?
>
> After I had run the script once and subsequently changed the class
> file, I would run the script again, and it would use the pyc file from
> the older revision of the script. I got frustrated with having to
> manually delet
Inline
> 1.) Why are you removing the .pyc file?
After I had run the script once and subsequently changed the class
file, I would run the script again, and it would use the pyc file from
the older revision of the script. I got frustrated with having to
manually delete the pyc file before rerunnin
John Machin wrote:
> print [i, len(x.data), id(x) for i, x in enumerate(arrTests)]
but should have written:
print [(i, len(x.data), id(x)) for i, x in enumerate(arrTests)]
--
http://mail.python.org/mailman/listinfo/python-list
Kevin M wrote:
> Figures. I'll try to complicate it sufficiently ;)
>
>
> [edit] I was going to try to sum up what goes on, but I realized that I
> was retyping what I already programmed in an effort to better
> illustrate exactly what I'm doing. Pastebin it is. Don't fear, it's
> only around 200 l
Kevin M wrote:
> Figures. I'll try to complicate it sufficiently ;)
>
>
> [edit] I was going to try to sum up what goes on, but I realized that I
> was retyping what I already programmed in an effort to better
> illustrate exactly what I'm doing. Pastebin it is. Don't fear, it's
> only around 200 l
Figures. I'll try to complicate it sufficiently ;)
[edit] I was going to try to sum up what goes on, but I realized that I
was retyping what I already programmed in an effort to better
illustrate exactly what I'm doing. Pastebin it is. Don't fear, it's
only around 200 lines total.
Class file --
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'll cut to the chase.
>
> I have a class named Foo(). I create an instance of this class named
> bar, and I set bar.data to a large list of tuples.
>
> Within Foo() there is a method which operates on self.data. I need to
> call this method after I set self.data
12 matches
Mail list logo