Skip to content

Monthly Archives: June 2006

Windows is driving me mad

I’m losing a lot of SoC time around Windows and it’s strange things. If I call _get_osfhandle passing a valid file descriptor I always get -1 (error code). Mmm… UPDATE: Tomas Heller saved me Python 2.4 uses also another DLL (msvcr71.dll) for the C Runtime (CRT) instead of msvcrt.dll so it seems _get_osfhandle is not [...]

Black Macbook

I bought the black model of the new Apple Macbook series. I wanted the white one but here in Milan it’s been days since there are NO white Macbook available in the stores so I went black plus a 5% discount and an extension of the insurance covering damages for 2.000€. Now I have to [...]

Paid Tha Cost to Be Da Boss

The title does not have anything to do with the content of the post but I really like it. It’s one the latest albums released by the rapper Snoop Dogg. Dunno if the album is cool or not Anyway… Wingware kindly gave me 3 (Linux, Windows, OSX) licenses for free of the Pro version of [...]

SoC current status

I started porting mmapmodule.c but it’s a bit a pain in the ass because POSIX’s mmap() and Win32′s CreateFileMapping() have nothing in common. I also discovered wintypes.py that will save me lot of typing Since the two memory mapping mechanisms are really different in POSIX and in Win32 I find myself switching back and forth [...]

Italian Ruby book and my chapter

Now I can tell the world about it. Marco Ceresa is going to publish a Ruby book (unnamed yet) for the Italian Ruby community. He asked me to cooperate with him and other people to join his efforts. I’m really glad to being part of this almost finished project. I was hired as a former [...]

Lock around the clock

He rocks, I lock. Today I finished the porting of fcntl module. Now I also can lockf and flock around

I like locking

Although locking is a fantastic funk/hiphop dance style I (sadly) mean file locking because I completed porting the first two functions in fcntlmodule.c: fcntl.fcntl() and fcntl.flock() I noticed while reading the flock() man page that since Linux Kernel 2.0 flock() is not anymore emulated with fcntl() so I guess it’s useless to code it that [...]

One year more

Today I turn 23 years old. I’m still young

mod is not mod

Yesterday when I was testing the wrapped time module I noticed a test failing on and on without any particular reason. So I dug in (with print(s) ) and found out an interesting thing in which Python implementation differs from ANSI C’s the mod (% and also operator.mod in Python) operator have a different behaviour [...]

Time has come

The porting of timemodule.c has been finished. I’ve to admit that ctypes is great. Must be used carefully especially under Linux (no typechecking o args checking by default) but it’s great and simple to use. The tutorial and the mailing list have everything I need to learn use it. Here’s the changelog: implemented time.strftime masked [...]