The best and simplest tools to create a basic WebSocket application with Flash fallback and Python on the server side

Currently, I am playing around with WebSockets. This is due to an application idea I have in my mind which requires a bidirectional connection between browser and server with low latency. The communication will happen in a stream-like fashion at low bandwidth. Real network sockets using TCP/UDP are often the desired optimum for things like [...]

Reading files in C++ using ifstream: dealing correctly with badbit, failbit, eofbit, and perror()

Because of this POV-Ray issue, I wanted to figure out what is the most secure and stable way to read a file line by line in C++ using a std::ifstream in combination with std::getline(). Furthermore, it was the aim to provide as precise error messages as possible. It turned out that dealing with the error [...]

PyMOL: Remove hydrogens and water

It took me much too long to find a proper solution while searching for “pymol remove hydrogens” and “pymol remove water“. It’s pretty easy…

[...]

Flash socket policy server in Python based on gevent

Currently, I am looking into gevent — a nicely performing networking library for Python, based on the brilliant idea of greenlets. I try to use this for WebSocket communication with browsers. As of today, WebSockets are still not available or disabled in some browsers. That’s why there are Javascript implementations like web-socket-js providing a transparent [...]

Compile grace with PDF support (via pdflib)

If you build (xm)grace without the presence of libpdf, you won’t be able to save figures as PDF files. I compiled both — libpdf and grace — as non-privileged user:

[...]

Rename an object in PyMOL

Long time ago since my last blog post… maybe I should just write the small things down. For my PhD, I’m currently working with PyMOL and was wondering how to rename an object there. So I googled searched for “pymol rename object” and did not find the proper solution on the first page. But there [...]