[Tutor] making proigress

Kirk Bailey idiot1@netzero.net
Wed Dec 18 01:34:01 2002


Magnus Lycka wrote:
> At 01:01 2002-12-17 -0500, Kirk Bailey wrote:
> 
>> Advice? this is python 1.5.2, is this important?
> 
> 
> Yes, it makes all the difference.
> 
> Do you really HAVE to work with that old version?
Until I can pony up the shekels for a 40Gb drive for a upgrade to my FreeBSD 
version and python- my hardware guru says we need to put in more space so I 
can drag in all the extra space consuming stuff with the newer versions, and 
still have LOTS of elbow room for existing stuff we dare not part with,

As for MUST WE continue with 1.5.2, the answer therefore is for now, YES, 
sadly enough. Wife is not able to work anymore, illness, and our income went 
from 2 paychecks to 1, so everything is scheduled, and with a LONG lead time.


> 
> String methods came in 1.6 or 2.0, don't remember
> which, and it makes little difference because you
> should never use 1.6.x, it's buggy.
> 
> Basically, for 1.5.2 or prior, change all
> 
> "a string".some_method(a, b, c)
> 
> to
> 
> import string
> ...
> string.some_method("a string", a, b, c)
> 
> Obviously, you use the old style a few lines above, in:
>                 aliasline=string.strip(f1.readline())   #
> That's kocher in 1.5.2, but in modern python it would be
> written as
>                 aliasline=f1.readline().strip()
> 
> To be 1.5.2 complient, you must be consistent with this and
> do:
>                if string.find(aliasline, listname+':/"')==-1:  # if this is
> instead of
Ah, saved em some research, although I think I will read the module again just 
for giggles, it never hurts.


>                if aliasline.find(listname+':/"')==-1:  # if this is
> 
> BTW, you seem to have indentation problems with your code,
> mixing tabs and spaces. I suggest that you always run your
> programs with "python -tt" to root out such evil.
> 
That is an artifact of mouse copying from a ssh terminal emulator  (PuTTY, 
it's free, it's secure, it works well) into nutscrape mismessenger. In the 
script, it is all tabs, and nice and even.

> 
> 


-- 

end

Respectfully,
              Kirk D Bailey


+---------------------"Thou Art Free." -Eris-----------------------+
| http://www.howlermonkey.net  mailto:highprimate@howlermonkey.net |
| KILL spam dead!      http://www.scambusters.org/stopspam/#Pledge |
| http://www.tinylist.org  +--------+   mailto:grumpy@tinylist.org |
+------------------Thinking| NORMAL |Thinking----------------------+
                            +--------+

---------------------------------------------
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.com