Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Python in One Easy Lesson  (Read 17637 times)

0 Members and 2 Guests are viewing this topic.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Python in One Easy Lesson
« on: January 04, 2014, 07:35:21 PM »
Here 'ya go!  ;D
Python in One Easy Lesson
Quote
By Nick Parlante Nov 2010
This is a one-hour introduction to Python used for Stanford's CS107. This material should work as an introduction for any experienced programmer.
Give me about 12 hours, please:-\

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Python in One Easy Lesson
« Reply #1 on: January 09, 2014, 08:31:26 AM »
I have been going over Snake Wrangling with my kids the last few months when i can pull them away from their electronics.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Python in One Easy Lesson
« Reply #2 on: January 09, 2014, 08:16:48 PM »
Quote
I have been going over Snake Wrangling with my kids the last few months when i can pull them away from their electronics.

You could control electronics with Python programming and really get them hooked  ;D Animatronics on front lawn etc  :P

http://kmtronic.com/control-kmtronic-usb-relays-the-python-library.html

I have a nut case that lives next house down that is a problem. Her problem is that she is always looking out her window to see what we are up to and calls the cops on us and 911 on the UPS guy who came to deliver a package the one day, she claimed the guy was trying to break in. After she was threatening our 7 yr old daughter with cursing and hand gestures and making actions like she knows kung fu we put up a tall stockade fence and she is annoyed by not having a view of what we are up to. I have been tempted to add moving silhouette's on my lawn with smiley faces that extend just above the fence. This relay control would work perfect for that. BUT fact of the matter is we are moving in a few months and so hopefully the problem goes away with the move!  ::) The last problem I had with her she complained that the lawn mower was too loud. I was fed up and said you want to hear LOUD... Took channel locks to the muffler and removed it and put the throttle to the max and had occasional flashes of flames shooting out the side of the engine block at about 120db vs the 60db of with the muffler on.

I can only hope that no one else here has a nut case neighbor like or worse than this one  >:(

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Python in One Easy Lesson
« Reply #3 on: January 09, 2014, 09:26:21 PM »
Look here at a device that can be controlled with Python.

Yes, Python is a high-level programming toll,yet it can control a low-level device.
The Python library has excellent code for serial devices .
Here are a coupe of  clips showing  the above  controlling relays.
http://kmtronic.com/kmtronic-projects.html



briandams



    Beginner

    Thanked: 2
    • Experience: Guru
    • OS: Unknown
    Re: Python in One Easy Lesson
    « Reply #4 on: January 09, 2014, 11:44:22 PM »

    camerongray



      Expert
    • Thanked: 306
      • Yes
      • Cameron Gray - The Random Rambings of a Computer Geek
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Mac OS
    Re: Python in One Easy Lesson
    « Reply #5 on: January 10, 2014, 05:07:02 AM »
    That is what I love with Python - The sheer number of libraries you can easily install and use.

    There's nothing really to stop a high level programming language having low level I/O operations, it just doesn't have some of the really low level concepts such as pointers and manual memory management in other languages like C.

    Perl is also good for this but I much prefer Python as a language - Perl can get really unreadable and messy very easily due to having a mass of punctuation to do trivial tasks.

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: Python in One Easy Lesson
    « Reply #6 on: January 10, 2014, 06:40:19 AM »
    So can Perl. http://search.cpan.org/~cook/Device-SerialPort-1.04/SerialPort.pm
    Seriously.  Did you post that just to provoke me!  It is a Python thread.  Not perl!!!!!

    briandams



      Beginner

      Thanked: 2
      • Experience: Guru
      • OS: Unknown
      Re: Python in One Easy Lesson
      « Reply #7 on: January 10, 2014, 07:40:25 AM »
      Perl is also good for this but I much prefer Python as a language - Perl can get really unreadable and messy very easily due to having a mass of punctuation to do trivial tasks.

      Its the programmer, not the programming language.

      briandams



        Beginner

        Thanked: 2
        • Experience: Guru
        • OS: Unknown
        Re: Python in One Easy Lesson
        « Reply #8 on: January 10, 2014, 07:43:26 AM »
        Seriously.  Did you post that just to provoke me!  It is a Python thread.  Not perl!!!!!
        Chill. You are the last person I would think even if there's no one else in this world. What makes you think that you deserve my provocation? I am merely just stating a fact about Perl able to do low level stuff just like Python. Its all about the libraries. So, not just Perl, other languages could also do it, as long as libraries are around! That does not mean I am bashing any language! Just chill will you? This is not dostips ! This is a computer programming forum!

        Squashman



          Specialist
        • Thanked: 134
        • Experience: Experienced
        • OS: Other
        Re: Python in One Easy Lesson
        « Reply #9 on: January 10, 2014, 07:48:57 AM »
        Chill. You are the last person I would think even if there's no one else in this world. What makes you think that you deserve my provocation? I am merely just stating a fact about Perl able to do low level stuff just like Python. Its all about the libraries. So, not just Perl, other languages could also do it, as long as libraries are around! That does not mean I am bashing any language! Just chill will you? This is not dostips ! This is a computer programming forum!
        What does the Thread TITLE SAY.

        If you want to push your PERL agenda start your own thread.  Telling Cameron "It's the Programmer, not the language" is taking a pot shot at him.

        When you start posting off topic stuff in a thread that is consider THREAD HIJACKING.

        briandams



          Beginner

          Thanked: 2
          • Experience: Guru
          • OS: Unknown
          Re: Python in One Easy Lesson
          « Reply #10 on: January 10, 2014, 07:52:16 AM »
          What does the Thread TITLE SAY.
          what does the forum say?

          Quote
          If you want to push you PERL agenda start your own thread.  Telling Cameron "It's the Programmer, not the language" is taking a pot shot at him.
          he is entitled to his opinion. that goes the same for me. Even though half of what he say may be true, but if the programmer is disciplined enough, code can be written just as beautifully as well. Obviously, you have not heard of
          perlstyle

          Java can do it as well, so can Ruby. So, not only Python can do it. And I am just stating a fact. Don't like it? no my problem.

          camerongray



            Expert
          • Thanked: 306
            • Yes
            • Cameron Gray - The Random Rambings of a Computer Geek
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Mac OS
          Re: Python in One Easy Lesson
          « Reply #11 on: January 10, 2014, 08:02:23 AM »
          Its the programmer, not the programming language.

          Which is why I stated "but I much prefer Python as a language".  I actually use Perl quite a lot at work and Python a lot for my own projects so I have good experience in both.  If anything, I've been using Perl longer than I have used Python!

          In some cases your statement is true such as when programmers blame a language instead of their own ability but not when a programmer criticises a language for a legitimate reason such as lacking certain concepts/data structures or having messy/cluttered syntax.

          briandams



            Beginner

            Thanked: 2
            • Experience: Guru
            • OS: Unknown
            Re: Python in One Easy Lesson
            « Reply #12 on: January 10, 2014, 08:07:03 AM »
            When you start posting off topic stuff in a thread that is consider THREAD HIJACKING.
            since when does the thread says anything other that Python is prohibited to be discussed? this is not dostips where only DOS can be discussed! don't be so narrow minded.

            camerongray



              Expert
            • Thanked: 306
              • Yes
              • Cameron Gray - The Random Rambings of a Computer Geek
            • Certifications: List
            • Computer: Specs
            • Experience: Expert
            • OS: Mac OS
            Re: Python in One Easy Lesson
            « Reply #13 on: January 10, 2014, 08:07:49 AM »
            Quote
            Obviously, you have not heard of perlstyle
            I certainly have!  If I'm writing from scratch I will strictly follow the style recommendations for whatever I'm using (even if it's not what I prefer myself).  If I'm working on an existing project I will use the same style as used elsewhere in the project.

            How can you comment on my style in Perl when you have never seen any of my Perl code?

            briandams



              Beginner

              Thanked: 2
              • Experience: Guru
              • OS: Unknown
              Re: Python in One Easy Lesson
              « Reply #14 on: January 10, 2014, 08:10:56 AM »
              I certainly have!
              that's good for you then.