Exemple #1
0
def main():
    # Read config file
    cf = config.configFile(r'.\config.xml')
    # Parse XML
    cf.parse()
    # Create app
    app = wx.App()

    # Parsing error
    if cf.error:
        wx.MessageDialog(None, 'An error occurred when parsing the XML file.', 'Meidochan');
        return

    # Create tray icon
    tray = taskicon.TaskBarIcon(cf, icon = None) # During beta test icon is empty
    # Mainloop
    app.MainLoop()
Exemple #2
0
def main():
    # Create app
    app = wx.App()

    # Read config file
    if(os.path.isfile(constants.GLOBAL_CONSTANTS['config_path'])):
        cf = config.configFile(constants.GLOBAL_CONSTANTS['config_path'])
    else:
        wx.MessageDialog(None, 'The XML config file does not exist.', constants.GLOBAL_CONSTANTS['app_name'], wx.OK | wx.ICON_ERROR).ShowModal()
        return
    # Parse XML
    cf.parse()

    # Parsing error
    if cf.error:
        wx.MessageDialog(None, 'An error occurred when parsing the XML file.', constants.GLOBAL_CONSTANTS['app_name'], wx.OK | wx.ICON_ERROR).ShowModal()
        return

    # Create tray icon
    tray = taskicon.TaskBarIcon(cf)
    # Mainloop
    app.MainLoop()
Exemple #3
0
import requests
import sys
from config import configFile

config = configFile()
print(config)

sys.exit()
s = requests.session()

session = s.get('https://cannonkeys.com/cart.js').json()
sessionID = session['token']


print('sessionID')
print(sessionID
        )
payload = {
    'form_type': 'product',
    'id': '31916657377391'
}


response = s.post('https://cannonkeys.com/cart/add.js', data=payload)
print(response.cookies)
print('-------------------')
shopid = response.headers['x-shopid']
print('-------------------')

checkout_payload = {
        'checkout': 'Check out'
from agileDB import OctopusAgileDB
from agileTriggers import costTriggers
from config import configFile
from agileTools import buildFilePath
from crontab import CronTab
from mylogger import mylogger
import os
import sys

# build the config path
configPath = buildFilePath('~', ".agileTriggers.ini")
if configPath == False:
    print(f" getRates abandoned execution config file missing:{configPath}")
    raise sys.exit(1)
else:
    config = configFile(configPath)

binPath = config.read_value('filepaths', 'bin_folder')
if binPath == None:
    print("getRates abandoned execution bin path missing:")
    raise sys.exit(1)

logPath = config.read_value('filepaths', 'log_folder')
if logPath == None:
    print("getRates abandoned execution log path missing:")
    raise sys.exit(1)

toscreen = config.read_value('settings', 'agileTrigger_debug2screen')
if toscreen == None: toscreen = False
else: toscreen = True