#python - Fri 11 May 2007 between 00:00 and 00:13

NY Lost Funds



vIkSiTbtw - context here - i'm doing a date parsing system..
so i have text of the form 2000-12-23 which i need to match
jenocinhow do you skip the first line when reading in a text file? possibly seek?
vIkSiTJerub, i didn't quite follow how you'd use the int(n) < 30?
CSWookievIkSiT: Good luck. You're better off offering your users a choice of dates, and not letting them type.
users can't be trusted to type.
Dtu3ZOhtlnurllib2 asks for a "redirect_dict" attribute on request objects when redirecting. yet, request objects don't have a "redirect_dict" and raise when asked for one. why is this, and how do i get redirects to follow?
vIkSiTCSWookie, :)
CSWookievIkSiT: That wasn't a joke.
vIkSiTthe issue is, that i'm *Extracting* information from free form text..
CSWookie, and i didn't take it as one..
insinis not None vs. != None - interchangeable?
vIkSiTCSWookie, so you see, i ca't see another way to go through free form text without the use of regexps.
and a lot of statistics, whcih i can build if i can figure out how to do this number business
ivazquezinsin: There's only one None in Python.
CSWookievIkSiT: pyparsing
vIkSiTah
thanks for the heads up, CSWookie ..
perhaps i can see how they did it.
Blackhawk5193Hmm.
CSWookieinsin: ivazquez: THERE CAN BE ONLY ONE (None)!
actionCSWookie is struck by lighting from his katana sword
CSWookieis struck by lighting from his katana sword
vIkSiT: It's a parser building library.
vIkSiTCSWookie, ah yes, it looks interesting..
mgorbach_mbpcan someone clear up for me the syntax for replace %s in strings with variables?
i.e. print "Error in name %s", name
I'm trying to do this with multiple tokens and getting syntax issues
ivazquez%
% (a, b)
CSWookiemgorbach_mbp: "Error in name %s" % name
mgorbach_mbp: "Error in name %s, %s" % (name, name2)
mgorbach_mbpI'm trying to do this with multiple tokens and getting syntax issues
bah ... sorry. (a,b) seems to be working. thanks ivazquez
CSWookiemgorbach_mbp: "Error in name %{foo}, %{bar}" % {'foo':"blah", 'bar':"fred"} #I think
ivazquezThe second parameter *should* be a tuple, but you can get away without if there's only one.
Or a dict as the case may be.
Blackhawk5193I can use a for loop to convert the values of a dictionary to a list right?
ivazquezJust use one of the methods.
CSWookieBlackhawk5193: or you can say d.values()
Blackhawk5193: Read a tutorial.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 

IrcArchive

NY Lost Funds