First page Back Continue Last page Overview Graphics

Pointers

%module pointers

FILE *fopen(const char *filename,

const char *mode);

int fputs(const char *, FILE *);

int fclose(FILE *);

Using the pointers module:

>>> import pointers

>>> fh = pointers.fopen("Blabla.txt", "w")

>>> pointers.fputs("This text will be written to file", fh)

1

>>> pointers.fclose(fh)

0

>>>

Let's check the content of „Blabla.txt“:

$ more Blabla.txt

This text will be written to file