[go: up one dir, main page]

Menu

[599fc9]: / win32 / sql-backup.py  Maximize  Restore  History

Download this file

32 lines (18 with data), 640 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from gzip import GzipFile
#from os.path import
from optparse import OptionParser
def main():
parser = OptionParser()
parser.add_option( '-l', '--load', action='store_true', dest='load',
help='ricarica un database' )
parser.add_option( '-s', '--save', action='store_true', dest='save',
help='salva un database' )
parser.add_option( '-d', '--directory', action='store', dest='destdir',
help='directory dove leggere/scrivere i file' )
options, args = parser.parse_args()
print options
print args
#if getattr( options, 'load', False ):
#f = GzipFile( 'filename', 'r' )
if __name__ == '__main__':
main()