How can I automate this process or set it up so a coworker can do this?
March 13, 2017 1:24 PM   Subscribe

I have a Python script I use to take a set of spreadsheets, reformat them, and export them as a single spreadsheet split into multiple tabs. I run this daily to help a coworker, who works with the data on this spreadsheet. I'd like to set it up so coworker can run it instead. Deets below the break.

I've tried two things so far:

- We've tried putting Python on coworker's system, but coworker's system is set so only administrators can install new programs.

- I've tried converting the script to an executable file, but all the scripts that allow that seem to make 100MB+ size folders (I used a lot of imports to make the script, because I wanted it to have a GUI for coworker to use.)

Coworker's system is a Mac, and I'm not sure if that makes this any easier, but without being able to even install Python Launcher it's going to be tricky to set things up, I think.

I'd love to either give coworker a file to run or a webpage to use, but I don't know what the best next step is.
posted by LSK to Computers & Internet (12 answers total) 5 users marked this as a favorite
This is a an org/business problem not a computer problem, imo. You have not one but two viable solutions that will work, it's a person or persons (or policy?) who are holding you back.

Why can't an admin install a widely used free program that will help coworker do their task? Why can't 100 mb (small!) of disk space be used to support a program you wrote to support their task?

Maybe someone can help find one weird trick that will work, but a script can't fix policies and practices that prevent work from being done efficiently.
posted by SaltySalticid at 1:41 PM on March 13, 2017

- We've tried putting Python on coworker's system, but coworker's system is set so only administrators can install new programs.

It seems like you have a totally reasonable business case here for getting IT to install Python on your coworker's system. The fact that you can't do it without assistance doesn't mean you can't do it. That said, OSX since Mountain Lion should already have Python 2.7 at least installed already. But if they've disabled it, then it's worth asking to have it enabled again.
posted by Sequence at 1:42 PM on March 13, 2017 [4 favorites]

Maybe hang it off a linux host/AWS/Google Cloud that supports a shell/webpage with python? Or install python/apache on a standalone laptop/pi or get really funky and install python on a android, though getting the file up and down from the android will be more cumbersome than its worth.

Id go with the outside web host instance, as long as the data and company policy would allow that.
posted by edman at 1:49 PM on March 13, 2017

Agreed with everyone else, just call IT and have them install the program needed -- it's not as if it's a cost issue. They may even be able to do this remotely. My old workplace was also set up so only administrators could install new programs, but IT had a way to remotely access your system and install stuff so long as there was a legitimate work need (as there clearly is here!)
posted by rainbowbrite at 1:49 PM on March 13, 2017 [1 favorite]

Broadly, this is something the IT people who put those restrictions into place should (help you) solve.

But, the naive answer to your question - just give SSH to your machine from theirs. If you're running windows, there are several SSH servers you can install. Windows 10 has an SSH daemon built in. I haven't tried running py code that way, but I would imagine it would work. Anyway, that's more or less easy peasy.

Alternatively, spinning up an AWS or other cloud instance might work. Depending. But its a lot more work.
posted by Pogo_Fuzzybutt at 1:58 PM on March 13, 2017

If you can get the IT people to run a single sudo command to install homebrew, you should be able to do everything else in the regular non-admin user space.
posted by rockindata at 2:56 PM on March 13, 2017

I assume you have Reasons for not going through some official process.

I also assume that none of the data in question is financial or health or anything else particularly sensitive. If it is, ignore this suggestion and open a port to your PC through SSH if your network isn't too locked down.

Cheapest and easiest thing would be to use Google web apps with webapp2. The SDK for Python is on G's web app site. Caveat: webapp2 may not support Py 3.0 yet ~ it topped out at 2.7 about 9 months ago.

There are other options than Google but none that I know of that will be as well-documented and also free for the amount of data you're probably talking about.

If what you really want is to have someone else not you trigger this code to run (?), it might be time better spent to just automate the sequence on your local machine. Just another option.
posted by Kalatraz at 3:05 PM on March 13, 2017

Totes forgot about Python Anywhere. Might be just the thing because your project is small.
posted by Kalatraz at 3:14 PM on March 13, 2017

I'm confused — Macs come with Python out of the box. You don't need to be an admin to use it in the Terminal. I just discovered Platypus which converts Python scripts to double-clickable Mac apps, but you may need to be an admin to install that. If you yourself are on a Mac you can use Platypus there and move the app over. Even if you aren't an admin you can run whatever you want from the desktop or ~/Applications or wherever, unless the admins turned on Parental Controls or have some other restriction (like JAMF’s restrictions, which a big company might have) set up.
posted by Ampersand692 at 6:28 PM on March 13, 2017 [1 favorite]

Another browser-based Python option is Sage Math Cloud (comes with Python 2 by default).
posted by yarntheory at 6:37 PM on March 13, 2017

I know it's not considered proper by IT people, but I've used Excel macros to do something very similar.
posted by kjs4 at 9:13 PM on March 13, 2017

I'm confused — Macs come with Python out of the box. You don't need to be an admin to use it in the Terminal.

This. You shouldn't need to install anything.

If you need to install some Pip packages, that's a different story -- you'll need admin to install them the usual way, although you can probably get away with virtualenv instead or something. You could also install Python via Homebrew and that copy wouldn't require admin to install packages, but that's an advanced topic.
posted by neckro23 at 1:41 PM on March 14, 2017

« Older Summer travel in Europe - realistic?   |   Liberal-friendly (or apolitical) NY-area gun range... Newer »
This thread is closed to new comments.