# ======================================================= # Create the temporary directory used in this Comix session. # The dir is /tmp/comix/<num> where <num> is 1 or higher # depending on the number of Comix sessions opened. # ======================================================= if not os.path.exists('/tmp/comix/'): os.makedirs('/tmp/comix/') os.chmod('/tmp/comix/', 0700) dir_number = 1 while 1: if not os.path.exists('/tmp/comix/' + str(dir_number)): os.mkdir('/tmp/comix/' + str(dir_number)) os.chmod('/tmp/comix/' + str(dir_number), 0700) self.base_dir = '/tmp/comix/' + str(dir_number) + '/' break dir_number += 1