David (dblume) wrote,
David
dblume

Note To Self: Python's Apply

Self, discover why args has to be manipulated the way it does.
def fprintf(file,fmt, *args):
file.write(fmt % args)

def printf(fmt, *args):
apply(fprintf, (sys.stdout,fmt)+args)
Tags: programming, python
Subscribe

  • Map of Trippy's Silicon Valley Tour

    This is a map of Trippy's tour through Silicon Valley. Click on it to go to the actual GeoTagged page. Trippy started at the Hewlett Packard…

  • Trippy on cover of Wired

    Trippy on cover of Wired Originally uploaded by dblume. After Trippy's campaign to Silicon Valley's Birthplace and then the US Capitol,…

  • Trippy not in East Coast!

    Trippy has his way with a squeaky toy lizard Originally uploaded by dblume. I took the family down to San Diego for Spring Break. At the San…

  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments