News for hackers. Stuff that matters.
Re:See(), an alternative to Python's dir() by illumen on Tuesday February 17, 2009 @07:34PM (#485210)
If you like this, you'll love ipython.

Ipython makes introspection 3.14 times more fun.

Re:See(), an alternative to Python's dir() by marcmarc on Wednesday February 18, 2009 @04:11AM (#485545)
Re:See(), an alternative to Python's dir() by timf on Tuesday February 17, 2009 @08:04PM (#485233)
ipython rocks with the tab completion, is that what you mean? This is better than ipython's ? and ??.
Re:See(), an alternative to Python's dir() by juanpablo on Tuesday February 17, 2009 @09:44PM (#485292)
I use

import readline, rlcompleter; readline.parse_and_bind("tab: complete")

(executed at PYTHONSTARTUP) for tab completion.

Re:See(), an alternative to Python's dir() by timf on Wednesday February 18, 2009 @12:51AM (#485417)
Thankyou for this, added to my portable remote node setup.
Re:See(), an alternative to Python's dir() by timf on Tuesday February 17, 2009 @07:26PM (#485201)
Installed, I like it. I do a lot of one-off Python with unfamiliar libs and that's just the thing.

Mapped it to der() ... because that just feels better, I guess.

Re:See(), an alternative to Python's dir() by mjtokelly on Tuesday February 17, 2009 @07:28PM (#485203)
"Help us out here, Computer. This just will not cut it. Blimey!"

I enjoyed their documentation style.

Re:See(), an alternative to Python's dir() by mattj on Tuesday February 17, 2009 @11:40PM (#485363)
ehh, this is just (questionable) formatting. After you use python for a while, the __methods__ should become pretty common-sensical (and seeing the actual __name__ is more useful if you're trying to reimplement protocols common objects support). That and not being able to manipulate the output of see() makes it pretty useless.

I personally like doing things like [f for f in dir(o) if 'foo' in f] etc.

Re:See(), an alternative to Python's dir() by inky on Wednesday February 18, 2009 @09:09AM (#485751)
This was only intended as an alternative, not a replacement -- dir() is still extremely useful. see() was made for quickly inspecting objects interactively, hence "for humans only".
Re:See(), an alternative to Python's dir() by abecedarius on Wednesday February 18, 2009 @03:25PM (#486218)
Nice idea. I decided I'd rather see it laid out in columns like 'ls' does, and with the attribute names unchanged. Here's the result: http://github.com/darius/columnize/blob/69d2b1c084ab3fc7c72d...
Re:See(), an alternative to Python's dir() by meqif on Wednesday February 18, 2009 @09:59AM (#485803)
In case someone else is an Arch Linux user and wants to use this, I uploaded a pkgbuild to AUR.

http://aur.archlinux.org/packages.php?ID=24014