Advice for non programmer looking to learn Python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ananth21
    New Member
    • Oct 2011
    • 13

    Advice for non programmer looking to learn Python

    my profession is completely unrelated to computer science,,
    still for no proper reason i wanted to learn programming and chose python.i started out with apress python for absolute beginners(book) ,then bought o'reilly learning python, i wanted to know if it is possible for a non-professional to learn programming,,if yes, can anyone show me a direction to learn python so that i can fulfill my dream to become a programmer.

    thank you
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    It sounds like you have made a good start. I learned Python from scratch (still learning!). I think the best way to learn is by doing, so decide what you want a Python script to do for you and go from there. Start simple. There are several good Python resources on the internet with sample code. Post back with any questions. Good luck!

    Comment

    • ananth21
      New Member
      • Oct 2011
      • 13

      #3
      thank you for responding so quickly.
      presently,, i have fairly good idea about core data types,functions ,module and package imports and some
      insight into OOP , i didnt yet cover advanced topics(at least
      in my perspective!) like operator overloading,met aclasses, decorators etc.. do i have to have thorough knowledge in all of these topics to start learning GUI , and what is the best GUI tool to begin with?

      ..and next time i will come back with proper questions in python.
      thank you once again.

      Comment

      • dwblas
        Recognized Expert Contributor
        • May 2008
        • 626

        #4
        There are a lot of good online sources as well




        Comment

        • ananth21
          New Member
          • Oct 2011
          • 13

          #5
          thank you dwblas
          will look into those links

          Comment

          • bvdet
            Recognized Expert Specialist
            • Oct 2006
            • 2851

            #6
            You don't need to know the "advanced" topics to venture into GUI programming. There are several good GUI "toolkits" for Python. Most of my experience is with Tkinter. Do a web search and you will find several good resources.

            Comment

            • ananth21
              New Member
              • Oct 2011
              • 13

              #7
              yes, thank you "bvdet".
              i tried to understand a simple GUI code in Tkinter,,but frightened by
              words like events and event loops.then i understood i have to understand something called event-driven programming.i found this nice
              material on the same topic: http://eventdrivenpgm.sourceforge.ne...rogramming.pdf
              i think its enough to understand the semantics of GUI programming, to get started.am i right?

              Comment

              • bvdet
                Recognized Expert Specialist
                • Oct 2006
                • 2851

                #8
                An event can be a number of things. A mouse click or key release are two comment events. The internet material you found contains helpful information.

                An event object is transparently passed to a callback function of an event that was bound to a widget. A button command receives no event object. That was confusing to me at first.

                Comment

                • ananth21
                  New Member
                  • Oct 2011
                  • 13

                  #9
                  "bvdet" can you elaborate this: "An event object is transparently passed to a callback function of an event that was bound to a widget. A button command receives no event object. That was confusing to me at first. " sorry if iam boring.
                  i will study some more on this topic so that my posts could be more productive.
                  thank you "bvdet"

                  Comment

                  • bvdet
                    Recognized Expert Specialist
                    • Oct 2006
                    • 2851

                    #10
                    Following is a simple example. Widget method bind is used to bind an event to a widget. Tkinter.Button is commonly configured with a command, but an event can be bound to it as well.
                    Code:
                    .... snip ....
                    def handler(event):
                        return "some object or value"
                    
                    btn = Tkinter.Button(parent, text=name, padx=5, pady=5,
                                         bd=4, bg='#ff0', fg="#00f",
                                         activebackground = "#00f",
                                         activeforeground = "#ff0",
                                         font=("Arial", 16, "bold"),
                                         relief='raised', command=None)
                    btn.pack(side="left", fill=BOTH, expand=1)
                                         
                    btn.bind("<ButtonRelease-1>", handler)
                    .... snip ....

                    Comment

                    • dwblas
                      Recognized Expert Contributor
                      • May 2008
                      • 626

                      #11
                      Tkinter links that I use all the time


                      Comment

                      • ananth21
                        New Member
                        • Oct 2011
                        • 13

                        #12
                        those Tkinter links are very useful for a beginner like me
                        thank you

                        Comment

                        • Glenton
                          Recognized Expert Contributor
                          • Nov 2008
                          • 391

                          #13
                          If you're looking for little projects to practice on, try Project Euler

                          Comment

                          • sierra7
                            Recognized Expert Contributor
                            • Sep 2007
                            • 446

                            #14
                            Go to www.lynda.com for online tutorial.
                            Some of the lessons are free but you will have to enrol at a modest price to complete the course.

                            Comment

                            • ananth21
                              New Member
                              • Oct 2011
                              • 13

                              #15
                              the online tutorial link is good.
                              can any one suggest how to get started with Django?
                              i may sound bit over-ambitious but i am just curious,
                              thank you for the responses.

                              Comment

                              Working...