OpenSSL is a damn beast but I managed to handle it through the ctypes code generator written by Thomas Heller. This code is based upon GCCXML tool. Using the code generator is really straightforward:
rhymes@groove ~ % python2.4 h2xml.py ssl.h -o ssl.xml
It produces an XML representation of the header to feed to xml2py.py command this way:
rhymes@groove [...]
I think I’ve found the most complicated library ever.
That library is really over-engineered. I spent a whole day trying to understand _ssl.c, wrapping ssl.h and the other headers I need with ctypes codegenerator (doing it manually is insane), writing 400+ lines of initialization code, dealing with the OpenSSL man pages and so on and I [...]
mmap module is complete. We (I and I, I guess) still have a problem with special
methods. Methods like __xyz__ are not supported by the PyPy’s extension compiler so
I had to implement stuff like len(mmap_object) as mmap_object.get_len().
That’s definitely ugly and breaks the compatibility with CPython so keep attention. It also lacks support of slice() objects.
strptime() function [...]
I don’t know what to think about somebody who really likes Java because this really odd:
[code lang="java"]
int[] arr = (int []) arr.clone();
[/code]
arr is declared as a int []. VERY UGLY. That’s an hack.
Java 5 seems a bit smarter and it doesn’t require the cast.
I used Java 5 while developing but I realized it has to [...]
Filed in Uncategorized
|
Tagged java
|
time module:
– asctime() has been implemented working around the *args limitation
– strftime() has been implemented
– strptime() is there but it’s the one which breaks the compilation step.
mmap module:
– mmap creation: ok.
– close(): ok.
[...]
I just received my O’Reilly Safari-90-day-summerofcode-account!
Yay!
A brief status update:
the time module is almost finished but:
asctime() is masked because of a problem in the extension compiler to handle *args.
strftime() and strptime() are not implemented for the same reason.
the fcntl module is basically finished:
ioctl() does not support array.array() instances and buffer() instances but everything else is implemented.
the mmap module has been started [...]
I’m making progresses to feed the rctime module to the extension compiler. He doesn’t like that much tuples so fixing a couple of tupled line to lists decreased the number of translation errors. Now the translation goes fine but I’m stuck in the compiler process. ctypes doesn’t have a mechanism to explicitly tell that one [...]
My last sprint day was good but I lost a lot of time around some limitations and a bug that’s actually there (anyway unit tests pass) but I’m fighting to win, so I’ll win
I had the chance to pair with Armin Rigo itself and I think that I learned a lot from him [...]
Today I continued working on the rctime module with the supervision of Anders. I’m improving my knowledge of rpython and how the interpreter level and application level works and how to make them communicate. This is not really documented in deep so you’ve to check out examples also.
Sad, a swiss boy, joined us and started [...]