r/learnpython • • Jul 17 '19

What is the point of python?

I have spent the last couple of days building a python program, and have only been learning python for a couple months or something at this point. I'm really happy with the progress that I've made, this program that I've been making is doing what I want it to and I was ecstatic when I went to bed at 3 am... lol

Today though all that excitement has burnt up trying to figure out how I'm practically going to use this program. The program was built to automate data entry for my job, I deliver pizza for my full time job right now. I'm never in front of a or my computer when I'm delivering pizzas. I was really hoping I could run the program on my android phone.

I tried to use chaquopy with android studio, but I have no experience with android studio so I couldn't figure out how to use it or how to install chaquopy to a AS project. Also python is my first programming language and I'm not ready to learn java just for the sake of making android apps. I also tried to use BeeWare but I think I'm to new to python to be able to use these tools. I also tried to use QPython, which would run the program just fine and I could do all the inputs required to go through my program. This program I'm making requires the writing and appending of files, and QPython wouldn't create or edit the file like it does from IDLE shell.

I'm really frustrated by this limitation, because everything I did was basically for nothing at this point. I've also thought about running teamviewer on my pc and then using the teamviewer android app, but in the past trying to control a pc from an android device in such a manner was very unwieldy and I don't think it would be worth the hassle.

Why is python so self contained and how does one get its usefulness in a more practical manner?

the program in question: https://github.com/itwasntzak/deliveryTracking

Edit: I've also somewhat looked into trying to run the program as a web app through googles app engine environment. Again, I feel I'm to inexperienced in this new vast world of programming to use this implementation. It's also not the most desired implementation, because I live in a very rural part of america. Verizon has a very strong monopoly where I live, I tried to get a cheap phone off amazon and this phone turned out to be GSM instead of CDMA. I got my service though straight talk and they have support for GSM, but only conditionally thought CDMA towers. I constantly lose service thought out the day, and have to restart my phone to get it to even connect to data. When it is connected, the vast majority of the time it is incredibly slow and takes for ever to load even the most basic webpages. This wouldn't be the best way to go for me either because I might spend more time waiting for the program to load and the automation benefits would probably be lost to the waiting times. \

Idk, I'm frustrated lol please give me some advice on what my best course of action will probably be!

1 Upvotes

24 comments sorted by

View all comments

2

u/Losupa Jul 17 '19

Python’s “purpose” is that it is an incredibly easy to learn language with a wide variety of packages run using an interpretator. This means the python code you write runs on any computer system as long as the interpreter and relevant packages are installed. In fact a lot of computationally heavy packages are just wrappers for C libraries (such as Numpy and Pytorch) which means that Python can be incredibly powerful as well.

This makes it great for prototyping and pumping out code quicker and easier than dealing with all the setup, compilation, and low-level problems you see in C++ code, and if you do it right it will take “relatively” the same time to run.

On that note, for your project specifically if you want to remotely use your program (from work or such) you can run it on a server of some sort and either ssh into it from your phone, or you can also make a website (on the same server as the script) and interact with the script using that.

1

u/itwasntzak Jul 17 '19

I did learn that it is one of the most easy languages to learn, with it also being extremely powerful. I read those two factors are what is leading it to be the most popular language in the future. When I ran into this limitation it just kind of put this thought in my head that it's very self contained like people made programs for their own needs and just ran them on their computers at home or if they worked in offices where they could install python and use an interpreter. It felt like it wasn't particularly practical from a consumer perspective, I know this is probably just my pessimism in response to the hurdle presented before me. I wasn't trying to talk bad about python as a hole, just what I was experiencing.

Thank you for both of those ideas on how I can make this work for my situation. I will learn about these and try to implement them! Thank you again!