def getArguments(): dateList = collectArguments.getDates() date1 = dateList[0] date2 = dateList[1] filename = collectArguments.getFilename() #filename = 'C:\\Users\\thambapillair\\Documents\\'+ raw_input('Enter preferred filename')+'.txt' dimensionString = collectArguments.collectArguments(dimensions_and_metrics.dimensions) metricString = collectArguments.collectArguments(dimensions_and_metrics.metrics) #print metricString dimensionList = collectArguments.collectLists(dimensionString) #metricList = metricString.split(',') metricList = collectArguments.collectLists(metricString) #print dimensionList,metricList segment_id = collectArguments.getSegments() #for z in range (0,len(dimensionList)-1): #print metricList[z] #print z returnList = [date1,date2,dimensionString,metricString,dimensionList,metricList,filename,segment_id] return returnList
#!/usr/bin/python # -*- coding: utf-8 -*- import time import sys import io import segmentIds import dimensions_and_metrics import collectArguments # import the Auth Helper class import hello_analytics_api_v3_auth from apiclient.errors import HttpError from oauth2client.client import AccessTokenRefreshError globalOutputList = [] dateList = collectArguments.getDates() date1 = dateList[0] date2 = dateList[1] filename = collectArguments.getFilename() myNewFile = open(filename, "w+") checkList = [ "Profile", "H - SendIt", "A - Zavvi", "A - TheHut.com", "H - zavvi.es", "H - mybag.com", "J - iwantoneofthose.com", "H - zavvi.nl", "H - allsole.com", "www.hqhair.com/",