Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2002-07-12 22:29:50
Size: 365
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 7 as of 2005-07-12 03:46:00
Size: 582
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers off
Line 3: Line 4:
daniel@dittmar.net [mailto:daniel@dittmar.net]
Line 5: Line 6:
Python cheat sheet: ==== Python cheat sheet ====
{{{
pickle:
  cPickle.dump (object, open (fname, 'wb'), 1)
  object = load (open (fname, 'wb'))
Line 7: Line 12:
pickle
  * cPickle.dump (object, open (fname, 'wb'), 1)
  * object = load (open (fname, 'wb'))
date format:
  time.strftime ("%Y-%m-%d %H:%M:%S", time.localtime (time.time ()))
Line 11: Line 15:
date format
  * time.strftime ("%Y-%m-%d %H:%M:%S", time.localtime (time.time ()))
cStringIO:
  buffer.getvalue ()
Line 14: Line 18:
cStringIO
  * buffer.getvalue ()
tempfile:
  import tempfile
  var = tempfile.mktemp ()
}}}
Line 17: Line 23:
tempfile
  * import tempfile
  * var = tempfile.mktemp ()
==== To do ====

===== Information Search Tree =====

  * c.l.p
  * parnassus
  * official docs
  * SoYouWanna
  * guides
  * cookbooks

----

CategoryHomepage

Editor of WebProgramming.

[mailto:daniel@dittmar.net]

Python cheat sheet

pickle:
  cPickle.dump (object, open (fname, 'wb'), 1)
  object = load (open (fname, 'wb'))

date format:
  time.strftime ("%Y-%m-%d %H:%M:%S", time.localtime (time.time ()))

cStringIO:
  buffer.getvalue ()

tempfile:
  import tempfile
  var = tempfile.mktemp ()

To do

Information Search Tree
  • c.l.p
  • parnassus
  • official docs
  • SoYouWanna

  • guides
  • cookbooks


CategoryHomepage

DanielDittmar (last edited 2009-12-03 22:09:38 by vpn-8061f516)

Unable to edit the page? See the FrontPage for instructions.