Re: [Tutor] Python command calls the wrong version!

2010-09-07 Thread Evert Rol
> Dear Python Tutors, > > I am new to Python, having perviously used IDL for all my scripts. I was > hoping to use Python and so I have just downloaded and installed version 2.6 > using the mac installer. That all went fine. > > I then opened up X11, all fine. > > Then I typed in >python > >

Re: [Tutor] Multiple versions of python and paths problems

2010-09-07 Thread Alan Gauld
"Dominique" wrote How do you start IDLE? Is it via a desktop or start menu shortcut? If so what is the startin folder specified as? You omitted to answer the bit about the startin folder. You will see this if you open the shortcut properties. The error is when launching the app which needs

Re: [Tutor] Code review, plase

2010-09-07 Thread Steven D'Aprano
On Wed, 8 Sep 2010 06:39:27 am Alex wrote: > Hi all. > > Could someone review my code? It's the first time I develop a > reusable module and I would like to have some feedback. > If you think it's good enough I will package it for pypi. > > I put the code on pastebin: http://pastebin.com/Tz367gAM

[Tutor] Python command calls the wrong version!

2010-09-07 Thread Quinton Goddard
Dear Python Tutors, I am new to Python, having perviously used IDL for all my scripts. I was hoping to use Python and so I have just downloaded and installed version 2.6 using the mac installer. That all went fine. I then opened up X11, all fine. Then I typed in >python and got this message

[Tutor] Pastebin.com fork based completely on Python (Django)

2010-09-07 Thread Carlos Guerrero
I did a "pastebin.com" fork in Django (python web framework) if anyone interested on join using it or improving it, can find the code at: http://gitorious.org/aprendiendo-django/aprendiendo-django Also see it working at http://notas.canaima.softwarelibre.gob.ve/ Best Regards -- Atte: Carlos A.

Re: [Tutor] Code review, plase

2010-09-07 Thread Wayne Werner
On Tue, Sep 7, 2010 at 3:39 PM, Alex wrote: > Hi all. > > Could someone review my code? It's the first time I develop a reusable > module and I would like to have some feedback. > If you think it's good enough I will package it for pypi. > > I put the code on pastebin: http://pastebin.com/Tz367gA

[Tutor] Code review, plase

2010-09-07 Thread Alex
Hi all. Could someone review my code? It's the first time I develop a reusable module and I would like to have some feedback. If you think it's good enough I will package it for pypi. I put the code on pastebin: http://pastebin.com/Tz367gAM Thanks in advance. Alex __

Re: [Tutor] Multiple versions of python and paths problems

2010-09-07 Thread Dominique
David Hutto gmail.com> writes: > > If I'm still understanding the original question, if you right click > on a file, in Windows, and it says edit with idle, then idle is the > last version of python idle you've installed. If you call python from > the command prompt then it should be the first

Re: [Tutor] Multiple versions of python and paths problems

2010-09-07 Thread David Hutto
On Tue, Sep 7, 2010 at 4:03 AM, Dominique wrote: > Alan Gauld btinternet.com> writes: > > >> How do you start IDLE? Is it via a desktop or start menu shortcut? >> If so what is the startin folder specified as? > Hello, > First, thanks to you David, Alan and Dave for your help. > > Start with shor

Re: [Tutor] refractoing and backward-compatibility

2010-09-07 Thread Steven D'Aprano
On Tue, 7 Sep 2010 08:07:11 pm Timmie wrote: > Hello, > I would like to refractor a module I write adding more functiosn and > renaming old ones. > > In order to maintain backward compatibility with old scripts that > reply on those modules, I would like to introduce alias names for the > old funct

[Tutor] refractoing and backward-compatibility

2010-09-07 Thread Timmie
Hello, I would like to refractor a module I write adding more functiosn and renaming old ones. In order to maintain backward compatibility with old scripts that reply on those modules, I would like to introduce alias names for the old functions: # refractored functions def renamed_function():

Re: [Tutor] exercise correct ??

2010-09-07 Thread Roelof Wobben
Date: Tue, 7 Sep 2010 00:52:38 -0700 From: alan.ga...@btinternet.com Subject: Re: [Tutor] exercise correct ?? To: rwob...@hotmail.com; tutor@python.org Oke, the 4 is a starting point for the index. Next problem. The begin looks like this : index_of(5, (1, 2, 4, 5, 6, 10, 5, 5)

Re: [Tutor] slicing a string

2010-09-07 Thread lists
>>> Assuming that mytext is "test", I've found that mytext[-1:-4:-1] >>> doesn't work (as I expected it to) but that mytext[::-1] does. >>> >>> While that's fine, I just wondered why mytext[-1:-4:-1] doesn't >>> work? >> >> It does work. >> But remember that slices give you the first item to one le

Re: [Tutor] slicing a string

2010-09-07 Thread Roel Schroeven
Op 2010-09-07 0:43, Alan Gauld schreef: > > "lists" wrote > >> Assuming that mytext is "test", I've found that mytext[-1:-4:-1] >> doesn't work (as I expected it to) but that mytext[::-1] does. >> >> While that's fine, I just wondered why mytext[-1:-4:-1] doesn't >> work? > > It does work. > B

Re: [Tutor] Multiple versions of python and paths problems

2010-09-07 Thread Dominique
Alan Gauld btinternet.com> writes: > How do you start IDLE? Is it via a desktop or start menu shortcut? > If so what is the startin folder specified as? Hello, First, thanks to you David, Alan and Dave for your help. Start with shortcut whose path is : "D:\Python25\python.exe" or "D:\Python25\p

Re: [Tutor] exercise correct ??

2010-09-07 Thread ALAN GAULD
Oke, the 4 is a starting point for the index. > >Next problem. > >The begin looks like this : > > index_of(5, (1, 2, 4, 5, 6, 10, 5, 5), 4) > >But in the module I get this result : > >val = 5 >seq = (1, 2, 4, 5, 6, 10, 5, 5 > >So the 4 is not avaible anymore. > Yes it is. It is the start par

Re: [Tutor] exercise correct ??

2010-09-07 Thread Roelof Wobben
Hello, Oke, the 4 is a starting point for the index. Next problem. The begin looks like this : index_of(5, (1, 2, 4, 5, 6, 10, 5, 5), 4) But in the module I get this result : val = 5 seq = (1, 2, 4, 5, 6, 10, 5, 5 So the 4 is not avaible anymore. Now I can change t