TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ubuntu Python: raise an exception, import 190 modules

62 pointsby niyazpkover 15 years ago

5 comments

ajrossover 15 years ago
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 <i>not</i> done when an exception is raised, and adds no overhead to code that uses exceptions at runtime.<p>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.
Klimentover 15 years ago
Very useful. I was trying to freeze a Python module the other day and this exact madness happened. Now it makes sense.
Erwinover 15 years ago
This affects the exception that causes the program to exit only. It does not affect exceptions caught and handled.
评论 #1153504 未加载
ConceptDogover 15 years ago
I love Ubuntu, particularly the package management, but the magical stuff they do in packages is extremely frustrating.<p>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.<p>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.<p>Anything that modifies the behavior of the base language needs to be explicitly called out when the package is installed.
评论 #1154663 未加载
vladevover 15 years ago
Hmm. Using iPython ot bpython causes the modules to be 200+ from the start.