Changeset 110:91f4f018db82
- Timestamp:
- 17/12/09 12:16:29 (2 years ago)
- Author:
- Menno Smits <menno@…>
- Branch:
- default
- Parents:
- 109:bfb2aabc0b11 (diff), 89:2055309341f1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
- Message:
-
Merged license change from trunk
- Location:
- imapclient
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r103
|
r110
|
|
| 1 | | __version__ = '0.5' |
| | 1 | __version__ = '0.5.1' |
| 2 | 2 | __author__ = 'Menno Smits <menno@freshfoo.com>' |
| 3 | 3 | |
-
|
r88
|
r110
|
|
| 3 | 3 | |
| 4 | 4 | from imapclient import * |
| | 5 | from response_parser import * |
| 5 | 6 | |
| 6 | 7 | |
-
|
r105
|
r110
|
|
| 1 | | # This program is free software; you can redistribute it and/or modify |
| 2 | | # it under the terms of the GNU General Public License as published by |
| 3 | | # the Free Software Foundation; either version 2 of the License, or |
| 4 | | # (at your option) any later version. |
| 5 | | # |
| 6 | | # This program is distributed in the hope that it will be useful, |
| 7 | | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 8 | | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 9 | | # GNU Library General Public License for more details. |
| 10 | | # |
| 11 | | # You should have received a copy of the GNU General Public License |
| 12 | | # along with this program; if not, write to the Free Software |
| 13 | | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 14 | | |
| 15 | | # Copyright 2009 Menno Smits |
| | 1 | # Copyright (c) 2009, Menno Smits |
| | 2 | # Released subject to the New BSD License |
| | 3 | # Please see http://en.wikipedia.org/wiki/BSD_licenses |
| 16 | 4 | |
| 17 | 5 | import re |
-
|
r87
|
r110
|
|
| 437 | 437 | |
| 438 | 438 | |
| | 439 | def altfetch(self, messages, parts): |
| | 440 | if not messages: |
| | 441 | return {} |
| | 442 | |
| | 443 | msg_list = messages_to_str(messages) |
| | 444 | parts_list = seq_to_parenlist([p.upper() for p in parts]) |
| | 445 | |
| | 446 | if self.use_uid: |
| | 447 | tag = self._imap._command('UID', 'FETCH', msg_list, parts_list) |
| | 448 | else: |
| | 449 | tag = self._imap._command('FETCH', msg_list, parts_list) |
| | 450 | |
| | 451 | print tag |
| | 452 | lines = [] |
| | 453 | while True: |
| | 454 | line = self._imap._get_line() |
| | 455 | if line.startswith(tag): |
| | 456 | break |
| | 457 | lines.append(line) |
| | 458 | return lines |
| | 459 | |
| | 460 | #self._checkok('fetch', typ, data) |
| | 461 | |
| | 462 | #parser = FetchParser() |
| | 463 | #return parser(data) |
| | 464 | |
| | 465 | |
| 439 | 466 | def append(self, folder, msg, flags=(), msg_time=None): |
| 440 | 467 | '''Append a message to a folder |
| … |
… |
|
| 801 | 828 | if not dt.tzinfo: |
| 802 | 829 | dt = dt.replace(tzinfo=FixedOffset.for_system()) |
| 803 | | |
| 804 | 830 | return dt.strftime("%d-%b-%Y %H:%M:%S %z") |
| 805 | | |
| 806 | | |
| | 831 | |
| | 832 | |
-
|
r108
|
r110
|
|
| | 1 | # Copyright (c) 2009, Menno Smits |
| | 2 | # Released subject to the New BSD License |
| | 3 | # Please see http://en.wikipedia.org/wiki/BSD_licenses |
| | 4 | |
| 1 | 5 | import sys |
| 2 | 6 | import glob |
-
|
r87
|
r110
|
|
| 26 | 26 | def run_suite(): |
| 27 | 27 | suite = load_suite() |
| 28 | | runner = unittest.TextTestRunner(verbosity=1) |
| | 28 | runner = unittest.TextTestRunner(verbosity=2) |
| 29 | 29 | runner.run(suite) |
| 30 | 30 | |