Profile cover photo
Profile photo
Krzysztof Rosiński
57 followers
57 followers
About
Posts

Post has attachment
Possible I/O Errors while starting a new process from a daemon script (Popen)
I recently had a problem with one of my document processing application crashing after trying to revive malfunctioned workers, with an: OSError: [Errno 5] Input/output error After identifying the problem I logged in to server via SSH, restarted the service ...
Add a comment...

Post has attachment

Post has attachment

Post has attachment
Add a comment...

Post has attachment
Python list, set and dict comprehentions 2.7+
Python supports list comprehension since v2.0. These expressions truly revolutionized python, making various functions much simpler and more readable. Let's see some basic LC in action: >>> [x for x in "test"] ['t', 'e', 's', 't'] Now often there is a need ...
Add a comment...

Post has attachment
Preventing python from generating *pyc files on runtime
Whenever You import a module, CPython compiles it to byte code, and saves it using the same path and filename, except for a *.pyc extension (valid for python 2.X). A python script converted to byte code does not run any faster , the only advantage is that p...
Add a comment...

Post has attachment
Preventing python from generating *pyc files on runtime
Whenever You import a module, CPython compiles it to byte code, and saves it using the same path and filename, except for a *.pyc extension (valid for python 2.X). A python script converted to byte code does not run any faster , the only advantage is that p...
Add a comment...

Post has attachment
Add a comment...

Post has attachment
A few words on boolean casting/mapping in python
So I thought I'd write a few words about truth value testing in python. It's quite common to if some_object conditionals, and I believe that programmers are not always aware of what actually happens when such a line is being evaluated, and tend to perceive ...
Add a comment...

Post has attachment
Wait while more posts are being loaded