#!/usr/bin/env python
# -*-coding:utf-8-*-
""" test script """
import wx
import mmpython
import os
from mmpython import Factory
class myparser:
def __init__(self,file):
self.file=file
self.myfactory=Factory()
self.metadata=self.myfactory.create_from_filename(self.file)
print self.metadata
return None
if __name__ == '__main__':
a=myparser('/home/valera/development/wxPython.jpg')
print a
--------------------------
freefall$ ./test.py
Traceback (most recent call last):
File "./test.py", line 21, in ?
a=myparser('/home/valera/development/wxPython.jpg')
File "./test.py", line 16, in __init__
self.metadata=self.myfactory.create_from_filename(self, self.file)
File "/usr/lib/python2.4/site-packages/mmpython/synchronizedobject.py", line 39, in __call__
return self.__method(self.__obj, *args, **kwargs)
File "/usr/lib/python2.4/site-packages/mmpython/factory.py", line 196, in create_from_filename
if os.path.isdir(filename):
File "/usr/lib/python2.4/posixpath.py", line 195, in isdir
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, instance found