TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Command Line Hack: Locate the Source for any Python Module

10 点作者 mahipal大约 15 年前

3 条评论

fs111大约 15 年前
<a href="http://www.vim.org/scripts/script.php?script_id=910" rel="nofollow">http://www.vim.org/scripts/script.php?script_id=910</a>
jbert大约 15 年前
Or for any scripting language, use you can use strace.<p>e.g. to find CGI.pm in perl:<p>$ strace -e open perl -MCGI -e exit 2&#62;&#38;1 &#62; /dev/null | grep CGI.pm | sed -e 's/",.<i>$//' -e 's/^.</i>"//'<p>/usr/share/perl/5.10/CGI.pm<p>Linux specific (use 'truss' on Solaris). I don't think OSX had strace like this last time I looked, but I assume dtrace could do a similar job if there isn't a more specific tool?<p>[Edit - there are literal asterisk chars in the above after the '.' chars in the regex, but I can't see a way to include them in a HN post (backslash escaping or HTML entities don't work)?]
评论 #1288433 未加载
danohuiginn大约 15 年前
eggs won't work with this. Then again, eggs won't work with _anything_
评论 #1288627 未加载