| author | Pascal Volk <user@localhost.localdomain.org> | 
| Sun, 06 Jan 2013 00:09:47 +0000 | |
| branch | v0.7.x | 
| changeset 676 | 2bc11dada296 | 
| parent 666 | 50148adebee9 | 
| parent 675 | d24f094d1cb5 | 
| child 711 | 2a75058fc064 | 
| permissions | -rwxr-xr-x | 
| 645 
fcc3f100e56a
Updated shebang to use python3 instead of python.
 Pascal Volk <user@localhost.localdomain.org> parents: 
569diff
changeset | 1 | #!/usr/bin/env python3 | 
| 0 
bb0aa2102206
Initial import @sf.net
 Pascal Volk <neverseen@users.sourceforge.net> parents: diff
changeset | 2 | # -*- coding: UTF-8 -*- | 
| 675 
d24f094d1cb5
Updated copyright notices to include the year 2013.
 Pascal Volk <user@localhost.localdomain.org> parents: 
569diff
changeset | 3 | # Copyright 2007 - 2013, Pascal Volk | 
| 0 
bb0aa2102206
Initial import @sf.net
 Pascal Volk <neverseen@users.sourceforge.net> parents: diff
changeset | 4 | # See COPYING for distribution information. | 
| 
bb0aa2102206
Initial import @sf.net
 Pascal Volk <neverseen@users.sourceforge.net> parents: diff
changeset | 5 | |
| 
bb0aa2102206
Initial import @sf.net
 Pascal Volk <neverseen@users.sourceforge.net> parents: diff
changeset | 6 | """This is the vmm main script.""" | 
| 
bb0aa2102206
Initial import @sf.net
 Pascal Volk <neverseen@users.sourceforge.net> parents: diff
changeset | 7 | |
| 340 
4515afec62e5
vmm: Renamed to VirtualMailManager/cli/main.py. Splitted subcommands
 Pascal Volk <neverseen@users.sourceforge.net> parents: 
232diff
changeset | 8 | import sys | 
| 183 
eb4c73d9d0a4
vmm: reworked subcommand/arguments mapping.
 Pascal Volk <neverseen@users.sourceforge.net> parents: 
180diff
changeset | 9 | |
| 0 
bb0aa2102206
Initial import @sf.net
 Pascal Volk <neverseen@users.sourceforge.net> parents: diff
changeset | 10 | if __name__ == '__main__': | 
| 340 
4515afec62e5
vmm: Renamed to VirtualMailManager/cli/main.py. Splitted subcommands
 Pascal Volk <neverseen@users.sourceforge.net> parents: 
232diff
changeset | 11 | # replace the script's cwd (/usr/local/sbin) with our module dir | 
| 569 
54a84a311654
vmm: Don't insert the module directory into sys.path by default.
 Pascal Volk <user@localhost.localdomain.org> parents: 
568diff
changeset | 12 | # (the location of the VirtualMailManager directory) - if it is | 
| 
54a84a311654
vmm: Don't insert the module directory into sys.path by default.
 Pascal Volk <user@localhost.localdomain.org> parents: 
568diff
changeset | 13 | # not in sys.path | 
| 
54a84a311654
vmm: Don't insert the module directory into sys.path by default.
 Pascal Volk <user@localhost.localdomain.org> parents: 
568diff
changeset | 14 | #sys.path[0] = '/usr/local/lib/vmm' | 
| 
54a84a311654
vmm: Don't insert the module directory into sys.path by default.
 Pascal Volk <user@localhost.localdomain.org> parents: 
568diff
changeset | 15 | # Otherwise just remove /usr/local/sbin from sys.path | 
| 
54a84a311654
vmm: Don't insert the module directory into sys.path by default.
 Pascal Volk <user@localhost.localdomain.org> parents: 
568diff
changeset | 16 | sys.path.remove(sys.path[0]) | 
| 340 
4515afec62e5
vmm: Renamed to VirtualMailManager/cli/main.py. Splitted subcommands
 Pascal Volk <neverseen@users.sourceforge.net> parents: 
232diff
changeset | 17 | from VirtualMailManager.cli.main import run | 
| 666 
50148adebee9
VMM/cli/main: Adjusted to new argparse functionality.
 Pascal Volk <user@localhost.localdomain.org> parents: 
645diff
changeset | 18 | sys.exit(run()) |