Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Lisi
On Thursday 07 July 2011 00:48:24 Alan Gauld wrote: > "Lisi" wrote > > >> : File "ex26.py", line 10 > >> : def print_first_word(words) > >> : ^ > >> : SyntaxError: invalid syntax > >> : lisi@Tux:~/Python/LearnPythonTheHardWay$ > >> > >> Look at the error.

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Walter Prins
Hi Lisi On 7 July 2011 08:52, Lisi wrote: > > > You could obviously see something wrong > > > > The posted error report had no colon. > > Yes - but the script had one, which was why I included the actual script in > my > original post. I seem to have cut too much in this email! > The error mes

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Lisi
On Thursday 07 July 2011 10:21:59 Walter Prins wrote: > Hi Lisi > > On 7 July 2011 08:52, Lisi wrote: > > > > You could obviously see something wrong > > > > > > The posted error report had no colon. > > > > Yes - but the script had one, which was why I included the actual script > > in my > > ori

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Marc Tompkins
On Thu, Jul 7, 2011 at 3:15 AM, Lisi wrote: > There must have been > something, but I cannot fathom what. What difference does inserting a space > and then deleting it make? > I wonder whether you might have had a stray non-printing character in there? I believe that that would explain the

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Lisi
On Thursday 07 July 2011 11:46:01 Marc Tompkins wrote: > On Thu, Jul 7, 2011 at 3:15 AM, Lisi wrote: > > There must have been > > something, but I cannot fathom what. What difference does inserting a > space > > > and then deleting it make? > > I wonder whether you might have had a stray non-

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Lisi
On Thursday 07 July 2011 10:21:59 Walter Prins wrote: >  Do you maybe > have several copies of the script lying around in different folders? I _think_ that you may have the answer here - tho' for me it raises almost as many questions as I had in the first place. The exercise I was having that i

[Tutor] Python conundrum

2011-07-07 Thread Lisi
Hi! :-) >From the book I am working from: A shortcut is to do your import like this: from ex25 import * Is this a new and wonderful meaning of the word "shortcut"? _Why_, _how_ is that a shortcut for: import ex25 when it has seven *more* characters (counting the spaces)? Or, put another

Re: [Tutor] Python conundrum

2011-07-07 Thread Здравко Иванов
if you type from ex25 import * then you don't have to put ex25. in front of the functions. On Thu, Jul 7, 2011 at 5:17 PM, Lisi wrote: > Hi! :-) > > >From the book I am working from: > > A shortcut is to do your import like this: > from ex25 import * > > Is this a new and wonderful meaning of

Re: [Tutor] Python conundrum

2011-07-07 Thread Noah Hall
On Thu, Jul 7, 2011 at 3:17 PM, Lisi wrote: > Hi! :-) > > >From the book I am working from: > > A shortcut is to do your import like this: > from ex25 import  * > > Is this a new and wonderful meaning of the word "shortcut"?  _Why_, _how_ is > that a shortcut for: > > import ex25 > > when it has

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Michael M Mason
Michael M Mason wrote on 07 July 2011 at 15:38:- > > In error, I downloaded ex26 before I had done ex25. So I left > > it and did ex25. > > > > Having finally given up on ex25, I am now doing ex26. And guess > > what?! Line 10 has a missing colon. > > > > So _how_ did a missing colon in ex26 cau

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Michael M Mason
On 07 July 2011 at 15:07 Lisi wrote: > In error, I downloaded ex26 before I had done ex25. So I left > it and did ex25. > > Having finally given up on ex25, I am now doing ex26. And guess > what?! Line 10 has a missing colon. > > So _how_ did a missing colon in ex26 cause problems in ex25

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Lisi
On Thursday 07 July 2011 15:42:12 Michael M Mason wrote: > > Maybe you've been editing ex25 and then executing ex26. That'd get you > > the same error in the same place over and over again. > > Looks like this might be it. In your earlier post the error reported is in > ex26:- > > : lisi@Tux:~/Pyth

Re: [Tutor] Python conundrum

2011-07-07 Thread Marc Tompkins
On Thu, Jul 7, 2011 at 7:30 AM, Noah Hall wrote: > On Thu, Jul 7, 2011 at 3:17 PM, Lisi wrote: > > Hi! :-) > > > > >From the book I am working from: > > > > A shortcut is to do your import like this: > > from ex25 import * > > > > Is this a new and wonderful meaning of the word "shortcut"? >

Re: [Tutor] Python conundrum

2011-07-07 Thread Alan Gauld
"Lisi" wrote A shortcut is to do your import like this: from ex25 import * Is this a new and wonderful meaning of the word "shortcut"? No, it just saves you typing ex25. in front of every name in the module. Of course, the "import *" technique is frowned upon because of the risk of in

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Prasad, Ramit
>Many years ago, in the days of the ark, when men were real men, and So men in the present day are fake men? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This communication is for informational purp

Re: [Tutor] broken script - curiouser and curiouser

2011-07-07 Thread Chris Fuller
TWO HOURS?? You aren't a Real Programmer (http://www.catb.org/jargon/html/story-of-mel.html) until you've spent a whole day debugging something trivial. Heck, I quite recently spent a day plus trying to figure out why my microcontroller project wasn't working right. I was using a command line