Hacker News new | past | comments | ask | show | jobs | submit login
Ubuntu Python: raise an exception, import 190 modules (rhodesmill.org)
62 points by niyazpk on Feb 26, 2010 | hide | past | favorite | 9 comments



This is a misdiagnosis. The fancy handling is invoked only when the exception reaches the top level (i.e. when the python interpreter is about to exit anyway). It is not done when an exception is raised, and adds no overhead to code that uses exceptions at runtime.

Think of it as similar to the bash handler that searches for known executable names on failed commands and prompts you for an apt-get line to install the software. It takes significant time, but only runs on error.


Very useful. I was trying to freeze a Python module the other day and this exact madness happened. Now it makes sense.


This affects the exception that causes the program to exit only. It does not affect exceptions caught and handled.


Not quite. Indeed it doesn't affect exceptions that are caught and handled; but in interactive Python use it affects exceptions that reach the toplevel (producing a traceback message) even though that doesn't make Python exit.


Yeah but in interactive Python, 60ms is not a long time.


I'd be cranky if I were signed in to troubleshoot a busy production server and accidentally opened two hundred files because of one typo. Especially if it's uncommon stuff that probably isn't in the buffer cache.


I love Ubuntu, particularly the package management, but the magical stuff they do in packages is extremely frustrating.

The base PHP module includes suhosin, while there's also a suhosin module which just places the configuration file, that should be there by default.

Suhosin can cause apps to run amock if you're dealing with large arrays or big posts. It's a nice to have feature, but it's also a feature that needs to be disclosed to a developer before trying to develop against it.

Anything that modifies the behavior of the base language needs to be explicitly called out when the package is installed.


Ubuntu also inherits Debian's wonky RubyGems approach.

http://pkg-ruby-extras.alioth.debian.org/rubygems.html


Hmm. Using iPython ot bpython causes the modules to be 200+ from the start.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: