[Tutor] flag to call methods on objects?

Dave Angel davea at ieee.org
Thu Jul 30 19:29:59 CEST 2009

prasad rao wrote:
> On 7/30/09, Dave Angel <davea at ieee.org> wrote:
>> prasad rao wrote:
>>> hello
>>>> "it is not working."  is not very descriptive.
>>> DaveA
>>    Hello!  Sorry, I forgot to mention  the problem.
> It simply wipes clean the file,resulting in empty file.
> Yes .I should compare with a string.Hope I will get it
> right with that correction.
> <snip>
That's due to another bug in the main() method.  You have an if, elif, 
but no else clause when you're checking the first line.  So if you have 
a file that does *not* begin with the magic string, it'll get 
truncated.  Probably not part of your spec.


More information about the Tutor mailing list