Re: [Tutor] Swapping variables ...

2007-11-10 Thread O.R.Senthil Kumaran
> After quizzing newbies in C on swapping without 3rd variable, I found this > to be really *cool* construct to swap :) > x = 10 > y = 20 > x,y = y,x > Keep in mind that, this is actually a tuple assignment. A new tuple x,y is created with the older one y,x, and with the side effect thatthe var

Re: [Tutor] Wrong version of Python being executed

2007-11-10 Thread Martin Walsh
Tony Cappellini wrote: >>> What do you get if you print sys.path from >> the interpreter? > > I've printed out sys.path from inside the script as well, > and all references to Python25 are replaced with Python23 > > > FWIW- This isn't a problem unique to this script. > I've just printed out sys.

[Tutor] Bitmap editor and File-saving

2007-11-10 Thread Johnston Jiaa
Hello, I already asked this on python-list, but would like to improve the odds of having my question answered, so I am asking it here too. I apologize if this bothers anyone. I am using Tkinter to create a program in which the user can draw a simple bitmap image. What library would be best

Re: [Tutor] Happy Diwali

2007-11-10 Thread Lokesh R
ThankQ & WIsh you the same... And Congrats for Getting Engaged ;) Best Regards, Lokesh On 11/8/07, Amit Saxena <[EMAIL PROTECTED]> wrote: > > Hi, > > Wishing u all and ur family a very HAPPY DIWALI > > > Cheers > Amit > ___ Tutor maillist - Tutor@

Re: [Tutor] Wrong version of Python being executed

2007-11-10 Thread Tony Cappellini
>>What do you get if you print sys.path from > the interpreter? I've printed out sys.path from inside the script as well, and all references to Python25 are replaced with Python23 FWIW- This isn't a problem unique to this script. I've just printed out sys.path from another script in another dire

Re: [Tutor] Wrong version of Python being executed

2007-11-10 Thread Tony Cappellini
Thanks for replying Kent. This is quite a strange mystery. > A couple of possibilities... > Is there a #! line at the start of the script that specifies Python 2.3 > (I'm not sure if those work in windows though...) No- The shebang line is for non-Windows systems (Unix variants) > How do you run

Re: [Tutor] Wrong version of Python being executed

2007-11-10 Thread Kent Johnson
Tony Cappellini wrote: > When I run this python script, the following exception is thrown, > implying that it is being executed with Python 2.3 > So I've added this print statement to the main function, which shows > the logging module is being imported from the Python 2.3 directory > > print"\nlo

[Tutor] Wrong version of Python being executed

2007-11-10 Thread Tony Cappellini
I've got Python 2.3, 2.4 and 2.5 installed on a Windows XP machine.. I currently have Python 2.5 in my path, and there are no other versions of Python in the path. I'm trying to run a program which expects Python 2.4 or later to be installed, because there is a call to logging.BasicConfig(arg1, a

Re: [Tutor] *args, **kargs as arguments

2007-11-10 Thread O.R.Senthil Kumaran
> > > class Derived(BaseClass): > > def __init__(self, *args, **kargs): > > BaseClass.__init__(self, *args, **kargs) > > > > - *args, **kargs passes a tuple and a dictionary to the BaseClass > > constructor. > > > > My assumption is the BaseClass will always have a constr

Re: [Tutor] Calling a function within a function within a class...

2007-11-10 Thread Alan Gauld
"Trey Keown" <[EMAIL PROTECTED]> wrote > I'm creating a module for my program, and I need to call a function. > Here's how it's set up: > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > class DoStuff: >def Thing1(self): >def ThingToCall(self): >print "It worke