Exemplo n.º 1
0
#!/usr/bin/python
####################################################################
    # Name: curse.py
    # Parameter: useremail password
    # This program is called from the command line to initiate the
    # CLI client. The user email address and password should be
    # passed on the command line.
    # example: python curse.py [email protected] 1234
####################################################################

import sys
from src.view.view import View

# get username (email) and password from command line:
args = len(sys.argv)
if args < 3:
    sys.exit("Invalid Input: include user-email and password in command line")
userName = sys.argv[1]
userPass = sys.argv[2]

# start the curses CLI program from src/view/view.py
newView = View(userName, userPass)
newView.validateUser()
newView.initWrapper()
Exemplo n.º 2
0
from src.view.view import View
import getpass

if __name__ == '__main__':

    args = len(sys.argv)
    if args < 3:
        currentUsername = raw_input("Username: ")
        currentPassword = getpass.getpass()
    else:  # get username and password from command line
        currentUsername = sys.argv[1]
        currentPassword = sys.argv[2]

    view = View(currentUsername, currentPassword)

    view.validateUser()

    view.initWrapper()

    m = MessageBuilder()

    m.buildMessageFromEmail('email.txt')








Exemplo n.º 3
0
#!/usr/bin/python
####################################################################
# Name: curse.py
# Parameter: useremail password
# This program is called from the command line to initiate the
# CLI client. The user email address and password should be
# passed on the command line.
# example: python curse.py [email protected] 1234
####################################################################

import sys
from src.view.view import View

# get username (email) and password from command line:
args = len(sys.argv)
if args < 3:
    sys.exit("Invalid Input: include user-email and password in command line")
userName = sys.argv[1]
userPass = sys.argv[2]

# start the curses CLI program from src/view/view.py
newView = View(userName, userPass)
newView.validateUser()
newView.initWrapper()