Skip to content

Commit b317e9b

Browse files
committed
Work on 0.1.0 begins.
* Split the data models into pymtp/models.py and began work on the wrappers.
1 parent 2fdc8ab commit b317e9b

File tree

6 files changed

+430
-1
lines changed

6 files changed

+430
-1
lines changed

TODO

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Major Targets:
2+
* Improve documentation
3+
* Rewrite error handling code
4+
* Add data type abstraction
5+
* Clean up PyMTP to PEP8 specs (Maybe 10/10 on Pylint?)
6+
* Move API around to be more consistent with upstream
7+
* Add multi-device support
8+
* Add support for LibMTP 0.3.x's Album support
9+
* Remove depreciated functions
10+
* Add remaining functions from LibMTP that are not available in PyMTP.
11+
* Split up sections of code
12+
* Update examples to new API
13+
* Add documentation to nick125.com
14+
15+
16+
Specific Targets:
17+
* Add __enter__ and __exit__ functions to support the with keyword (with blah as f: do blah with f)
18+
* Syncronize structs and other constant data models to LibMTP 0.3.x
19+
* Move the giant if/elif chain in find_filetype somewhere else
20+
* Fix mtpshell to use the code module instead of our ugly exec loop

pymtp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: iso-8859-1 -*-
33
#
4-
# A Ctypes wrapper to LibMTP
4+
# PyMTP
55
# Developed by: Nick Devito (nick@nick125.com)
66
# (c) 2008 Nick Devito
77
# Released under the GPLv3 or later.

pymtp/__init__.py

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python
2+
# -*- coding: iso-8859-1 -*-
3+
#
4+
# PyMTP
5+
# Developed by: Nick Devito (nick@nick125.com)
6+
# (c) 2008 Nick Devito
7+
# Released under the GPLv3 or later.
8+
#
9+
10+
"""
11+
PyMTP is a pythonic wrapper around libmtp, making it a bit more
12+
friendly to use in python
13+
14+
Example Usage (or see examples/):
15+
>>> import pymtp
16+
>>> mtp = pymtp.MTP()
17+
>>> mtp.connect()
18+
PTP: Opening session
19+
>>> print mtp.get_devicename()
20+
Device name
21+
>>> mtp.disconnect()
22+
PTP: Closing session
23+
>>>
24+
"""
25+
26+
__VERSION__ = "0.1.0"
27+
__VERSION_MACRO__ = 0
28+
__VERSION_MINOR__ = 1
29+
__VERSION_MAJOR__ = 0
30+
__VERSION_TUPLE__ = (__VERSION_MAJOR__, __VERSION_MINOR__, __VERSION_MACRO__)
31+
__AUTHOR__ = "Nick Devito (nick@nick125.com)"
32+
__LICENSE__ = "GPL-3"
33+

pymtp/exceptions.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python
2+
# -*- coding: iso-8859-1 -*-
3+
#
4+
# PyMTP
5+
# Developed by: Nick Devito (nick@nick125.com)
6+
# (c) 2008 Nick Devito
7+
# Released under the GPLv3 or later.
8+
#

pymtp/main.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python
2+
# -*- coding: iso-8859-1 -*-
3+
#
4+
# PyMTP
5+
# Developed by: Nick Devito (nick@nick125.com)
6+
# (c) 2008 Nick Devito
7+
# Released under the GPLv3 or later.
8+
#

0 commit comments

Comments
 (0)