Richard Colman
This useful function `info()` should be a part of the Python Standard interpreter. Is there an equivalent
The following is a function from Dive into Python.
def info(obj, spacing=20, collapse=1, variables=False):
'''Print methods and their doc Strings
Takes any object'''
if variables:
methodList = [method for method in dir(obj)]
else:
methodList = [method for method in dir(obj) if callable(getattr(obj,method))]
#print methodList
print '\n'.join(['%s %s' %
(method.ljust(spacing),
" ".join(str(getattr(obj,method).__doc__).split()))
for method in methodList])
if __name__=='__main__':
info(list)
I have found it to be very useful to find out different methods and their doc strings of a given object, on the interpretor.
Even iPython shell doesn't have an equivalent function. The ? and ?? print the docstring and some source with the docstring respectively.
[from lrw] Iowa Court Says Gay Marriage Ban Is Unconstitutional - NYTimes.com
Unanimous decision.
Can 'Curation' Save Media?
There is a trend evolving at media companies both big and small that promises to have a remarkably positive impact on what you read, watch, and share on the web: Curation.
It's not a popular thing to say that things are okay in media. In fact, the changes taking place are useful, necessary, and will in short order result in better editorial experiences, because as shown in the press daily, the sky is falling in old media. But, happily, the future is right around the corner.
Can 'Curation' Save Media?
There is a trend evolving at media companies both big and small that promises to have a remarkably positive impact on what you read, watch, and share on the web: Curation.
It's not a popular thing to say that things are okay in media. In fact, the changes taking place are useful, necessary, and will in short order result in better editorial experiences, because as shown in the press daily, the sky is falling in old media. But, happily, the future is right around the corner.
Mad science and secret codes in the TV series Fringe
Bad Robot, the production company behind the Fox TV series Fringe, is no stranger to involving audiences in Easter egg hunts. Lost, their best known series, is peppered with them. Untold numbers of websites are dedicated to tracking these visual clues, which on Lost range from the mysterious sequence of numbers (4, 8, 15, 16, 23, and 42) to Egyptian hieroglyphs to shark fins tattooed with the Dharma logo. If Lost set the standard, Fringe has picked up the challenge and run. The producers readily admit they have created any number of challenges and embedded them into each episode.
Study: surfing the Internet at work boosts productivity
Workers are more productive when they are able to occasionally do non-work stuff online, researchers at the University of Melbourne have found. Dr. Brent Coker studied the habits of 300 workers and found that the large majority engaged in what he calls "Workplace Internet Leisure Browsing" (WILB)—surfing the Internet for personal reasons. But despite the common perception that such a behavior is a drain on employers, Coker says that these employees are able to focus better when performing tasks for work.
Ask MeFi: Why did Michael fail where Vito succeeded?
Ask MeFi: Why did Michael fail where Vito succeeded?
'Spoon,' a Children's Book About Self-Conscious Spoons
There's something about anthropormorphized utensils that you just have to love. In honor of International Children's Book Day today, here is a look at Spoon by Amy Krouse Rosenthal and illustrated by Scott Magoon.
The protagonist is a spoon with your average identity issues—should he be jealous of forks that can twist up pasta? Are exotic chopsticks a threat? Does he live a fulfilled life if he can't spread jam?
For the most part, Spoon lives a pretty happy existence scooping up stuff, with a sliver of a line as a mouth (usually smiling) and stick figure hands (that wave). But you know, it's tough. Images from the book, after the jump.

