summaryrefslogtreecommitdiff
path: root/portato/eix/libeix.pyx
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-24 21:30:40 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-24 21:30:40 +0200
commitb8f45f026ace3df864efac5d49a62be4a0fc9eae (patch)
treeb7c198c8014f91b9d0a458beda281ab81c5fdeac /portato/eix/libeix.pyx
parent452bf1e7237e6cb1d8a697179eaee9ed3a430d52 (diff)
downloadportato-b8f45f026ace3df864efac5d49a62be4a0fc9eae.tar.gz
portato-b8f45f026ace3df864efac5d49a62be4a0fc9eae.tar.bz2
portato-b8f45f026ace3df864efac5d49a62be4a0fc9eae.zip
First eix stuff
Diffstat (limited to '')
-rw-r--r--portato/eix/libeix.pyx14
1 files changed, 14 insertions, 0 deletions
diff --git a/portato/eix/libeix.pyx b/portato/eix/libeix.pyx
new file mode 100644
index 0000000..2b3ebb0
--- /dev/null
+++ b/portato/eix/libeix.pyx
@@ -0,0 +1,14 @@
+from portato.eix.eix_utils cimport File, fopen, fclose, ffree, fget
+
+def test (f):
+ cdef File* cf
+ cdef char* buf
+
+ print "Trying to open: ", f
+ cf = fopen(f, "r")
+ try:
+ buf = fget(cf, 20)
+ print "The first two chars:", buf[0], buf[1]
+ ffree(buf)
+ finally:
+ fclose(cf)