Why I hate python
by - Thursday, January 1, 1970 at 12:00 AM
First, I prefer way more compiled languages that create standalone binary.Secondly, I think statically typed languages make code way cleaner, and work is easier for the dev.That's why I try to use it the least possible. But as you know currently lots of tools are developed with python so it's often required.Python is especially popular for cybersecurity/hacking scripting and AI. So I often download tools made with it.Some projects are available via pip and others as source code. Only a few are available from our main package managers (such as apt, brew) so you have to track apt, pip etc ...It would be way easier with only one.In most package managers, you can just search for a package by name. With pip I had to first download pip_search a third-party binary to be able to search through pypi.Projects not available on pip cannot be called from any directory in the terminal like other binaries. So you have to create a folder on your drive and "cd" in it each time you want to use them.Let's get to the biggest issue now. USABILITYAlmost all the time I try a python script or a project sometimes (even if it comes from pip) I get a stack trace back at my face. They simply don't work.Even worse, some works but stop working later... that's really frustrating...lets say dronesploit:[code]Traceback (most recent call last): File "/usr/local/bin/dronesploit", line 5, in from dronesploit.__main__ import main File "/usr/local/lib/python3.9/site-packages/dronesploit/__init__.py", line 3, in from sploitkit import FrameworkConsole File "/usr/local/lib/python3.9/site-packages/sploitkit/__init__.py", line 9, in from tinyscript.helpers.path import Path File "/usr/local/lib/python3.9/site-packages/tinyscript/__init__.py", line 13, in from .features import * File "/usr/local/lib/python3.9/site-packages/tinyscript/features/__init__.py", line 5, in from .handlers import * File "/usr/local/lib/python3.9/site-packages/tinyscript/features/handlers.py", line 9, in from ..helpers.constants import WINDOWS File "/usr/local/lib/python3.9/site-packages/tinyscript/helpers/__init__.py", line 26, in from .text import * File "/usr/local/lib/python3.9/site-packages/tinyscript/helpers/text.py", line 6, in import mdv File "/usr/local/lib/python3.9/site-packages/mdv/__init__.py", line 3, in from .markdownviewer import run, main File "/usr/local/lib/python3.9/site-packages/mdv/markdownviewer.py", line 160, in from markdown.util import etreeImportError: cannot import name 'etree' from 'markdown.util' (/usr/local/lib/python3.9/site-packages/markdown/util.py)[/code]Yes, most python scripts, projects, and tools from pip return this...[b]TLDR[/b]So to sum up, I hate python because of these points:[list=1][*]no standalone binary (could be achieved but really not optimized at all and really heavy)[*]not statically typed[*]Most tools not available in main package managers like APT[*]Lots of projects do not have a PIP package[*]PIP doesn't have basic search option like other packages managers like Homebrew[*]Most of scripts, tools just don't works (compatibility problems)[/list]
Reply
Im guessing that import error is because you didnt install dependencies listed in the requirements.txt file. PIP does have the ability to list and install the dependencies as well.

You could also try a tool like https://github.com/victorgarric/pip_search to search for pip packages.

Compatibility issues are mostly between python2 and python3 from what I've seen.

You can compile programs in python with: https://github.com/Nuitka/Nuitka
https://baph.is | Telegram: @enemy

Reply
(October 25, 2022, 11:57 PM)Baphomet Wrote: Im guessing that import error is because you didnt install dependencies listed in the requirements.txt file. PIP does have the ability to list and install the dependencies as well.

You could also try a tool like https://github.com/victorgarric/pip_search to search for pip packages.

Compatibility issues are mostly between python2 and python3 from what I've seen.

You can compile programs in python with: https://github.com/Nuitka/Nuitka


I installed dependencies but this step can be added again to annoying things about python.
About pip_search I talked about it in my post and also about python standalone "binaries". Which is in fact a really heavy fat file that contains the interpreter.
There again I tried it several times and got errors
Reply
I totally agree, that is the main reason I daily drive c++ now.
Reply
I understand your thoughts but I like Python because I'm not such a good programmer and it's better for the planet that I don't try to handle malloc in C :D
I eat chicken nuggets twice a day !
Why would anyone care ? 😎 

Still no answer to this question  :D
Reply
From my perspective, the biggest problem of python is that its type system is too lax. This leads to too many bugs.
Reply


 Users viewing this thread: Why I hate python: No users currently viewing.