py::qo::io Namespace Reference


Functions

def debug
def error
def extract

Variables

list qo_depends


Function Documentation

def py::qo::io::debug (   args  ) 

00033                    :
00034         do = False
00035         try :
00036                 do = qocfg.get_debug()
00037         except NameError :
00038                 do = True
00039         except KeyError :
00040                 do = True
00041         if not do :
00042                 return
00043         sys.stderr.write( '\n'.join( args ) + '\n' )
00044 
def error( *args ) :

def py::qo::io::error (   args  ) 

00045                    :
00046         sys.stderr.write("\n".join(args)+"\n")
00047 
def extract( archive, destdir ) :

def py::qo::io::extract (   archive,
  destdir 
)

00048                                 :
00049         ar_mime = qo.utils.mime_from_name( os.path.basename(archive) )
00050         if ar_mime in [ "application/x-tbz" ] :
00051                 ar = tarfile.open( archive, "r:bz2" )
00052                 for e in ar :
00053                         ar.extract( e, destdir )
00054                 ar.close()
00055         else :
00056                 raise Exception( "Unknown archive format (%s)" % ar_mime )
00057 
00058 


Variable Documentation

list py::qo::io::qo_depends [static]

Initial value:

[
        qo.utils,
]


Generated on Tue Oct 9 20:40:32 2007 for Qomics by  doxygen 1.5.3