How to Fix Python Nose: Coverage not available: unable to import coverage module-ThrowExceptions

Exception or error: I can’t seem to get code coverage with Nose to work, despite having the plugin installed. Any ideas on how to fix this? 12:15:25 ~/sandbox/ec$ nosetests –plugins Plugin xunit Plugin deprecated Plugin skip Plugin multiprocess Plugin failuredetail Plugin capture Plugin logcapture Plugin coverage Plugin attributeselector Plugin doctest Plugin profile Plugin id Plugin …

What does Python's socket.recv() return for non-blocking sockets if no data is received until a timeout occurs?-ThrowExceptions

Exception or error: Basically, I’ve read in several places that socket.recv() will return whatever it can read, or an empty string signalling that the other side has shut down (the official docs don’t even mention what it returns when the connection is shut down… great!). This is all fine and dandy for blocking sockets, since …

python – Simple line plots using seaborn-ThrowExceptions

Exception or error: I’m trying to plot a ROC curve using seaborn (python). With matplotlib I simply use the function plot: plt.plot(one_minus_specificity, sensitivity, ‘bs–‘) where one_minus_specificity and sensitivity are two lists of paired values. Is there a simple counterparts of the plot function in seaborn? I had a look at the gallery but I didn’t …

datetime – Generate RFC 3339 timestamp in Python-ThrowExceptions

Exception or error: I’m trying to generate an RFC 3339 UTC timestamp in Python. So far I’ve been able to do the following: >>> d = datetime.datetime.now() >>> print d.isoformat(‘T’) 2011-12-18T20:46:00.392227 My problem is with setting the UTC offset. According to the docs, the classmethod datetime.now([tz]), takes an optional tz argument where tz must be …