r/learnpython • • Nov 19 '19

My first application!

In October I started my Python-journey, with a full time job and a 2yo kid the spare time is scarce.
I've been following a Udemy-course and also used some android-apps to just study something every day.
2 weeks ago I made my first real script from scratch, I had a idea of automating / helping with a tedious task at work. I'm a train driver, and every train we start we fill a paper form, check some values from 2 different paper lists and enter some of that data into the control computer.

The script were terminal based and did all the calculations I wanted, checked up the values from those 2 lists (one which is short, so I just made an elseif of it, the other is long so I made a .txt with the values) and gave a summarized result.

Now 2 weeks later I've deployed it on the web with Flask to be able to share with my colleges!
With dropdowns, forms to fill and a button to run the scripts and show the result.

Thanks to inspiration from this subreddit (and others) I made it working! It's plain ugly, but the functionality is there. Guess I'll come back and sort the design with bootstrap or at least some css'ing next time I feel a dip in the studying.

I dno if there's a better way to post a image, but here's one:
Image of the result with explanations

407 Upvotes

72 comments sorted by

View all comments

2

u/mangoed Nov 19 '19

I'm more impressed by a Flask application than calculations. Learning Flask seems more time-consuming than learning the basics of Python.

1

u/Mag37 Nov 20 '19

The Flask bit was tough, still not entirely sure I understand it and I don't even use the blocks and connections, it's only one page! I'll look into expanding it a tiny bit with some bootstrap and maybe a header or so with links. But it's doable, there's a lot of good videos on Flask depending on what you want to do. It'd be good to have some better understanding of JS and html than I do thou ^ to make something nice.

2

u/mangoed Nov 20 '19

Thanks! One of my next goals is to replace some of the WordPress sites that I manage with Flask apps, mostly because I hate PHP (especially for larger projects), and although there is a huge number of WP plugins available for any imaginable task, sometimes it's still difficult to get exactly what you want. I guess that I would have to learn a lot before I can do that with Flask, I think I already found all the resources that I need, just need to spend more time learning stuff.