ubuntuusers.de

Unbenannt

Datum:
17. September 2008 10:15
Code:
  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
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Improtieren der Module
import sys
import cPickle
import time
import os

""" 
    Name: GetContact
    Version: 0.0.1 PreAlpha
    Author: Angelo Gründler , Mario Fuest
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 3
    of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You dont have a copy of the GNU GPL - dont care about it, 
    we think you know what GPL means ;)
"""

class Adressbuch(object):

    def __init(self):
        pass
    
    def main_loop(self):
        while True: #Programmschleife welche das menue immer wieder aufruft....
            print """ Was wollen sie tun?
            (1) Adressbuch Anzeigen
            (2) Neuen Kontakt anlegen 
            (3) Kontaktinformationen bearbeiten
            (4) Kontakt löschen
            (0) Programm beenden"""
        
            eingabe = int(raw_input("Geben Sie eine Zahl ein!"))
            if eingabe == 1:
                print "Sie haben 1 gewählt..."
            elif eingabe == 2:
                print "Sie haben 2 gewählt..."
            elif eingabe == 3:
                print "Sie haben 3 gewählt..."
            elif eingabe == 4:
                print "Sie haben 4 gewählt..."
            elif eingabe == 0:
                exit()
            else:
                print "Falsche Eingabe."
                
    def eintrag_neu(self):
        pass
    
    def anzeigen(self):
        pass
    
    def eintrag_entfernen(self):
        pass
        
    def kontakt_edit(self):
        pass
        
    def kontakt_suche(self):
        pass

    def _kontakt_(self):
        """
        Diese Klasse steht für einen Kontakt.
        Hier werden alle informationen zwischengespeichert.
        Nachher werden sie mit cPickle in eine Datei gespeichert.
        """
        self.kontakt_vorname = ""
        self.kontakt_nachname = ""
        self.kontakt_land = ""
        self.kontakt_ort = ""
        self.kontakt_strasse = ""
        self.kontakt_hausnummer = ""
        self.kontakt_festnetz_nummer = ""
        self.kontakt_handy_nummer = ""
        self.kontakt_email = ""
        self.kontakt_jabber = ""


# Globale Variabeln
name = "Kontaktmanager"
version = "0.0.1 PreAlpha"
line = "-------------------------"

# Willkommensscreen
print line
print "", name, version
print line


if __name__ == "__main__":
    Adressbuchlistenobjekt = Adressbuch()
    Adressbuchlistenobjekt.main_loop()
    

else:
    print "Dieses Modul ist nicht zum Importieren gedacht"