X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fpython%2FREADME.txt;h=4dc517170c21d3bbce5127bd7285554e9fe590f6;hp=a6706e1329ad3b780466ac657f9f0cec3853d708;hb=41a39f326b4b732a36310275c0f4489c07117679;hpb=a6f6a1bb6ff2b876047173be7cec28a1e1faaaa4 diff --git a/direct/python/README.txt b/direct/python/README.txt index a6706e1..4dc5171 100644 --- a/direct/python/README.txt +++ b/direct/python/README.txt @@ -15,13 +15,10 @@ $ python 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") - ->>> 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