Re: [Tutor] Another try at Python's selfishness

2006-02-03 Thread Ed Singleton
On 3 Feb 2006 03:59:10 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I still see newbie-friendliness as a MAJOR plus for Python -- it increases the chance that users of your software will become contributors. Yes, I 100% agree to that point! But the point is, the current situation is

[Tutor] Fwd: list method help

2006-02-03 Thread Rinzwind
Chris or Leslie Smith: sorry wrong addess :*( This bit l[:]=l[-1:]+l[0:-1] I think is VERY elegant. When I saw this in your post I tought: DUH. I did the same with 1 line more but I am still new to python ;) Regarding the rest of the 'aside'. What is the reasoning behind this: ### l=range(3)

Re: [Tutor] list method help

2006-02-03 Thread Rinzwind
On 2/3/06, Chris or Leslie Smith [EMAIL PROTECTED] wrote: Rinzwind wrote: | Well Chris or Leslie Smith. | | This bit l[:]=l[-1:]+l[0:-1] I think is VERY elegant. When I saw this | in your post I tought: DUH. | I did the same with 1 line more but I am still new to python ;) | You're seeing

Re: [Tutor] list method help

2006-02-03 Thread Kent Johnson
On 2/3/06, Chris or Leslie Smith [EMAIL PROTECTED] wrote: Others could give you a really good answer. I am a BASIC/FORTRAN writer myself, and getting used to the *object* orientation of python took a little while, but after you get the hang of it, it's not bad. In BASIC you think of variables

Re: [Tutor] list method help

2006-02-03 Thread Rinzwind
On 2/3/06, Kent Johnson [EMAIL PROTECTED] wrote: On 2/3/06, Chris or Leslie Smith [EMAIL PROTECTED] wrote:Others could give you a really good answer. I am a BASIC/FORTRAN writer myself, and getting used to the *object* orientation of python took a little while, but after you get the hang of it,

[Tutor] query regarding mysql database backup?? please Help

2006-02-03 Thread deepak.gupta
Hi, I did my script like this for backing my max_everest_2006mysql database import os target_dir = "./backup" os.system("mysqldump --add-drop-table -c -u root -pmysql 'MAX_EVEREST_2006' "+target_dir+"table.bak.sql") root is my user name,mysql is my password,'MAX_EVEREST_2006' is

Re: [Tutor] query regarding mysql database backup?? please Help

2006-02-03 Thread Danny Yoo
On Fri, 3 Feb 2006, deepak.gupta wrote: I did my script like this for backing my max_everest_2006 mysql database error: 1044: Access denied for user 'MAX_USER'@'%' to database 'MAX_EVEREST_2006' when using LOCK TABLES Your question doesn't have to do with Python. Ask your MySQL

Re: [Tutor] list method help

2006-02-03 Thread Kent Johnson
Rinzwind wrote: On 2/3/06, *Kent Johnson* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: You definitely have to stop thinking of variables as containers. They are pointers or references to values. Another way to think of this is that variables are names for things. You may

Re: [Tutor] list method help

2006-02-03 Thread Danny Yoo
But this assignment sort of puzzles me to why it's done like this (maybe cuz I am not used to it and can not see beyond my own experience in coding (having a blind spot or something like that)). If we have a snippet of code like: ### def test(): x = [] f(x) print x

Re: [Tutor] Another try at Python's selfishness

2006-02-03 Thread Alan Gauld
I have to say that as a newbie, it took me quite a while to get my head around that extra parameter (self). That's OK, its true of most folks, even non newbies! It is one area where Python is different to most languages who hide the self completely. It took me ages to work out that: class A: