Mercurial > yaffs-ecoscentric
diff direct/python/README.txt @ 320:e239e0b8c57d
Full change over to ctypes
| author | charles |
|---|---|
| date | Tue, 13 Oct 2009 00:05:49 +0100 |
| parents | 3ef58b114b5e |
| children |
line wrap: on
line diff
--- a/direct/python/README.txt +++ b/direct/python/README.txt @@ -15,13 +15,10 @@ Build libyaffsfs.so with the accompanyin Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. ->>> from ctypes import * ->>> cdll.LoadLibrary("./libyaffsfs.so") -<CDLL './libyaffsfs.so', handle 9ed4178 at b7d418ac> ->>> y = CDLL("./libyaffsfs.so") ->>> y.yaffs_StartUp() +>>> from yaffsfs import * +>>> yaffs_StartUp() 0 ->>> y.yaffs_mount("/yaffs2") +>>> yaffs_mount("/yaffs2") yaffs: Mounting /yaffs2 yaffs: yaffs_GutsInitialise() yaffs_ScanBackwards starts intstartblk 1 intendblk 256... @@ -45,18 +42,16 @@ Dead 0 blocks yaffs: yaffs_GutsInitialise() done. 0 ->>> y.yaffs_open("/yaffs2/xx",66,0666) +>>> yaffs_open("/yaffs2/xx",66,0666) yaffs: Tnodes added Allocated block 1, seq 4097, 255 left 0 ->>> y.yaffs_write(0,"abc",3) -3 ->>> y.yaffs_lseek(0,0,0) -0 +>>> yaffs_write(0,"abcdefg",5) +5 >>> b = create_string_buffer("",100) ->>> y.yaffs_read(0,b,100) -3 ->>> b.value -'abc' ->>> - +>>> yaffs_lseek(0,0,0) +0 +>>> yaffs_read(0,b,100) +5 +>>> print b.value +abcde
