On Feb 9, 2009, at 18:45, Tyler Brough wrote: > Hello All, > > I am new to Cython, though I heard about it long ago. I have been > programming in python using scipy and pytables a lot. I am building > an HDF5 database using pytables from extremely large files > containing tick by tick stock data (one single day is several GBs). > As you can imagine this is very slow going, even trying to optimize > the file io in python. What I am wondering is will trying to do the > file io in cython functions speed up the process enough to make it > worth while? Can I simply access c FILE pointers directly in cython > and pass them back as python objects? Your advice is very much > appreciated!
I'm doing this sort of thing. I use file descriptors in my interactions between C and Python, as they are simply ints, and both C and Python have functions for using them (e.g., I use os.close() in Python to close a file based on a file descriptor, etc.). (But, as someone else mentioned, there are already useful wrappers for HDF5 in Python that might be worth checking out.) -- Magnus Lie Hetland http://hetland.org _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
