コード例 #1
0
 def _temp_body (self) :
     if self._tfn is None or not sos.path.isfile (self._tfn) :
         dir = TFL.Filename (self.filename or "").directory
         with TFL.open_tempfile ("wb", dir = dir, auto_remove = False) as \
                  (f, result) :
             f.write (self.body)
             self._tfn = result
     return self._tfn
コード例 #2
0
ファイル: Message.py プロジェクト: Tapyr/tapyr
 def _temp_body (self) :
     if self._tfn is None or not sos.path.isfile (self._tfn) :
         dir = TFL.Filename \
             ( (self.filename or "").encode
                 (PMA.file_system_encoding, "ignore")
             ).directory
         with TFL.open_tempfile (dir = dir, auto_remove = False) as \
                  (f, result) :
             f.write (self.body)
             self._tfn = result
     return self._tfn
コード例 #3
0
ファイル: Message.py プロジェクト: xiaochang91/tapyr
 def _temp_body(self):
     if self._tfn is None or not sos.path.isfile(self._tfn):
         dir = TFL.Filename \
             ( (self.filename or "").encode
                 (PMA.file_system_encoding, "ignore")
             ).directory
         with TFL.open_tempfile (dir = dir, auto_remove = False) as \
                  (f, result) :
             f.write(self.body)
             self._tfn = result
     return self._tfn