Lie Ryan wrote:
> You can set MIME type and encoding from the MIME constructor
> email.mime.Text.MIMEText("Bold Text", "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'
On 12/11/2009 8:43 PM, João wrote:
On Dec 10, 7:55 pm, Lie Ryan 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
On Dec 10, 7:55 pm, Lie Ryan 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 about Content-T
On Dec 10, 7:55 pm, Lie Ryan 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 about Content-T
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?
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 bee
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 bee
On Dec 10, 3:59 am, João 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 program inside
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 the
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 the
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 in
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 anythin
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++ for
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,
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
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
stri
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 charact
uot;""
# example: make it fit in 40 columns
print(wrap(msg,40))
# result is below
"""
Arthur: "The Lady of the Lake, her arm
"""
Robocop wrote:
I'm having a little text parsing problem that i think would be really
quick to troubleshoot for some
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 r
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
> str
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
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 ultim
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
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'
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 scri
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 run
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 straddle
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 lat
Anybody have an idea on this??
Does Natural Language Processing help in this case?
--
http://mail.python.org/mailman/listinfo/python-list
ystem will call a later
function with minutes=5 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 wond
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:
> yi
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
34 matches
Mail list logo