Distribute python application
$30-75 USD
Pago na entrega
I have written the python script included below. The program's functionality is simple - it takes a list of redirect URL links from a column in Microsoft excel and returns the actual URLs. (Example: [url removed, login to view] actually returns [url removed, login to view]). This program works and serves my needs as-is. It uses xlrd and xlwt to interface with excel (downloaded here - [url removed, login to view]).
My project: This script currently only works on my computer with xlrd and xlwt installed, and the script run through the terminal. How do I distribute this as a user-friendly application that will run on any computer? Most users will be using OSX 10.7 machines.
I do not need to change the original python code - I just need the ability distribute the script as an application that others can use. Thank you!
## Deliverables
Python script:
__
from xlrd import open_workbook
import urllib2
import xlwt
import string
import sys
from Tkinter import *
import tkFileDialog
def convertURLs(*args):
column = [url removed, login to view]()
col = [url removed, login to view](column)
book = open_workbook(file_entry)
sheet = book.sheet_by_index(0)
wbk = [url removed, login to view]()
writeSheet = wbk.add_sheet("Real_URLS")
thing = [url removed, login to view]()
thing2 = [url removed, login to view]()
opener = urllib2.build_opener(thing, thing2)
for i in range([url removed, login to view]):
data = [url removed, login to view] (i,col)
url = [url removed, login to view]
row = i
try:
if url:
site = [url removed, login to view](url)
newURL = [url removed, login to view]()
#print newURL
[url removed, login to view](i,1,newURL)
except IOError as e:
print "Error in a cell, just double check the URL in row %r" % i
[url removed, login to view] ([url removed, login to view]())
#print "Your URLs have been converted and are saved in the file "+client+"[url removed, login to view]"
#print "Rock out!"
mainframe = Tk()
[url removed, login to view]("Let's convert those URLs")
#Create frame
#mainframe = Frame(root)
column = StringVar()
#Create entry form for column
clabel = Label(mainframe, text="Which column contains URLs? (Lowercase)").grid(row=1)
column_entry = Entry(mainframe, textvariable=column)
[url removed, login to view](row=1, column=1)
#Create URL convert button
ConVert = Button(mainframe, text="Convert URLs", command=convertURLs)
[url removed, login to view](row=3)
#Create quit button
QButton = Button(mainframe, text="QUIT", fg="red", command=[url removed, login to view]).grid(row=3, column=1)
#Create reminders
rlabel1 = Label(mainframe, text="Be sure your original file is saved as .xls, not .xlsx").grid(row=5)
rlabel2 = Label(mainframe,text="Also include .xls extension when you save your file").grid(row=6)
#Get File Name From a button
file_entry = [url removed, login to view]()
[url removed, login to view]()
ID do Projeto: #2757630