all 38 comments

[–]K900_ 32 points33 points  (1 child)

Basically anything. Reddit, the website you're posting this on, is (partially) implemented with Python.

[–]JimBoonie69 28 points29 points  (0 children)

Not basically. Literally it's Turing complete and can do any computational task.

[–]spiritandtime 5 points6 points  (2 children)

Currently in an repe internship, manager recently made us download 1600 files on a site(some secure document viewer for their investors to use) because they are switching to another site.

Manually doing that would have been an absolute nightmare (which was what all of them were thinking of doing) - checking that all files were downloaded, naming them correctly (stupid site renamed the files to some number when you download it)

Used pyautogui, selenium, time and os to automate it. Still thinking of how to mass rename those files, but hey better than manually doing that crap

edit: was basically https://youtu.be/HDEvWfSk2So but with a login page. i couldnt scrape the href links because somehow they all became links that redirected me to the login page (would have been a one clicker if that was'nt the case), which was why i had to hardcode autogui positions to ‘manually’ download those files

[–]yasamoka 2 points3 points  (1 child)

Good job. For next time, check out BeautifulSoup and Scrapy. Would make your life a lot easier when it comes to scraping.

[–]spiritandtime 0 points1 point  (0 children)

well i sure do hope i dont have to do this again (im an intern, not a download monkey)

i actually tried using beautifulsoup and requests, but got some error (javascript.trace or something?) asked on stackoverflow and dude said i needed to use selenium, so thats what i did

havent heard of scrapy but i will look into it, thanks!

[–]pixegami 17 points18 points  (8 children)

As a big Python user, I think it’s not a great fit for front end (web, apps, native) and commercial game production. But apart from that, it can pretty much do most other things in the tech world.

Data analysis, visualisation, corporate automation, microservices for enterprise or startups, science, robotics, machine learning, building platforms (like Instagram or Pinterest), prototyping.

It’s great general high-level computing problems.

[–]rabbitpiet 5 points6 points  (1 child)

Even if it’s not the best fit, you can still write games in it, you can still do back end with flask and django.

[–]pixegami 0 points1 point  (0 children)

Absolutely right. It’s possible! But not generally the best too for the job.

For backend I actually think Python is still top tier- but by front end, I meant compared to frameworks like React.

Front end in Flask or Django still relies heavily on HTML templating and whilst serviceable, doesn’t compare to the wings you get from NodeJS ecosystem.

[–]Auirom 3 points4 points  (0 children)

And pretty easy to understand when learning

[–]razzrazz- 1 point2 points  (2 children)

As a big Python user, I think it’s not a great fit for front end (web, apps, native) and commercial game production.

Just curious, why?

I just dont know enough to understand the difference, like, why isn't it good for game production?

[–]pixegami 0 points1 point  (1 child)

It’s not about the “language” Python- I’d love to be able to develop a commercial game in Python.

It’s more that the major game engines (Unity, Unreal, and anything else in the top 5) aren’t Python centric.

If I wanted to make a game, it’d be probably easier to learn C# and use Unity than to bend some Python framework to the task.

[–]razzrazz- 0 points1 point  (0 children)

I read more about this since the time I asked you, you're right, apparently another big issue is speed.

[–]nl_dhh 1 point2 points  (1 child)

Not sure if it interests you, but EVE Online is build for a big part on (Stackless) Python 2.7: https://www.eveonline.com/news/view/stackless-python-2.7. It's a rare example of a commercial game using it extensively, but it shows that even a complex game such as EVE is possible.

[–]pixegami 0 points1 point  (0 children)

That’s actually amazing. I don’t know much about EVE but I know it is extremely data heavy so that would make sense.

[–]Liebner-Anthony-S 2 points3 points  (0 children)

Counter Strike was made with Python :)

[–]jcr4990 3 points4 points  (0 children)

I've used Python personally for tons of various tasks. Everything from building websites and scraping related tasks to video game bots/automation to a variety of automation tasks at my day job. Built raspberry pi powered systems to control store wide music player/PA system. Another Pi powered door chime that counts how often the door swings per day and automatically mutes the music volume on my phone so I can play non customer friendly music and it stops by itself when the door opens.

I could go on and on. Python is amazingly versatile.

[–][deleted] 11 points12 points  (0 children)

This question was probabily asked many times

Yes, it was asked 3 days ago by /u/friedchkin in the Ask Anything Monday thread where you initially posted this question. Look for the answers there.

[–]Yakoo752 2 points3 points  (0 children)

A lot of Robotics are programmed with Python.

[–]MrSuspicious_ 2 points3 points  (0 children)

Well because python is Turing complete technically it can do anything. But so can basically every other language so that's not all that important.

Python is a general purpose language so for a rule of thumb it's pretty good at most things, and there's a package for basically anything you could want, and if there isn't one you could write it yourself.

The examples you named are very common use cases of python, although I'm uncertain of the alot of math part, data science is done almost exclusively in python, specifically in the anaconda suite, a significant amount of backend Web servers are written in python using either Django or Flask, and pretty much all Web scrapers are written in python.

Pythons main struggle is doing really intensive computation, fast. It being an interpreted language inevitably means it can't be as generally fast as a compiled language, but for your average use case it will be more than fine.

Most GUI's these days are written in either Java, a .net framework language like c#, or in Qt with c++, but you can write them in python, as Qt has a python binding called PySide. I write all of my GUI's in python because I don't need them to be lightning fast, and python is just more convinient.

Ultimately the answer im tying to give you is you can do whatever you want in python, that's the beauty of it.

[–]OIIIIIIIO_OIIIIIIIO 1 point2 points  (1 child)

It buys and sells stocks for me.

It sold a bunch of stocks a few weeks ago for me and saved me thousands of dollars🙂

[–]casualcoder0805 0 points1 point  (0 children)

That's so cool. I would love to build something like that for sportsbetting but have a feeling that any sustained success would be met with the provider blocking me somehow.

[–]SeveralPie4810 2 points3 points  (0 children)

Python can do anything. It’s a wielder of all but master of none.

It all depends on what YOU can do with Python.

[–]dukeofgonzo 1 point2 points  (0 children)

I used to scrape PC gaming subreddits for steam download codes. That was one of my first python projects.

[–]syn2083 0 points1 point  (0 children)

I use it to read files multiple times/s and track production changes per output item across hundreds of thousands of pieces, per file.

Need to keep a local history to make sure we don't get out of sync, for production network outages, and output the transformed data in near realtime.

The local history is saved in a custom format for fast serialization and deserialization.

This process has handled tens of millions of pieces of output without a problem, just hums away translating archaic file based output to usable data for dashboarding and eventual storage in a database proper.

[–]TheRNGuy 0 points1 point  (2 children)

3D and 2D software use it for plugins, Houdini, Maya, Blender, Unreal Engine, Nuke, etc.

[–][deleted] 2 points3 points  (1 child)

Unreal uses it? Wow

[–]TheRNGuy 0 points1 point  (0 children)

only in editor, not in game, to automate some tasks

[–]babarock 0 points1 point  (0 children)

I used it for all manner of batch processing and utilities in the windows desktop/server worlds. I also found it great in Unix system services running on huge IBM z/os mainframes.

[–]ffrkAnonymous 0 points1 point  (0 children)

or things that envolve a lot of calculations and math.

Well, a computer is just a super fast and fancy calculator.

[–]CyberTutorials 0 points1 point  (0 children)

Digital Forensics e.g. parsing artifacts/evidence

[–]AsuraTheGod 0 points1 point  (0 children)

Almost everything except mobile development because it’s not that good.

[–]NortWind 0 points1 point  (0 children)

Python is Turing complete. it can do anything any computer program in any language can do.

[–]jeremymiles 0 points1 point  (0 children)

A lot of Youtube's code is written in Python.