why BitTorrent was implemented in Python?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • craigdickinson
    New Member
    • Feb 2007
    • 2

    why BitTorrent was implemented in Python?

    i wanna know why programmer Bram Cohen first implemented bitTorrent in Python?

    it would be much appreciated

    Craig
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by craigdickinson
    i wanna know why programmer Bram Cohen first implemented bitTorrent in Python?

    it would be much appreciated

    Craig
    Umm... Because Python is a cool language that's fun to use? You'd really have to ask him.
    Welcome to TheScripts.

    Comment

    • craigdickinson
      New Member
      • Feb 2007
      • 2

      #3
      yes, but that does not answer my question what makes python so unquie, what makes it have the edge over programming languages like java, and C, C++ why would someone want to implement bitTorrent in python.

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by craigdickinson
        yes, but that does not answer my question what makes python so unquie, what makes it have the edge over programming languages like java, and C, C++ why would someone want to implement bitTorrent in python.
        If you look at the size (number of threads) or each of the forums on this site, you'll see (as I believe) that Python doesn't have an edge over these languages (yet).
        The reasons I prefer python are:
        Structure is indent based (not {..} based)
        The dot "." is far easier to type than "->"
        Dynamic typing (could get you into trouble if you're not careful, but a very cool feature)
        Invisible compile stage (like java)
        And many more.
        Python also makes learning easy with its interactive interpreter and forgiving syntax.

        Comment

        • jason bourne
          New Member
          • Jul 2007
          • 2

          #5
          Originally posted by craigdickinson
          i wanna know why programmer Bram Cohen first implemented bitTorrent in Python?

          it would be much appreciated

          Craig
          I read somewhere that Bram Cohen is himself a very big fan of the Python Language.
          Python is much more powerful language.Its a cool language especially the BitTorrent code itself.I'm currently working on the Python BitTorrent code so I can say this myself.
          Python libraries are far more powerful and its a very good scripting language as well.
          Python Rocks!!!

          Comment

          • bartonc
            Recognized Expert Expert
            • Sep 2006
            • 6478

            #6
            Originally posted by jason bourne
            I read somewhere that Bram Cohen is himself a very big fan of the Python Language.
            Python is much more powerful language.Its a cool language especially the BitTorrent code itself.I'm currently working on the Python BitTorrent code so I can say this myself.
            Python libraries are far more powerful and its a very good scripting language as well.
            Python Rocks!!!
            Thank you Matt (er, I mean Jason) LOL. Glad to have you join the Python Forum on TheScripts.com!

            Comment

            • Banfa
              Recognized Expert Expert
              • Feb 2006
              • 9067

              #7
              Originally posted by bartonc
              The reasons I prefer python are:
              Structure is indent based (not {..} based)
              You prefer that???? My experience of other languages where structure is indent based is that problems caused by incorrect indenting are a real pig to find (especially over several 1000 lines of code) because the structure is based on something you can't see and can't easily search for.

              Apart from that it just seems to be another scriting language to me, may be a little more OO than most others.

              And in case you are wondering why I have suddenly jumped into the Python forum the IDE for the platform on my latest project uses Python scripts for programming off chip memory so today I have been learning Python (by reading the Language Reference (for language lawyers)).

              Comment

              • bartonc
                Recognized Expert Expert
                • Sep 2006
                • 6478

                #8
                Originally posted by Banfa
                You prefer that???? My experience of other languages where structure is indent based is that problems caused by incorrect indenting are a real pig to find (especially over several 1000 lines of code) because the structure is based on something you can't see and can't easily search for.

                Apart from that it just seems to be another scriting language to me, may be a little more OO than most others.

                And in case you are wondering why I have suddenly jumped into the Python forum the IDE for the platform on my latest project uses Python scripts for programming off chip memory so today I have been learning Python (by reading the Language Reference (for language lawyers)).
                It's great to hear from you, Banfa. The Language Reference is probably the best place for someone of your experience to start. I find myself using the Module Index most, but that is after much time digging through to docs.

                Regarding OOness, I can't speak to the comparison to other languages. I do feel that Python lacks any sort of native messaging system like SmallTalk, but does measure up on the P.I.E. scale of things.

                Most of the editors that I've used have really good "tab nannies" and can pick out indentation errors BEFORE the compiler even runs. If it's missed there, then the compiler flags the line just past the error so one needs to learn to "look up" a bit.

                Keep in touch,
                Barton

                Comment

                • theorique
                  New Member
                  • Jun 2007
                  • 1

                  #9
                  Originally posted by Banfa
                  You prefer that???? My experience of other languages where structure is indent based is that problems caused by incorrect indenting are a real pig to find (especially over several 1000 lines of code) because the structure is based on something you can't see and can't easily search for.
                  Emacs with python-mode can eliminate most of these source code errors before they even happen, and pychecker wipes out other such syntax errors quite easily.

                  But in general, your point is a good one - I would certainly not want to go through a large source file by hand looking for the one line that is indented n+1 spaces instead of n...

                  Comment

                  • Andelys
                    New Member
                    • Aug 2007
                    • 47

                    #10
                    Originally posted by craigdickinson
                    yes, but that does not answer my question what makes python so unquie, what makes it have the edge over programming languages like java, and C, C++ why would someone want to implement bitTorrent in python.
                    Python i very very easy to understand, even i you haven't program before ;)

                    Comment

                    Working...