Example #1
0
 def Enable(self) -> None:
     self.PushObject(self._current_area_label)
     self.PushObject(self._current_player_label)
     self.PushObject(self._send_button)
     self.PushObject(self._settings_button)
     self.PushObject(self._quit_button)
     self._client = Client()
Example #2
0
def main():
    client = Client()
    wrangler = Wrangler()
    wrangler.start()

    ui = UI(
    )  # Start all threads before here (since UI is an infinite loop run on this thread)
Example #3
0
 def __init__(self):
     """
     In constructor program arguments are parsed and client is prepared
     """
     arguments = self.parseArgs()
     self.client = Client(configFile=arguments.config,
                          limit=arguments.limit,
                          register=arguments.register)
Example #4
0
def get_stats(usernames, playlist, platform = 'pc'):

    if not isinstance(usernames, list):
        usernames = [usernames]

    client = Client()
    stats_friends = []
    try:
        for x in usernames:
            response = client.send_request(platform, x.lower())
            stats_friends.append(response[0][playlist])
    except Exception as e:
        print(e)
    return stats_friends
Example #5
0
def get_squad_stats(usernames, platform='psn'):

    if not isinstance(usernames, list):
        usernames = [usernames]

    client = Client()
    stats_friends = []
    try:
        for x in usernames:
            response = client.send_request(platform, x.lower())
            stats_friends.append(response[0]['p9'])
    except Exception:
        ''

    return stats_friends
Example #6
0
def get_all_stats(usernames, platform = 'pc'):
    all_stats = []
    playlist = ['p2','p10','p9']

    if not isinstance(usernames, list):
        usernames = [usernames]
    client = Client()
    stats_friends = []
    try:
        for i in range(3):
            for x in usernames:
                response = client.send_request(platform, x.lower())
                all_stats.append(response[0][playlist[i]])
    except Exception:
        ''
    return all_stats
Example #7
0
from src.Client import Client
import json

with open('data/config.json') as json_data_file:
    data = json.load(json_data_file)
    token = data['discord']['token']

client = Client()
client.run(token)
 def __build_client(self, transport):
     return Client(transport)
Example #9
0
import os
import time

from src.Client import Client
import functions as fun

cliente = Client()


def principal_cli():
    func = fun.functionsADM()
    trigger = 0

    while trigger == 0:
        login = func.open()

        if login == "open":
            trigger = 1
            print('\033[32m' + "=========Bem-Vindo=========== " + '\033[0;0m')
        else:
            print('\033[31m' + "Login inválido" + '\033[0;0m')

    while True:
        time.sleep(2)
        os.system("cls")
        print(" === MÓDULO CLIENTE === ")
        print("1 - Cadastrar Banco ou Fintech")
        print("2 - Editar Cadastro")
        print("3 - Listar Banco ou Fintech")
        print("4 - Voltar para o menu principal")
        opcao = int(input("Digite o Opção Desejada:"))
Example #10
0
"""
Written by
Noam Solan - 204484703
Yarin Kimhi - 308337641
"""

from options.ClientOptions import client_params, logging_level
from src.Client import Client
from src.Logger import Logger

Client(Logger(logging_level), **client_params).init_game()
Example #11
0
def main():
    header_program()
    client = Client()
    client.start()
Example #12
0
import sys
from src.Server import Server
from src.Client import Client

if len(sys.argv) > 1:
    client = Client(sys.argv[1], sys.argv[2])
    client.run()
else:
    server = Server()
    server.run()
Example #13
0
from src.Client import Client

Client().run()