trentm / go-tool

Automatically exported from code.google.com/p/go-tool
Other
10 stars 8 forks source link

Support for cd'ing to the directory where given Python module/package is #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
cdp () {
  cd "$(python -c "import os.path as _, ${1}; \
    print _.dirname(_.realpath(${1}.__file__[:-1]))"
  )"
}

sridharr@whymac:~/as/pypm/trunk > cdp urllib
sridharr@whymac:/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 
> 

--

Meta-feature-request: plugins for go-tool? 

Original issue reported on code.google.com by Sridhar....@gmail.com on 3 May 2010 at 9:36