Forums

Website (wordpress?) that hosts python script

Hey guys! Basically what I want to do is host some scripts that I wrote for work on a website or something similar so that people can:

  1. Drag and drop excel files onto the site
  2. Run the script based on the type of excel report that was dropped in
  3. The script would spit out a number from all of those excel files dropped in

Is this possible? Where would I do such a thing? Is it possible with wordpress?

-SIDEBAR- I developed 1 out of 4 of the scripts so far here on pythonanywhere. I was SUPER excited to get this done! I used the forums to find out how to upload a zip file to a directory here, used a bash console to unzip and show all of the .xls files and then spent two days trying to figure out that I couldn't use OPENPYXL for .xls, but had to use PANDAS and man, was that hard to figure out!! I finally did and had my 'aha' moment. Problem is, my coworkers are not coders and want something easier to use for when I leave or are not here to help. I'm going to try to get python installed on a computer here at work, but I'd love to just host everything online if possible - hence this post.

Hmm, it's certainly doable, but you'd need to learn a certain amount of web development to get it working -- the drag and drop stuff in particular would need some front-end code that you'd have to learn how to put together. It's all the kind of stuff you would be able to find by searching the Internet, though. Wordpress would probably not be the right tool, though -- it's more designed for largely-static blogs.

Perhaps a good starting point, at least to learn the basics of how to get a website that does some processing on an uploaded file and spits out the result, would be this blog post? The last step in particular deals with uploading a CSV file and summing the values, so you can perhaps extend that into something that handles your Excel files?

It's all the kind of stuff you would be able to find by searching the Internet, though. Wordpress would probably not be the right tool, though -- it's more designed for largely-static blogs.

Perhaps a good starting point, at least to learn the basics of how to get a website that does some processing on an uploaded file and spits out the result, would be this blog post?

Can any of this be done with flask on pythonanywhere? Thanks for replying!

What if it wasn't a website? Would this be easier if we could install python on the computers here and use the file directory?

Yes, it could probably be done with Flask and quite a lot of Javascript to handle the drag-and-drop in the client. It would probably also be easier as a desktop app than as a web app.

Okay, I'll try to go the desktop GUI route or just show them how to run the script and stuff. Thanks, glenn and giles!