I figured out how to save an e-mail message as a text file, but I'm
not sure how to decode the encoded part as I am not sure how much I
need to include to decode it properly. Here is what a message looks
like:
Received: from INGESTOR2SQA ([10.220.83.198]) by sqaserver300 with
Microsoft SMTPSVC(6
I'm trying to figure out how to save an e-mail attachment from a POP3
mailbox. I've scoured the web, but -none- of the examples I have
found have actually worked. For instance, in this example:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/8423cad79ff21730/0d8922943a164ccf?
I did try searching, but I never found what I was looking for. This
thread has been very useful and informative. Thanks for all your
help! I was able to fix my problem. :)
--
http://mail.python.org/mailman/listinfo/python-list
I've never had any call to use floating point numbers and now that I
want to, I can't!
*** Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32
bit (Intel)] on win32. ***
>>> float (.3)
0.2
>>> foo = 0.3
>>> foo
0.2
>>>
--
http://mail.python.org/mailman/
Ignore my previous response. :p
I figured out what my problem was. I had [song].keys() when I really
meant song.keys() and really needed str(song.keys()). I just got a
little too bracket happy. :p
--
http://mail.python.org/mailman/listinfo/python-list
> You are converting the dictionary to a list on this line, and lists do
> not have keys> rpt_file.writelines('\t' +
> [song].keys() \
>
How am I converting it to a list?
> Note the first line has braces, not brackets so it is a
> dictionary.
Braces? What 1st line
;C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp
\pythonlib\dbgp\client.py", line 520, in __init__
exec code in globals, locals
File "", line 0, in
TypeError: 'str' object is not callable
song
{"I Don't Wanna Stop": 1}
song.keys()
["I Don't Wanna Stop"]
For the complete script and data file, go to
http://members.dslextreme.com/users/robinsiebler/python/
--
http://mail.python.org/mailman/listinfo/python-list
I have a data structure that looks like this:
dates = {}; last_song = [] #; year = {}; week = {}; date = {};
artist = []; song = {}
#dates = {'2007': {'25': {'06/23/07': {'aerosmith': [{'sweet
emotion': 1}, {'dream on': 2}],
# 'Metallica': [{'Fade t
I can't figure out -what- is going wrong here. When the code reaches
the 'return' line, there is data to be returned, but when it exits out
to the calling function, 'None' is returned!
import mx.DateTime
def get_weeks(weeks, year, dates, date_list={}):
if dates.has_key(year):
date_li
I had nothing better to do, so I thought I would make a database that
contained the songs played on the internet radio station I listen to
(hardradio.com) so I could see how many differents songs/artists they
played. I stored the data like this:
dates = {} #; year = {}; week = {}; date = {};
The other thing I failed to mention is that I need to ensure that I
find the fsType *before* I find the next FontName.
--
http://mail.python.org/mailman/listinfo/python-list
> You omit what you want to do with the results when you find
> them...or what should happen when they both appear on the same
> line (though you hint that they're a couple lines apart, you
> don't define this as a "this is always the case" sort of scenario)
I don't do anything, per se. I just n
I have a batch of files that I am trying to search for specific text in
a specific format. Each file contains several items I want to search
for.
Here is a snippet from the file:
...
/FontName /ACaslonPro-Semibold def
/FontInfo 7 dict dup begin
/Notice (Copyright 2000 Adobe Systems Incorporated.
Try 4NT (http://www.jpsoft.com). It is like cmd on steroids. I've
been using it for years and it is the *only* thing that makes powerful
batch files possible on Windows. It has a slew of features, including
batch file debugging.
--
http://mail.python.org/mailman/listinfo/python-list
14 matches
Mail list logo