
Ubuntu Python: raise an exception, import 190 modules - niyazpk
http://rhodesmill.org/brandon/2010/ubuntu-exception-190-modules/
======
ajross
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.

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

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

~~~
gjm11
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.

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

~~~
prodigal_erik
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.

------
ConceptDog
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.

~~~
mey
Ubuntu also inherits Debian's wonky RubyGems approach.

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

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

