<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I'm trying to use a python program called archivemail to manage<DIV>a bunch of user mailboxes.  Sorry for the foreign language </DIV><DIV>request but I'm calling it from a perl script so i should</DIV><DIV>get partial credit.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I don't know squat about python.</DIV><DIV>The program is putting stuff in the wrong temp directory</DIV><DIV>and I can't figure out how to fix it.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>It's using /tmp and it needs to be /usr/tmp on my system because]</DIV><DIV>/tmp is a small partition.  It's crashing with out-of-space on</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>self.mbox_file.write(body)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I can't for the life of me follow where the temp path is coming from.</DIV><DIV>Can anyone give me some guidance?  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here's some key statements i think:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>import tempfile  (seems to be a python module.. i'm suspicious this is where /tmp is coming from.)</DIV><DIV>and </DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>class StaleFiles:</DIV><DIV> <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>   """Class to keep track of files to be deleted on abnormal exit"""</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>    archive            = None  # tempfile for messages to be archived</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>    procmail_lock      = None  # original_mailbox.lock</DIV><DIV> <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>   retain             = None  # tempfile for messages to be retained</DIV><DIV> <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>   temp_dir           = None  # our tempfile directory container</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>and</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>  class RetainMbox(Mbox):</DIV><DIV>    """Class for holding messages that will be retained from the original</DIV><DIV>    mailbox (ie. the messages are not considered 'old'). Extends the 'Mbox'</DIV><DIV>    class. This 'mbox' file starts off as a temporary file but will eventually</DIV><DIV>    overwrite the original mailbox if everything is OK. </DIV><DIV>    </DIV><DIV>    """</DIV><DIV>    __final_name = None</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    def __init__(self, final_name):</DIV><DIV>        """Constructor - create a temporary file for the mailbox.</DIV><DIV>       </DIV><DIV>        Arguments:</DIV><DIV>        final_name -- the name of the original mailbox that this mailbox</DIV><DIV>                      will replace when we call finalise()</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>        """</DIV><DIV>        assert(final_name)</DIV><DIV>        temp_name = tempfile.mktemp("retain")</DIV><DIV>        self.mbox_file = open(temp_name, "w")</DIV><DIV>        self.mbox_file_name = temp_name</DIV><DIV>        _stale.retain = temp_name</DIV><DIV>        vprint("opened temporary retain file '%s'" % self.mbox_file_name)</DIV><DIV>        self.__final_name = final_name</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">--</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>John Springer</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>Somewhere in Portland</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>Where it's probably raining.</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV> <BR class="Apple-interchange-newline"> </DIV><BR></DIV></BODY></HTML>