Solved

Turning python script into an applet

Posted on 2016-11-19
12
102 Views
Last Modified: 2016-11-20
Hi everyone,

I have a small python script that I've been running on my mac computer through the terminal, however I need to give the script to someone using a PC so that they can run it on their local computer. Since the person doesn't know any programming they won't be able to run it via the command line so I was wondering if it's possible to turn the script into a little applet so that it can be easily run. The script basically merges together a whole lot of .csv files so I was hoping that if the person had all the files in a folder then they could drag an applet icon onto the folder which would run the script.

Can any tell me if this is possible and how I would go about converting the python script into an applet to work on a PC? I have attached the script.

Would really appreciate any advice.
0
Comment
Question by:gwh2
  • 7
  • 5
12 Comments
 
LVL 15

Expert Comment

by:Walter Ritzel
ID: 41894542
the best approach for a pc would be a batch script. the script would have the command line and could be executed b double click.
0
 
LVL 1

Author Comment

by:gwh2
ID: 41894555
Thanks for the reply. Are you talking about converting a python script into a Windows .exe file? If yes, would I need to do this on the other person's computer or can I do it on my computer and then provide the .exe file?
0
 
LVL 1

Author Comment

by:gwh2
ID: 41894556
There is a tutorial on how to do this at the following url:

https://www.youtube.com/watch?v=kyoGfnLm4LA

Just to clarify, is that the procedure that you recommend?
0
 
LVL 15

Expert Comment

by:Walter Ritzel
ID: 41894562
no, I mean create a simple batch script (.bat or .CMD) file.
0
 
LVL 1

Author Comment

by:gwh2
ID: 41894568
Thanks but I wanted to keep using my original python script. Are you able to make a suggestion where I can do that and still have someone on a PC run it?
0
 
LVL 15

Expert Comment

by:Walter Ritzel
ID: 41894573
you will continue to have your Python script, but will create a small batch file with one line that will call the Python script and could be actioned by double click
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:gwh2
ID: 41894582
Ok that sounds good but are you able to tell me how to do this as I've never done it before? Also, will the person need to have the python script in the same folder as the .csv files?
0
 
LVL 1

Author Comment

by:gwh2
ID: 41894584
Just one other thing if that's ok: the other person won't have python installed on their pc so this method needs to work in this type of situation. Can you clarify that this will be the case?
0
 
LVL 15

Expert Comment

by:Walter Ritzel
ID: 41894762
OK, then the situation is little bit more complicated: if you don't want the person to have Python installed, this will require that you use one of the projects that encapsulate a Python script in an executable file, which will require that you have a Windows system to do it.
0
 
LVL 15

Accepted Solution

by:
Walter Ritzel earned 500 total points
ID: 41894765
that link you have posted teaches how to do that.
0
 
LVL 1

Author Closing Comment

by:gwh2
ID: 41895057
Ok thanks for the help
0
 
LVL 1

Author Comment

by:gwh2
ID: 41895318
Sorry to come back to this but is there also a way to run the python script on a mac other than using the terminal? I was hoping there was some method like on the PC whereby I could double-click a file and run the script. If yes, could you provide some information?

Thanks again
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to split this in C++ 4 94
oracle query help 18 99
Difference of import usage in Python 1 59
What are programming codes and how do they work? 7 69
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now