Announcement

Collapse
No announcement yet.

busy learning Python

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    busy learning Python

    I finally dove in and started learning a programming language that can compile for Linux, namely Python. I had considered other languages like Java and C++, but Python it is. I've previously programmed in MS Visual BASIC, but that language is obsolete now; plus, it never could compile for Linux.

    I have utilities I want to write. The most important one is an application that monitors what political posts the user posts on the Internet and if they post something I don't approve of, a hand reaches out of their monitor, grabs them by the nape of the neck, and smashes their face into their keyboard. I think it will be a popular utility. I'll let you know how that one comes along. Thanks.
    Kubuntu 22.04 (desktop & laptop), Windows 7 &2K (via VirtualBox on desktop PC)
    ================================

    #2
    Originally posted by Tom_ZeCat View Post
    ..... an application that monitors what political posts the user posts on the Internet and if they post something I don't approve of, a hand reaches out of their monitor, grabs them by the nape of the neck, and smashes their face into their keyboard. I think it will be a popular utility.
    Ah, free speech for me but not for thee! A common theme on corporate websites like Facebook, YouTube and Twitter these days, just to name a few. The argument is that it is their website and they can impose what ever regulations they want, regardless of how draconian. It's like having gatekeepers on the Public Commons. If the King didn't like what you were saying you were removed from the Commons, if not thrown into a dungeon.

    I feel confident that the future holds some sort of Internet speech regulation, if the former chairman of the FEC, Ann Ravil, had her way. The Left wants to shut down Drudge, FoxNews, Brietbart, and various other websites. The Right wants to return the favor. Trump said that parts of the Internet should be shut down. A collection of viewpoints is here.

    I agree with your assessment. You app should be very popular because a LOT of people are intolerant of the views of others, despite their claims of "inclusiveness" and "tolerance", or shouts of support for the Constitution, especially on forums they control. But, speech regulation on the Internet will limit its useful life.

    During the last 10-15 years I've seen more "discussions" decline into name calling and invocations of Hitler than ever before. I closed my Facebook, Google accounts because they adopted the political theory that they could restrict what I posted on their sites, but had no problem allowing folks with alternate opinions (some wearing masks and attacking people and property) to post theirs. I spent a couple months on Gab.ai but found essentially no difference in attitude, so I dropped that site as well. The only site I post a political opinion on is this one, and not very often. In most other Internet forums (but not this one) political views have become so polar opposite that compromise is not really possible. How can one compromise any of the articles of the Bill of Rights and still claim to be free? Or, drop the Constitution in favor of the UN Charter? We are basically at Socialism vs Rule of Law under the Constitution, and the later is loosing.
    Despite the level of gun ownership in this country, the 2nd Amendment has had so many infringements that carrying a weapon in most public places, even concealed, is essentially impractical, if not illegal. Want to go to your grandson's baseball game? Leave your weapon in its gun safe. Doctor? Public buildings? While voting? Most public events? Ditto. Political Correctness has infringed the five freedoms enumerated in the 1st Amendment to the point that you feel compelled to muzzle posts on your site that you disagree with. The only avenue left open for "discussion" is the exchange of bullets, an outcome I've noticed that both the Far Left and the Far Right are hoping for.
    Last edited by GreyGeek; Apr 21, 2017, 09:05 AM.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      I don't personally think you can go wrong with Python. I'm partial to Python anyway, so a little bias there.

      Comment


        #4
        Originally posted by MoonRise View Post
        I don't personally think you can go wrong with Python. I'm partial to Python anyway, so a little bias there.
        Python is great, but the only drawback is that it doesn't have an integrated GUI dev tool to go with it. Then you encounter the problem of compatibility between releases of Python and any particular GUI tool you adopt to interface with your Python code. There was a great dev tool called Boa-Constructor, which was built with Python and used Python. It also had built into it a GUI dev tool and a Database tool. It was six components combined into one. But, the version compatibility problem and the deployment problem rendered impractical.

        That's why I opted for Qt.

        PS- I noticed that Boa-Constructor is in the repository and it uses wxWindows as the GUI component. It's release number is 0.16, so even after 15 years it hasn't reached 1.0. I've linked some screen shots of it. The biggest problem I had with it was that in certain situations the very place I needed to inject some of my custom code had "Don't edit this code" embedded in it. And, from the screen shots, I see that they've dropped the DB component.
        Last edited by GreyGeek; Apr 21, 2017, 09:17 AM.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Originally posted by GreyGeek View Post
          Ah, free speech for me but not for thee! A common theme on corporate websites like Facebook, YouTube and Twitter these days, just to name a few. The argument is that it is their website and they can impose what ever regulations they want, regardless of how draconian. It's like having gatekeepers on the Public Commons. If the King didn't like what you were saying you were removed from the Commons, if not thrown into a dungeon.

          I feel confident that the future holds some sort of Internet speech regulation, if the former chairman of the FEC, Ann Ravil, had her way. The Left wants to shut down Drudge, FoxNews, Brietbart, and various other websites. The Right wants to return the favor. Trump said that parts of the Internet should be shut down. A collection of viewpoints is here.

          I agree with your assessment. You app should be very popular because a LOT of people are intolerant of the views of others, despite their claims of "inclusiveness" and "tolerance", or shouts of support for the Constitution, especially on forums they control. But, speech regulation on the Internet will limit its useful life.

          During the last 10-15 years I've seen more "discussions" decline into name calling and invocations of Hitler than ever before. I closed my Facebook, Google accounts because they adopted the political theory that they could restrict what I posted on their sites, but had no problem allowing folks with alternate opinions (some wearing masks and attacking people and property) to post theirs. I spent a couple months on Gab.ai but found essentially no difference in attitude, so I dropped that site as well. The only site I post a political opinion on is this one, and not very often. In most other Internet forums (but not this one) political views have become so polar opposite that compromise is not really possible. How can one compromise any of the articles of the Bill of Rights and still claim to be free? Or, drop the Constitution in favor of the UN Charter? We are basically at Socialism vs Rule of Law under the Constitution, and the later is loosing.
          Despite the level of gun ownership in this country, the 2nd Amendment has had so many infringements that carrying a weapon in most public places, even concealed, is essentially impractical, if not illegal. Want to go to your grandson's baseball game? Leave your weapon in its gun safe.

          Doctor? Public buildings? While voting? Most public events? Ditto. Political Correctness has infringed the five freedoms enumerated in the 1st Amendment to the point that you feel compelled to muzzle posts on your site that you disagree with. The only avenue left open for "discussion" is the exchange of bullets, an outcome I've noticed that both the Far Left and the Far Right are hoping for.
          You're very sharp. You've correctly perceived my irritation over the anti-free speech crowd, and you're correct that they're on both the left and the right. I was going in circles on Facebook arguing the basic point that even someone I don't agree with still has free speech rights. I explained over and over that supporting someone's free speech rights is not the same thing as supporting his ideas. I even made an obvious example that when Jeffery Dahmer was arrested, I would have supported his right to an attorney and that if he were denied that right it would be a rights violation, but that doesn't mean I condone what he did. I've been disturbed by events at our universities where someone gets invited to speak, only to be shouted down or shut down via a fire alarm. There is exactly ZERO point in that. If people oppose someone who is coming to speak, they should let the person speak, attend the speech, and take copious notes. Then their efforts should go into a highly reasoned rebuttal. Doesn't matter who the person is.

          All I got were illogical answers like "You're supporting hate speech."

          We're better off allowing their ideas to get out there and then applying healthy skepticism to them.

          But reason is lost on people. If they're uncomfortable with some ideas, they just want them quashed. It's pathetic. As you correctly saw, that's the source of my satiric app. In any event, the study of Python has been a welcome diversion from putting up with dogmatic screamers on both the left and the right.
          Kubuntu 22.04 (desktop & laptop), Windows 7 &2K (via VirtualBox on desktop PC)
          ================================

          Comment


            #6
            Well, speaking from experience, you'll LOVE Python!


            Sent from my iPhone using Tapatalk
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Oh yes, learn Python.

              And use Qt as GG suggests. PyQt is a pretty well established set of bindings and both Python and Qt have excellent documentation.

              As for IDEs, I've been using Eric - Eric IDE for Python - geddit? But it isn't very well documented and lacks some features like navigating to a declaration. I'm thinking of trying Eclipse with PyDev.
              I'd rather be locked out than locked in.

              Comment


                #8
                Originally posted by SecretCode View Post
                Oh yes, learn Python.

                And use Qt as GG suggests. PyQt is a pretty well established set of bindings and both Python and Qt have excellent documentation.

                As for IDEs, I've been using Eric - Eric IDE for Python - geddit? But it isn't very well documented and lacks some features like navigating to a declaration. I'm thinking of trying Eclipse with PyDev.
                Thanks. I may try those IDEs at some point. Right now I'm using two IDEs, PyCharm and Geany. I downloaded PyCharm after a google of "best Python IDE" and found a lot of people recommending it. Plus, I was pleased that there's a free version and it's available for Linux, Windows, and Mac. I'm also using Geary because it's what the author of the Python book that I bought uses (Eric Matthes).

                For now I'm using tkinter for creating GUIs, but I may very well try PyQt at some point, but I'll learn tkinter first. Some of the Python-based GNU freeware that I use are made with tkinter, and so I'll need to know that if I want to make any alterations to those applications. It does make me miss the ease with which I used to create a GUI in VB by just dragging and dropping controls onto a form, but I'll manage.

                I'm looking forward to getting up to speed in Python so that I can re-write some utilities that I wrote in VB. If you're curious, I wrote a multiple file renamer that's template based in VB. It was named RenameStar, and it's still possible to download it here:

                http://www.aplusfreeware.com/categor.../renaming.html

                There's no Linux version, obviously, since I wrote it in VB 6, but it does still run under Windows, and it even runs under Linux with WINE. Alas, the help system doesn't work out of the box because I wrote my help files in the old Win95 based WinHelp. However, up to Windows 8.x, you can still install WinHelp and thus get the help system working. Alas, I haven't found a way to get that working in Windows 10 or in Linux with WINE. Those are all reasons why I want to re-write this thing in Python. I also want to program in support for German and French this time around. My old version only supports English.
                Kubuntu 22.04 (desktop & laptop), Windows 7 &2K (via VirtualBox on desktop PC)
                ================================

                Comment


                  #9
                  One reason why tkinter is so popular among Windows users, IMO, (With MS's blessing) is that it is so thin, leading developers back to WIndows GUI dev tools.
                  Personally, I believe you are wasting your time learning tkinter (I went that route too, and found the tool very limited (i.e., "thin") when I later compared it to Qt.
                  PyQt is a better route. Also, it will be easier to create your executables and export them to other platforms.

                  But, your goal is to learn Python. And, I would suspect, use the binding tool that is so common among Linux desktops, like KDE. One of the problems you will encounter with Python tools which automatically generate GUI's, etc., is that at some point you are going to need to modify a generated script to insert some functionality that you want to add, and the script states plainly that and edits added to it will be lost in the next generation.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Originally posted by Tom_ZeCat View Post
                    It does make me miss the ease with which I used to create a GUI in VB by just dragging and dropping controls onto a form, but I'll manage.
                    Then you should most certainly look at Qt Designer, which does just that and is part of the Qt dev suite. Not specific to Python, but PyQt provides a util to compile Qt Designer's .ui files into .py code.
                    I'd rather be locked out than locked in.

                    Comment


                      #11
                      +1 to waht SecretCode says.

                      Some things never die in Linux. Tk/Tcl is one of them. Tkinter is the Python binder for them.

                      I evaluated that coding paradigm 15 years ago and as I look over its current offerings I see nothing that would motivate me to select it over Qt. Python3-pyqt5 is in the repository, along with Python3, and you can use PyQt5 to bind your code to your QtDesigner made GUI's. PyQt5-examples is in the repository. T GUI's offer Drag & Drop controls for a WYSIWYG experience. Add a rich selection pf properties and methods for each control, along with true OOP subclassing and you have BOTH power and ease of development. (There is a reason why Tkinter is called "thin") Qt's "Signal & Slots" technology makes "callbacks" an anachronism. Power combined with simplicity! The Qt5 development package is in the repository as "qt5-defaul". The Qt-SDK 5.8.0 GPL version is freely available from the web and includes qtcreator, IF you want to use it instead.

                      QtDesigner's visual output is stored as a *gui file and when the MOC (meta object compiler) is run (transparently during make) the binary gui is converted to a *.ui text file. (Some really powerful Qt coders write the xml *ui files directly by hand, but I only occassionally edited by hand the generated files.) The ui files make the use of version control software like git a snap.

                      I found that you get into a "catch-22" with Tkinter and GUI apps. Tkinter & tk & tlc are well documented with lots of examples, but they are all rather simplistic because their gui capability is thin. When you upscale to the more powerful wxPython (wxWidgets, wxWindows) you have a richer environment but much poorer documentation because fewer are using them. Then you come to the task of compiling your app to an exe or ELF binary. Py2exe or cx_freeze I found to be very version control specific and temperamental. It was getting an executable to run on the application server that became the stumbling block. Several different packages, each with their own version levels, some compatible, some not, and getting the dependencies migrated to 400+ workstations was the deal breaker.

                      With Qt all I had to do was drop the executable onto the server and that was it. Those were the same problems that plagued Python + ZOAP (Boa-Constructor, which is in the repository).

                      IF all you want to do is learn Python then focus on it and CLI applications that don't require a GUI. My final advice is don't get stuck on a deserted island and watch the sea slowly rise.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment

                      Working...
                      X