Re: Variable + String Format

2009-02-10 Thread Joel Ross
Joel Ross wrote: Hi all, I have this piece of code: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print line + '.co

Re: Variable + String Format

2009-02-10 Thread Joel Ross
Steven D'Aprano wrote: On Wed, 11 Feb 2009 18:52:40 +1100, Joel Ross wrote: Thanks for the quick response guys. Help me out a alot. I'm a newbie to python and your replies help me understand a bit more about python!! Joel, unless you have Guido's time machine and are actually posting from th

Re: Variable + String Format

2009-02-10 Thread Steven D'Aprano
On Wed, 11 Feb 2009 18:52:40 +1100, Joel Ross wrote: > Thanks for the quick response guys. Help me out a alot. I'm a newbie to > python and your replies help me understand a bit more about python!! Joel, unless you have Guido's time machine and are actually posting from the future, the clock, or

Re: Variable + String Format

2009-02-09 Thread Joel Ross
Joel Ross wrote: Hi all, I have this piece of code: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print line + '.co

Re: Variable + String Format

2009-02-09 Thread Gabriel Genellina
En Tue, 10 Feb 2009 08:03:06 -0200, Joel Ross escribió: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print lin

Re: Variable + String Format

2009-02-09 Thread Gabriel Genellina
En Tue, 10 Feb 2009 08:03:06 -0200, Joel Ross escribió: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print lin

Re: Variable + String Format

2009-02-09 Thread John Machin
On Feb 9, 9:13 pm, Chris Rebert wrote: > On Tue, Feb 10, 2009 at 2:03 AM, Joel Ross wrote: > > Hi all, > > > I have this piece of code: > > # > > > wordList = "/tmp/Wordlist" > > file = open(wordList, 'r+b') > > Why are you o

Re: Variable + String Format

2009-02-09 Thread Chris Rebert
On Tue, Feb 10, 2009 at 2:03 AM, Joel Ross wrote: > Hi all, > > I have this piece of code: > # > > wordList = "/tmp/Wordlist" > file = open(wordList, 'r+b') Why are you opening the file in binary mode? It's content is text!