parameters: (self, *args)
docstring: Embedded File Open
docstring_summary: Embedded File Open
docstring_tokens: Embedded File Open
function: def embfile_open(self, *args):
          """Embedded File Open"""
          if not hasattr(self.curr_file_anchor.pixbuf, "id"):
              self.boss.embfiles_id += 1
              self.curr_file_anchor.pixbuf.id = self.boss.embfiles_id
          filename = str(self.treestore[self.curr_tree_iter][3])+cons.CHAR_MINUS+str(self.curr_file_anchor.pixbuf.id)+cons.CHAR_MINUS+str(os.getpid())+cons.CHAR_MINUS+self.curr_file_anchor.pixbuf.filename
          filepath = os.path.join(cons.TMP_FOLDER, filename)
          with open(filepath, 'wb') as fd:
              fd.write(self.curr_file_anchor.pixbuf.embfile)
          #if self.treestore[self.curr_tree_iter][7]:
          #    os.chmod(filepath, os.stat(filepath).st_mode & ~stat.S_IWUSR & ~stat.S_IWGRP & ~stat.S_IWOTH)
          print "embopen", filepath
          self.external_filepath_open(filepath, False)
          self.embfiles_opened[filepath] = os.path.getmtime(filepath)
          if not self.embfiles_sentinel_id: self.embfiles_sentinel_start()
function_tokens: def embfile_open ( self , * args ) : if not hasattr ( self . curr_file_anchor . pixbuf , "id" ) : self . boss . embfiles_id += 1 self . curr_file_anchor . pixbuf . id = self . boss . embfiles_id filename = str ( self . treestore [ self . curr_tree_iter ] [ 3 ] ) + cons . CHAR_MINUS + str ( self . curr_file_anchor . pixbuf . id ) + cons . CHAR_MINUS + str ( os . getpid ( ) ) + cons . CHAR_MINUS + self . curr_file_anchor . pixbuf . filename filepath = os . path . join ( cons . TMP_FOLDER , filename ) with open ( filepath , 'wb' ) as fd : fd . write ( self . curr_file_anchor . pixbuf . embfile ) #if self.treestore[self.curr_tree_iter][7]: #    os.chmod(filepath, os.stat(filepath).st_mode & ~stat.S_IWUSR & ~stat.S_IWGRP & ~stat.S_IWOTH) print "embopen" , filepath self . external_filepath_open ( filepath , False ) self . embfiles_opened [ filepath ] = os . path . getmtime ( filepath ) if not self . embfiles_sentinel_id : self . embfiles_sentinel_start ( )