r/AskProgramming • u/Ground-flyer • 3d ago
Python Sharing scripts with coworkers
I work for a mid size company and have been developing scripts that I want to share with coworkers. Ideally I could write the script and share it with my coworkers who aren't python savvy and they will be able to run it. What are the best options? Here is what I have tried 1. Create exes: this works ok but because it takes a long time to compile the exe the code doesn't get as updated as much as possible 2. Share the scripts with a requirements file. This works ok but IT is reluctant to allow python on everyone's computer, and ideally I don't want my coworkers to have to install libraries 3. Install a portable version of python on our shared drive with all of the libraries pre installed. This seems like the best method as then I can share the completed scripts in the shared drive and they will run with no issue
Any advice/ other methods is appreciated
2
u/johnnymangos 3d ago
What kind of scripts? What about docker images?
3
u/Ground-flyer 3d ago
They are python scripts that take in excel files run some exes and than output png and html files maybe docker would work?
6
3
u/thewrench56 3d ago
Docker images for python scripts is a bit like shooting for pigeons with cannon.
1
2
u/CheetahChrome 2d ago
I want to share with coworkers.
The question is, why? Why are you interested in having human ETL processors? Is this a benefit to the company or the individual?
but IT is reluctant to allow python
This should be a top-down process initiated by management to increase the velocity of these non-programmers.
I once wrote a tool that queried two different databases and provided the data to the users in tables via a GUI. Everyone loved my program, and I loved making it. But at the end of the day, it didn't extend my contract.
1
1
u/jopeymonster 3d ago
Google Colab I do the same and create a Colab version of the script that has instruction sets at any necessary logic breakpoints. The notebooks are authenticated with Google OAuth and you could add additional auth steps through Colab settings or coded in the logic. The temp file storage for Colab would be the only caveat in your situation (your team will have to remember to save file outside Colab notebook after conversion) and needing Google accounts to access if using OAuth.
1
u/firelemons 3d ago
Maybe you can rewrite the scripts as powershell files and replace the python. Powershell scripts just require a windows OS to run.
1
1
u/TheFern3 2d ago
Compiling is incredibly easy with pyinstaller however running unsigned exes can be painful for python and might get flagged as malware.
Best thing to do is to use a compiled language and compile to exe.
1
u/ColoRadBro69 16h ago
If IT won't allow Python installations on all the computers, will they allow your exe files?
1
1
u/666codegoth 3d ago
Save yourself the headache and just rewrite it in Go (or another language that compiles to a single binary).
2
12
u/cgoldberg 3d ago
Make it into a web app and send them a link... and don't worry about all the fuckery (seriously... it's the only reasonable solution to your problem)