Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 1st, 2012  |  syntax: Python  |  size: 0.41 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.         params["attachments"] = []
  2.         if os.path.isdir(os.path.join(path, "att")):
  3.             for filename in os.listdir(path):
  4.                 params["attachments"].append(Attachment(
  5.                     self.file_cacher.put_file(
  6.                     path=os.path.join(path, "att", filename),
  7.                     description="Attachment %s for task %s" % filename, name)
  8.                     ).export_to_dict())