On Dec 10, 7:55 pm, Lie Ryan lie.1...@gmail.com wrote:
and, is there any reason why you're not using the email and
smtplib?http://docs.python.org/library/email-examples.html
Mainly because I was unaware of them :(
I just read about them and I found all the Subject, From, To classes,
but what
On Dec 10, 7:55 pm, Lie Ryan lie.1...@gmail.com wrote:
and, is there any reason why you're not using the email and
smtplib?http://docs.python.org/library/email-examples.html
Mainly because I was unaware of them :(
I just read about them and I found all the Subject, From, To classes,
but what
On 12/11/2009 8:43 PM, João wrote:
On Dec 10, 7:55 pm, Lie Ryanlie.1...@gmail.com wrote:
and, is there any reason why you're not using the email and
smtplib?http://docs.python.org/library/email-examples.html
Mainly because I was unaware of them :(
I just read about them and I found all
Lie Ryan wrote:
You can set MIME type and encoding from the MIME constructor
email.mime.Text.MIMEText(bBold Text/b, html, utf-8)
are you importing import mime or import email.mime or import
email.MIMEMultipart?
Hi Lie.
I was importing as,
'from email.mime.text import MIMEText' which was
Thanks for the output.
akean, I've installed ipython and I'm exploring it. Thanks.
Terry,
from what I've read stringIO allows us to store strings in a 'virtual'
file.
Can you please write just 2 lines exemplifying a write to and a read
from an OS level file?
MRAB, that 'mail' object should've
Thanks for the output.
akean, I've installed ipython and I'm exploring it. Thanks.
Terry,
from what I've read stringIO allows us to store strings in a 'virtual'
file.
Can you please write just 2 lines exemplifying a write to and a read
from an OS level file?
MRAB, that 'mail' object should've
On 12/10/2009 11:17 PM, João wrote:
Thanks for the output.
akean, I've installed ipython and I'm exploring it. Thanks.
Terry,
from what I've read stringIO allows us to store strings in a 'virtual'
file.
Can you please write just 2 lines exemplifying a write to and a read
from an OS level file?
I apologize for my newbiness but I'm banging my head making this work :
(
What change must I made for the tag enforcement being reflected to the
'mail' file? Am I using the WritableObject class correctly?
(I'm getting a blank 'mail' file after running the .py script)
How can I see the output run
João wrote:
I apologize for my newbiness but I'm banging my head making this work :
(
What change must I made for the tag enforcement being reflected to the
'mail' file? Am I using the WritableObject class correctly?
(I'm getting a blank 'mail' file after running the .py script)
How can I see
João wrote:
I apologize for my newbiness but I'm banging my head making this work :
(
What change must I made for the tag enforcement being reflected to the
'mail' file? Am I using the WritableObject class correctly?
(I'm getting a blank 'mail' file after running the .py script)
How can I see
On Dec 10, 3:59 am, João joao...@gmail.com wrote:
I apologize for my newbiness but I'm banging my head making this work :
(
...
How can I see the output run in debug mode like in perl?
One method: install ipython (another python shell, but with some
useful extra features)
and then run the
On Mon, 8 Dec 2008 at 16:51, Robert Kern wrote:
Robocop wrote:
Wow! Thanks for all the input, it looks like that textwrapper will
work great for my needs. And thanks for the regex help everyone.
Also, i was thinking of using a list, but i haven't used them much in
python. Is there
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50 characters, and does not parse text in the middle of
words (but ultimately
Robocop wrote:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50 characters, and does not parse text in the middle
On Dec 8, 12:13 pm, Robocop [EMAIL PROTECTED] wrote:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50 characters, and does
On Mon, 08 Dec 2008 13:42:00 -0500, r0g wrote:
Robocop wrote:
However i'm having several problems. I know that playskool regular
expression i wrote above will only parse every 50 characters, and will
blindly cut words in half if the parsed string doesn't end with a
whitespace. I'm
:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50 characters, and does not parse text in the middle of
words (but ultimately
2008/12/8 Robocop [EMAIL PROTECTED]:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50 characters, and does not parse text
Paul McGuire wrote:
On Dec 8, 12:13 pm, Robocop [EMAIL PROTECTED] wrote:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50
Vlastimil Brom wrote:
2008/12/8 Robocop [EMAIL PROTECTED]:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for someone more versed in python and Regexes.
I need to write a simple script that parses some arbitrarily long
string every 50 characters
Wow! Thanks for all the input, it looks like that textwrapper will
work great for my needs. And thanks for the regex help everyone.
Also, i was thinking of using a list, but i haven't used them much in
python. Is there anything in python that is equivalent to pushback in
c++ for vectors? As in,
Robocop wrote:
Wow! Thanks for all the input, it looks like that textwrapper will
work great for my needs. And thanks for the regex help everyone.
Also, i was thinking of using a list, but i haven't used them much in
python. Is there anything in python that is equivalent to pushback in
c++
Hello,
I have a simple script to parse a text file (a visual basic program)
and convert key parts to tcl. Since I am only working on specific
sections and I need it quick, I decided not to learn/try a full blown
parsing module. My simple script works well until it runs into
functions that
Jacob Rael wrote:
Hello,
I have a simple script to parse a text file (a visual basic program)
and convert key parts to tcl. Since I am only working on specific
sections and I need it quick, I decided not to learn/try a full blown
parsing module. My simple script works well until it runs
Jacob Rael wrote:
[...]
I would line to identify if a line continues (if line.endswith('_'))
and concate with the next line:
line = line + nextLine
How can I get the next line when I am in a for loop using readlines?
Don't use readlines.
# NOT TESTED
program = open(fileName)
Jacob Rael wrote:
Hello,
I have a simple script to parse a text file (a visual basic program)
and convert key parts to tcl. Since I am only working on specific
sections and I need it quick, I decided not to learn/try a full blown
parsing module. My simple script works well until it runs into
John Machin wrote:
Jacob Rael wrote:
Hello,
I have a simple script to parse a text file (a visual basic program)
and convert key parts to tcl. Since I am only working on specific
sections and I need it quick, I decided not to learn/try a full blown
parsing module. My simple script works
Tim Hochberg wrote:
[snip]
I agree that mixing the line assembly and parsing is probably a mistake
although using next explicitly is fine as long as your careful with it.
For instance, I would be wary to use the mixed for-loop, next strategy
that some of the previous posts suggested. Here's a
Thanks all. I think I'll follow the don't do that advice.
jr
Jacob Rael wrote:
Hello,
I have a simple script to parse a text file (a visual basic program)
and convert key parts to tcl. Since I am only working on specific
sections and I need it quick, I decided not to learn/try a full blown
Andy wrote:
Hi guys,
I'm writing a program with a feature of accepting user input as command
text and parsing it to correct function calls...example:
5 minutes later/5 min later/5 minute later/after 5 minutes...
are being parsed as the same rule so the system will call a later
function
as parameter.
Of course there are many other possiblilities, seconds/days, and
even every(each) hour/every Monday/every two days...so on...
The datetime computation can be done with the wonderful dateutil
package, but I'm not sure with the command text parsing part. I could
do a lot of regular
Anybody have an idea on this??
Does Natural Language Processing help in this case?
--
http://mail.python.org/mailman/listinfo/python-list
Hello everybody.
Inspired by an example from the book Beginning Python: From Novice to
Professional, I started working on a simple text parser which I can
hopefully then extend into a more comprehensive system. I've got a
little problem, though.
My code:
test.py
import sys
In [EMAIL PROTECTED], Michiel Sikma
wrote:
My code:
test.py
import sys
def preparse(file):
block = []
for line in file:
if line.strip():
block.append(line)
elif block:
yield
34 matches
Mail list logo