On 12/10/13 06:18, Jackie Canales wrote:
for line in lst.splitlines():
if word in line:
words = line
Notice that you are overwriting words each time you get a match.
So the final value of words at the end of the for loop will just be the
last line found. All earlier
On 10/12/2013 11:01 AM, Kush Goyal wrote:
[[snip]
"user = User.query.filter_by ( username = self.username.data ).first()"
now this I do not understand.
Can a object be create by using a method of a class instead of the
class consturctor? I
Without seeing the code you reference (User module) I
On 12/10/13 16:01, Kush Goyal wrote:
Hi,
I am learning web development by using flask framework. The below code
is used to create a class LoginForm which inherits from the class
Form.
In the method 'validate' of class 'LoginForm' the variable 'user' is
initialized by using:
"user = User.query.
Hi,
I am learning web development by using flask framework. The below code
is used to create a class LoginForm which inherits from the class
Form.
In the method 'validate' of class 'LoginForm' the variable 'user' is
initialized by using:
"user = User.query.filter_by ( username = self.username.da
On 12/10/2013 01:18, Jackie Canales wrote:
You're still posting in html, not text. I stripped out the markup
portion of your message, but you're still left with lots of invisible
characters in the following. Your email program is stuffing "\xa0"
characters in place of every other space, which cut
On 12/10/2013 06:18, Jackie Canales wrote:
from string import punctuation
#helper function
I'd be inclined to call this strippunc as strip is use so often.
def strip(text):
'returns text with all punctuation removed'
for symb in punctuation: #import from string
text = text
from string import punctuation
#helper function
def strip(text):
'returns text with all punctuation removed'
for symb in punctuation: #import from string
text = text.replace(symb, ' ')
return text
#helper function
def wordin(s,t):
'does word s occur in text t'