Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. what is the fascination with Python ? ( CAUTION semi-programming rant )

what is the fascination with Python ? ( CAUTION semi-programming rant )

Scheduled Pinned Locked Moved The Lounge
questionpythonlinuxannouncement
46 Posts 22 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J jana_hus

    I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?

    P Offline
    P Offline
    Peter Adam
    wrote on last edited by
    #21

    Python is popular because - it is user-friendly: tab vs. space is matter of life and death, case sensitive, uses == as 'equal' - it is finance-friendly: no fixed-point datatype

    C 1 Reply Last reply
    0
    • T trønderen

      When I first encountered Python, we were still back in the days when there were people claiming that Python development were just soooo much faster, because you didn't have to wait for the code to be compiled before running. This was a very common argument in favor of interpreted languages way back to BASIC. Showing those people that pressing F5 gets the program running almost immediately after a code update has no impact. At one occasion, I showed one of those Python guys a compilation log showing that on our main compiler server, a complete rebuild compiled on the average 8 modules per second; it had no impact. I haven't been around Python code development for 3-4 years, but even then, a number of Pythogonists brought up this argument that you could just type and run, no waiting for compilation. This was particularly prominent among the juniors, two years earlier still in college. So it seems like universities and colleges push this idea that even incremental compiling, precompiled headers and similar speed-ups cannot possibly make compilation fast enough to be useful for development work. Truth is, of course, that Python has been high academic fashion for a number of years, and you don't risk your academic reputation by checking out un-fashionable alternatives, which might possibly indicate that high academic fashions doesn't match reality. It is much safer to run with the herd you are in.

      Religious freedom is the freedom to say that two plus two make five.

      P Offline
      P Offline
      Peter Adam
      wrote on last edited by
      #22

      Compiled power and compiler speed in one: Delphi.

      1 Reply Last reply
      0
      • J jana_hus

        I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?

        P Offline
        P Offline
        Peter Shaw
        wrote on last edited by
        #23

        Funny enough, I find myself asking this EXACT same question this morning. I checked in on a start-up project I'm part of, and noted an eMail from the "Cellular Modem" developer we have working out the AT commands required to talk to MS-Azure. Over the course of the past 3 weeks, I personally have built and put in place a modem framework in our IoT application code base. I have provided EVERYTHING needed from turning certificates into byte arrays, and providing methods to load, unload them, I have provided a comprehensive framework that allows AT strings to be sent to and the answers received back from the modem easily. I have EVEN compiled that code into a PC/X86 library and with the aid of a console mode program running under visual studio, it can be used to send and receive AT commands, work with certificates and everything else needed, using exactly the same API on a PC, with the modem connected via a USB to serial cable. The "Modem Developer" has spent all day last Friday, making his OWN serial cable for the modem board, writing a Python library to drive that serial cable using his own Python based "development tools", and he has made a new python test suite that allows him to send string to the modem, get the answers back, and hit a button to make the python code generate new C code that interfaces with my API. When asked why... "Beacuse I find it easier", came his answer... :-S So it was easier for him to build an entirely new Python layer on top of the work I'd already done, instead of just typing in AT strings into a console mode app in V-Studio and hitting Ctrl+Alt+B to compile it, then F5 to run it??? I really, really, really just don't get it either. If I was starting from scratch on a PC, and doing this testing then yes, maybe... but I'd still use the standard serial access libs, and an already provided USB to Serial cable (Which we provided to him in the box with the modem board), I wouldn't take an FT232H write my own user mode WinUSB driver for it, invent my own protocol, wire it up to a MAX232 so I could connect to a normal RS232 9PIN connector, then write my own framework around it, then write a code generator to generate C code on top of that!! That's just plain madness. So yes, sigh.... I find myself asking the same question.

        C 1 Reply Last reply
        0
        • T trønderen

          Please note that there is an ocean between criticism and hate. I claim my full freedom to criticize both Python and other phenomena, without being called a 'hater'. (I know of nations that accept no critical remarks to their foreign policy, without labeling as 'hate' of the population of the nation, but here, we should try to act as professionals and accept disagreements. I even claim my right to dislike some phenomenon without therefore being labeled as a 'hater' of it.

          Religious freedom is the freedom to say that two plus two make five.

          C Offline
          C Offline
          charlieg
          wrote on last edited by
          #24

          If professionals cannot have a heated argument or debate, we are doomed. It's how stuff gets done. Otherwise, we have meetings into mediocrity and stuff blows up. We don't need any more facilitators, we need boxing gloves. I like your attitude.

          Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

          1 Reply Last reply
          0
          • P Peter Adam

            Python is popular because - it is user-friendly: tab vs. space is matter of life and death, case sensitive, uses == as 'equal' - it is finance-friendly: no fixed-point datatype

            C Offline
            C Offline
            charlieg
            wrote on last edited by
            #25

            "finance-friendly" - thought for sure you were going to say "free." honestly though, when I saw that tab/space meant different things, I just moved on. Kiddie language, but that's just me.

            Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

            1 Reply Last reply
            0
            • P Peter Shaw

              Funny enough, I find myself asking this EXACT same question this morning. I checked in on a start-up project I'm part of, and noted an eMail from the "Cellular Modem" developer we have working out the AT commands required to talk to MS-Azure. Over the course of the past 3 weeks, I personally have built and put in place a modem framework in our IoT application code base. I have provided EVERYTHING needed from turning certificates into byte arrays, and providing methods to load, unload them, I have provided a comprehensive framework that allows AT strings to be sent to and the answers received back from the modem easily. I have EVEN compiled that code into a PC/X86 library and with the aid of a console mode program running under visual studio, it can be used to send and receive AT commands, work with certificates and everything else needed, using exactly the same API on a PC, with the modem connected via a USB to serial cable. The "Modem Developer" has spent all day last Friday, making his OWN serial cable for the modem board, writing a Python library to drive that serial cable using his own Python based "development tools", and he has made a new python test suite that allows him to send string to the modem, get the answers back, and hit a button to make the python code generate new C code that interfaces with my API. When asked why... "Beacuse I find it easier", came his answer... :-S So it was easier for him to build an entirely new Python layer on top of the work I'd already done, instead of just typing in AT strings into a console mode app in V-Studio and hitting Ctrl+Alt+B to compile it, then F5 to run it??? I really, really, really just don't get it either. If I was starting from scratch on a PC, and doing this testing then yes, maybe... but I'd still use the standard serial access libs, and an already provided USB to Serial cable (Which we provided to him in the box with the modem board), I wouldn't take an FT232H write my own user mode WinUSB driver for it, invent my own protocol, wire it up to a MAX232 so I could connect to a normal RS232 9PIN connector, then write my own framework around it, then write a code generator to generate C code on top of that!! That's just plain madness. So yes, sigh.... I find myself asking the same question.

              C Offline
              C Offline
              charlieg
              wrote on last edited by
              #26

              this is not a python problem. Where's the boss?

              Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

              P 1 Reply Last reply
              0
              • H honey the codewitch

                I think it needs updating precisely because it's being used. New language features are added, etc. C# is onto version 10 or something now, so it's not just Python. My problem with Python is I believe that all my source code should be visible to the naked eye. Python breaks that rule by making whitespace part of the source code. That inspires violence in me. So I don't use it. And when I tell other people why they shouldn't use it, particularly for embedded systems, I just show them this: How fast is Python? - MicroPython versus C++ - YouTube[^] It even covers the issue of lack of decent python bindings for good libraries.

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                C Offline
                C Offline
                charlieg
                wrote on last edited by
                #27

                honey, you owe me something. I don't know what just yet, but that video was just mind blowingly painful to watch. Took me a while to get to it, I was watching cat videos. Python has no business being in an embedded environment in any serious role.

                Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                H 1 Reply Last reply
                0
                • C charlieg

                  honey, you owe me something. I don't know what just yet, but that video was just mind blowingly painful to watch. Took me a while to get to it, I was watching cat videos. Python has no business being in an embedded environment in any serious role.

                  Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #28

                  charlieg wrote:

                  Python has no business being in an embedded environment in any serious role.

                  The video did its job.

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  C 1 Reply Last reply
                  0
                  • H honey the codewitch

                    charlieg wrote:

                    Python has no business being in an embedded environment in any serious role.

                    The video did its job.

                    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                    C Offline
                    C Offline
                    charlieg
                    wrote on last edited by
                    #29

                    good morning. My eyes are still watering.

                    Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                    H 1 Reply Last reply
                    0
                    • C charlieg

                      good morning. My eyes are still watering.

                      Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                      H Offline
                      H Offline
                      honey the codewitch
                      wrote on last edited by
                      #30

                      Python does that to me too.

                      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                      1 Reply Last reply
                      0
                      • C charlieg

                        this is not a python problem. Where's the boss?

                        Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                        P Offline
                        P Offline
                        Peter Shaw
                        wrote on last edited by
                        #31

                        on holiday apparently. :-) (I've just been told in the last couple of hours)

                        C 1 Reply Last reply
                        0
                        • P Peter Shaw

                          on holiday apparently. :-) (I've just been told in the last couple of hours)

                          C Offline
                          C Offline
                          charlieg
                          wrote on last edited by
                          #32

                          I have realized that if Russia wanted to invade Europe, it would be in August. :)

                          Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                          P 1 Reply Last reply
                          0
                          • J jana_hus

                            I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?

                            P Offline
                            P Offline
                            pibbur
                            wrote on last edited by
                            #33

                            In case somebody hasn't already posted it: The pope recommends Python (https://www.bbc.com/news/technology-67209806 Admittedly a bit strange that the holy see recommends a snake. pibbur

                            D 1 Reply Last reply
                            0
                            • J jana_hus

                              I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?

                              M Offline
                              M Offline
                              Mike Breeden
                              wrote on last edited by
                              #34

                              Python is a very simple language compared to C#, C++, Java, etc. Last I checked, C# had over 30 Generics. Really, you only need the three that Python has: Dictionary, List, Queue and the C# ones are specialized variation on those. There is a lot of that, maybe called language bloat. I like C#, but could live with Python easily enough.

                              O 1 Reply Last reply
                              0
                              • C charlieg

                                I have realized that if Russia wanted to invade Europe, it would be in August. :)

                                Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                                P Offline
                                P Offline
                                Peter Shaw
                                wrote on last edited by
                                #35

                                YEP!!!! I'm also working on a project that includes a large number of French folks, and damn I've been sat twiddling my thumbs for most of the last 2 weeks, and probably the next 4 too. 😂😂😂😂😂😂

                                C 1 Reply Last reply
                                0
                                • J jana_hus

                                  I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?

                                  B Offline
                                  B Offline
                                  brucelehmann
                                  wrote on last edited by
                                  #36

                                  I use Python because it has a HUGE library of math, data plotting and other functions. Many of these libraries are in C/C++ or Fortran, so run fast, and have a long legacy or are actively maintained, so are reliable. I also use Python for machine learning where most of the work is data or method exploration and the immediate running of code cells (in Jupyter, for instance) allows fast iteration of the code. On the other hand, I wouldn't use Python for a time-critical real-time system, although I have used it to interface with Arduino's and data acquisition boards. However, Python is not that much slower than compiled languages unless the run-time is very long. Even then, if the code is solving big matrices then most of the time is in Fortran anyway. From my understanding, the reduction in speed in Python is mainly to do with it not being a typed language: the interpreter has to figure out the data type on the fly. I'm not sure why this has to be since best coding practice is to use type-hints, which can be statically checked, but are ignored by the interpreter. I don't see why type-hints, if present, can't be used by the interpreter to enforce typing. As to the comments about using white-space for formatting, I was already indenting to make the code readable so ; and {} are redundant to me and now seem like clutter whenever I work in C/C++/Java/PHP.

                                  1 Reply Last reply
                                  0
                                  • H honey the codewitch

                                    I think it needs updating precisely because it's being used. New language features are added, etc. C# is onto version 10 or something now, so it's not just Python. My problem with Python is I believe that all my source code should be visible to the naked eye. Python breaks that rule by making whitespace part of the source code. That inspires violence in me. So I don't use it. And when I tell other people why they shouldn't use it, particularly for embedded systems, I just show them this: How fast is Python? - MicroPython versus C++ - YouTube[^] It even covers the issue of lack of decent python bindings for good libraries.

                                    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                                    S Offline
                                    S Offline
                                    sasadler
                                    wrote on last edited by
                                    #37

                                    Gack, I can't even imagine considering using Python for embedded work. About the only interpreter-ish language I'd consider for embedded work is Forth. I'd worked a bit with the guys from Forth Inc. years ago and they seemed to do a lot of embedded stuff with their version of Forth. The majority of my embedded career was C/C++. Pretty much every processor I worked with had a C/C++ compiler available.

                                    1 Reply Last reply
                                    0
                                    • T theoldfool

                                      Lots of libraries, good for non-programmers to solve problems for academia, IT folks to automate stuff, non-programmers to program and programmers to do one off stuff. The AI stuff done by Chris uses python because there is a lot of image AI stuff available. I would guess that his alternative is a lot of time spent with C++ or C# or assembler. Don't know. I do know it works very well with BlueIris. I automated some backup stuff via a python script that uses robocopy to copy stuff to NAS and removable, sends emails based on results and then uses powershell to eject the removable. Why would I want to use something else? Well, most of it was done previously with VBScript. If you decide to hate python, you can easily jump all over the white space thing and the rules for tabs and spaces (piling on is fun). If you just want to solve a problem, you don't care. I tested some scripts for syslog servers, then converted to C# with some GUI. Handy and easy with all the libraries. Haters will hate, fanboys will worship, the rest of us just use whatever tool we think will get the job done. Applies to everything. Well, I did hate Fortran back in the day. :)

                                      >64 It’s weird being the same age as old people. Live every day like it is your last; one day, it will be.

                                      D Offline
                                      D Offline
                                      Derek Hunter
                                      wrote on last edited by
                                      #38

                                      I second this. Python scripts are easy enough to write and quick enough to execute that we can iteratively automate stuff that would not otherwise be automated. Because Python libraries are available to do almost everything, we now have a series of Python-based solutions where previously we had C, C++, Java and even Pascal.

                                      1 Reply Last reply
                                      0
                                      • T trønderen

                                        theoldfool wrote:

                                        Lots of libraries, good for non-programmers to solve problems for academia, IT folks to automate stuff, non-programmers to program and programmers to do one off stuff.

                                        As if that is something particular to Python? When you have to go outside the language itself to defend it, then I start questioning the language qualities. Isn't the language itself the essential when evaluating a language? It is OK after pointing out seven essential qualities of the language, not commonly found in other languages, to add: 'Besides, the ecosystem around the language is really strong, with lots of good languages'. Without stating a single unique (or rarely found) quality of the language itself, I might as well go looking for other ecosystems, preferably those adapted to several languages. It reminds me of the old Internet stack - OSI stack wars, essential in the 1990s: Neither during the network wars nor later have I found any person willing to argument in favor of the qualities of the Internet protocols as such. Sure, it was more widespread. Sure, you could get the specs for free. Sure, half of the protocol acronyms started with 'S', for 'Simple', suggesting that if a 3rd year college student couldn't implement it as a homework assignment, then the feature was not included in the protocol. (That has changed in recent years, though - there are reasons why TCP is provided with the OS!) Lots of other ecosystem arguments were brought fort in favor of Internet, but never the quality of the protocol design. I like dotNET for being language agnostic. You can create a library in any language for which there is a dotNET compiler - and that compiler is independent of the CPU, instruction set, addressing modes etc. An voila! The library is available for any other dotNET application development, regardless of programming language! A small reservation: As far as I know, Python is available for dotNet. I wouldn't at all be surprised if it requires its own Python libraries and can_not_ utilize standard dotNet libaries. That would be in the typical Python style - Python people traditionally insist on having their own sandbox, completely unwilling to make adaptions to the myriad of great libraries out there, and doing nothing to make these allegedly super great Python libraries available to anyone else. If you want to play in our sandbox, you must play Python, or get away from us and our sandbox!

                                        Rel

                                        D Offline
                                        D Offline
                                        Derek Hunter
                                        wrote on last edited by
                                        #39

                                        trønderen wrote:

                                        When you have to go outside the language itself to defend it, then I start questioning the language qualities.

                                        By 'qualities' do you mean syntax? Or something else?

                                        T 2 Replies Last reply
                                        0
                                        • P Peter Shaw

                                          YEP!!!! I'm also working on a project that includes a large number of French folks, and damn I've been sat twiddling my thumbs for most of the last 2 weeks, and probably the next 4 too. 😂😂😂😂😂😂

                                          C Offline
                                          C Offline
                                          charlieg
                                          wrote on last edited by
                                          #40

                                          Story from long ago, I worked in a division in the US that was owned by Belgians. One Wednesday, there was a problem discovered and we worked 10 hour days and through the weekend, because it was described as a "high visibility emergency." We fixed the problem and called them on Monday. Turns out there was only one person there (to answer phones). The tech staff had all left for their August holiday, even the guy screaming the week before. Hmm, guess who never got special service or sympathy from that point on?

                                          Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups