Python programs always open source?

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

    Python programs always open source?

    Hi,

    I was wondering if Python programs always need to include the source code
    with the program itself. I'm asking this because I don't want my program to
    be open-source and so far all the Python programs I've seen included the
    source code.

    Is it possible to make an executable with only bytecode?

    Thanks in advance!

    GF



    --
    Posted via a free Usenet account from http://www.teranews.com

  • sjdevnull@yahoo.com

    #2
    Re: Python programs always open source?

    Guy Fawkes wrote:
    I was wondering if Python programs always need to include the source code
    with the program itself. I'm asking this because I don't want my program to
    be open-source and so far all the Python programs I've seen included the
    source code.
    You can include the source code but still not be open source; it's not
    unusual for python programs to have licenses prohibiting the
    modification or redistribution of the source code.
    Is it possible to make an executable with only bytecode?
    You can import and use the .pyc files with a few caveats. They're
    pretty trivial to disassemble though, so it's rarely worth it; just
    make clear what's allowed (and what's not allowed) in your license.

    Comment

    • Ben Finney

      #3
      Re: Python programs always open source?

      "Guy Fawkes" <spare_the_rod@ spoilthechild.c omwrites:
      I was wondering if Python programs always need to include the source
      code with the program itself. I'm asking this because I don't want
      my program to be open-source and so far all the Python programs I've
      seen included the source code.
      You can license your own work to anyone you like, under any terms you
      choose. The source code to a work is necessary for users to exercise a
      free software license, but that doesn't mean that distributing source
      code necessarily grants a free software license.

      You're right that there is a great amount of Python code available
      under free software licenses. No-one can force you to join us, but
      you're welcome to.

      --
      \ "My girlfriend has a queen sized bed; I have a court jester |
      `\ sized bed. It's red and green and has bells on it, and the ends |
      _o__) curl up." -- Steven Wright |
      Ben Finney

      Comment

      • Jay

        #4
        Re: Python programs always open source?

        Speaking of the bytecode, how does one create it?


        Ben Finney wrote:
        "Guy Fawkes" <spare_the_rod@ spoilthechild.c omwrites:
        >
        I was wondering if Python programs always need to include the source
        code with the program itself. I'm asking this because I don't want
        my program to be open-source and so far all the Python programs I've
        seen included the source code.
        >
        You can license your own work to anyone you like, under any terms you
        choose. The source code to a work is necessary for users to exercise a
        free software license, but that doesn't mean that distributing source
        code necessarily grants a free software license.
        >
        You're right that there is a great amount of Python code available
        under free software licenses. No-one can force you to join us, but
        you're welcome to.
        >
        --
        \ "My girlfriend has a queen sized bed; I have a court jester |
        `\ sized bed. It's red and green and has bells on it, and the ends |
        _o__) curl up." -- Steven Wright |
        Ben Finney

        Comment

        • Fredrik Lundh

          #5
          Re: Python programs always open source?

          "Jay" <jaysherby@gmai l.comwrote:
          Speaking of the bytecode, how does one create it?


          </F>



          Comment

          • Gerold Penz

            #6
            Re: Python programs always open source?

            Guy Fawkes schrieb:
            Is it possible to make an executable?
            Hi GF!

            Gate is a leading provider of web hosting, domain names, exchange hosting and virtual private servers.


            Regards,
            Gerold
            :-)

            --
            _______________ _______________ _______________ _______________ ____________
            Gerold Penz - bcom - Programmierung
            gerold.penz@tir ol.utanet.at | http://gerold.bcom.at | http://sw3.at
            Ehrliche, herzliche Begeisterung ist einer der
            wirksamsten Erfolgsfaktoren . Dale Carnegie

            Comment

            • GHUM

              #7
              Re: Python programs always open source?

              Guy Fawkes schrieb:
              I don't want my program to
              be open-source and so far all the Python programs I've seen included the
              source code.
              That's one of the great freedoms of Python and its licence: You are
              free to chose the licence for your product. No GPLish "you must be as
              free as we", more BSDish: "Do what you want, do not come crying"
              Is it possible to make an executable with only bytecode?
              I use py2exe with its "new" (~1 year) single file feature with great
              success. I even succeeded in including a virtual static directory for a
              webserver within that file.

              To be exact, it is not really 1 file, but 2, as you often have to
              distribute msvcr71.dll with it - except for those computers having
              i.e. MS Office 11 installed, there it is allready present.

              Combining py2exe's single file distributable and upx compression I
              achieve fairly compact "just drop and use" applications without a real
              need for installation. I do not care about people decompiling
              (customers get the source code on request, if they are interested).
              It would be possible - but those who have the time and knowledge to
              dissect and decompile those upxed py2exed files and still make a profit
              would probably not see a reason to buy my software anyway :)

              Harald

              Comment

              • Ben Finney

                #8
                Re: Python programs always open source?

                "GHUM" <haraldarminmas sa@gmail.comwri tes:
                That's one of the great freedoms of Python and its licence: You are
                free to chose the licence for your product. No GPLish "you must be
                as free as we", more BSDish: "Do what you want, do not come crying"
                This has nothing to do with the license of Python. Whether Python was
                distributed under the GPL, BSD or Jack's Own Oddball License, the
                copyright holder of Python has no say over what license you choose for
                your own work.

                So long as you're not distributing some or all of Python itself, or a
                derivative work, the license for Python has no legal effect on what
                license you choose for your own work.

                --
                \ "He that would make his own liberty secure must guard even his |
                `\ enemy from oppression." -- Thomas Paine |
                _o__) |
                Ben Finney

                Comment

                • Leif K-Brooks

                  #9
                  Re: Python programs always open source?

                  Ben Finney wrote:
                  So long as you're not distributing some or all of Python itself, or a
                  derivative work, the license for Python has no legal effect on what
                  license you choose for your own work.
                  How many Python programs use nothing from the standard library?

                  Comment

                  • Steve Holden

                    #10
                    Re: Python programs always open source?

                    Leif K-Brooks wrote:
                    Ben Finney wrote:
                    >
                    >>So long as you're not distributing some or all of Python itself, or a
                    >>derivative work, the license for Python has no legal effect on what
                    >>license you choose for your own work.
                    >
                    >
                    How many Python programs use nothing from the standard library?
                    That doesn't matter either. The required copyright statements are
                    included in the Python interpreter. There is no reason to fear
                    distributing Python as a part of either open source or proprietary
                    works, and Guido framed the original license to allow precisely such
                    uses. Later versions have retained the same spirit.

                    The official license doesn't take a lot of understanding or legalese.
                    Try it:



                    regards
                    Steve
                    --
                    Steve Holden +44 150 684 7255 +1 800 494 3119
                    Holden Web LLC/Ltd http://www.holdenweb.com
                    Skype: holdenweb http://holdenweb.blogspot.com
                    Recent Ramblings http://del.icio.us/steve.holden

                    Comment

                    • Leif K-Brooks

                      #11
                      Re: Python programs always open source?

                      Steve Holden wrote:
                      Leif K-Brooks wrote:
                      >Ben Finney wrote:
                      >>
                      >>So long as you're not distributing some or all of Python itself, or a
                      >>derivative work, the license for Python has no legal effect on what
                      >>license you choose for your own work.
                      >>
                      >>
                      >How many Python programs use nothing from the standard library?
                      >
                      That doesn't matter either. The required copyright statements are
                      included in the Python interpreter. There is no reason to fear
                      distributing Python as a part of either open source or proprietary
                      works, and Guido framed the original license to allow precisely such
                      uses. Later versions have retained the same spirit.
                      Yes, I know that. I was replying to Ben Finney's claim that in a
                      hypothetical world where Python was licensed under the GPL, there would
                      still be no restriction on distributing Python programs under a
                      closed-source license.

                      Comment

                      • Ben Finney

                        #12
                        Re: Python programs always open source?

                        Leif K-Brooks <eurleif@ecritt ers.bizwrites:
                        Ben Finney wrote:
                        >So long as you're not distributing some or all of Python itself,
                        >or a derivative work, the license for Python has no legal effect
                        >on what license you choose for your own work.
                        I was replying to Ben Finney's claim that in a hypothetical world
                        where Python was licensed under the GPL, there would still be no
                        restriction on distributing Python programs under a closed-source
                        license.
                        My claim (and IANAL) is that it doesn't matter *what* license Python
                        is distributed under; unless you do something with Python that is a
                        right of the copyright holder, such as distributing part or all of
                        Python, the copyright license terms of Python have no legal effect on
                        what license you choose for your own work.

                        --
                        \ "People are very open-minded about new things, as long as |
                        `\ they're exactly like the old ones." -- Charles F. Kettering |
                        _o__) |
                        Ben Finney

                        Comment

                        • Diez B. Roggisch

                          #13
                          Re: Python programs always open source?

                          Ben Finney schrieb:
                          Leif K-Brooks <eurleif@ecritt ers.bizwrites:
                          >
                          >>>Ben Finney wrote:
                          >>>>So long as you're not distributing some or all of Python itself,
                          >>>>or a derivative work, the license for Python has no legal effect
                          >>>>on what license you choose for your own work.
                          >
                          >I was replying to Ben Finney's claim that in a hypothetical world
                          >where Python was licensed under the GPL, there would still be no
                          >restriction on distributing Python programs under a closed-source
                          >license.
                          >
                          My claim (and IANAL) is that it doesn't matter *what* license Python
                          is distributed under; unless you do something with Python that is a
                          right of the copyright holder, such as distributing part or all of
                          Python, the copyright license terms of Python have no legal effect on
                          what license you choose for your own work.
                          IANAL - having said that:

                          Not true for the GPL. Part of python is the library, which you either
                          use explicit (I can't imagine a program that doesn't, beyond print
                          "hello world"), or implicit (sys and os are AFAIX used internally to
                          bootstrap the interpreter)

                          And the GPL exactly requires that when a library licensed under it is
                          used, that makes the using program GPL-licensed, too.

                          And the LGPL (L for lesser or library) remedies that.

                          If I recall correctly, the LGPL stats that you might use the headers and
                          link against a LGPL-lib as long as you don't change it, and you are ok.

                          So - I would certainly be very cautious when using GPL-based products if
                          I wanted to build some closed-source-application on top of it.

                          Diez

                          Comment

                          • sjdevnull@yahoo.com

                            #14
                            Re: Python programs always open source?

                            Diez B. Roggisch wrote:
                            Ben Finney schrieb:
                            >>Ben Finney wrote:
                            >>>So long as you're not distributing some or all of Python itself,
                            >>>or a derivative work, the license for Python has no legal effect
                            >>>on what license you choose for your own work.
                            [SNIP]
                            My claim (and IANAL) is that it doesn't matter *what* license Python
                            is distributed under; unless you do something with Python that is a
                            right of the copyright holder, such as distributing part or all of
                            Python, the copyright license terms of Python have no legal effect on
                            what license you choose for your own work.
                            >
                            IANAL - having said that:
                            >
                            Not true for the GPL.
                            [Re: the hypothetical situation where Python were GPL'd]

                            It doesn't matter what the GPL says, if your work is not a derivative
                            work of Python then you have no obligation to follow _any_ terms in
                            Python's license to distribute your own work. The GPL could make all
                            the claims it wants[1], it doesn't matter since you aren't legally
                            required to follow any of them for your own (non-derived) work.

                            In particular, if your program ran on PyPy or Jython, it'd be pretty
                            much impossible to argue that it's a derivative work of CPython. Now,
                            if Jython/PyPy both required CPython libraries (which your code used)
                            then there could be a case that your code is derivative of those
                            libraries and bound by their license terms--it's not obvious that
                            argument would fly, but it's also not obvious it wouldn't.

                            [1] in reality the GPL recognizes this--see clause 5

                            Comment

                            • Ben Finney

                              #15
                              Re: Python programs always open source?

                              "Diez B. Roggisch" <deets@nospam.w eb.dewrites:
                              Ben Finney schrieb:
                              My claim (and IANAL) is that it doesn't matter *what* license
                              Python is distributed under; unless you do something with Python
                              that is a right of the copyright holder, such as distributing part
                              or all of Python, the copyright license terms of Python have no
                              legal effect on what license you choose for your own work.
                              >
                              Not true for the GPL. Part of python is the library, which you
                              either use explicit (I can't imagine a program that doesn't, beyond
                              print "hello world"), or implicit (sys and os are AFAIX used
                              internally to bootstrap the interpreter)
                              And just about every program on a GNU/Linux system uses the libc
                              library, which is distributed under the GPL. That license *only*
                              affects works that are *derivative* of the libc library.
                              And the GPL exactly requires that when a library licensed under it
                              is used, that makes the using program GPL-licensed, too.
                              No, only when a new work *derives from* the existing work does
                              copyright on the existing work take effect.

                              You may be thinking of the "linking" clause, which depends on the
                              *inclusion of* existing header files from the library code, supplied
                              under the GPL. There's no such concept in an interpreted language like
                              Python: you write your program in the Python language without
                              including a single piece of the original in your work.

                              The GPL itself is clear on the fact that its terms cannot claim
                              anything that is not granted to the copyright holder -- and
                              *execution* of a library is not a right over which the library author
                              has any rights.

                              Even if execution (or "use") of a program library, without including
                              *any* of its code in your own work, were a right the library author
                              could restrict, no free software program can place any restriction on
                              execution (otherwise it's trivially non-free). If Python's license
                              were ever to have such a restrictive term, it would likely be
                              unenforcible, but would certainly disqualify it from inclusion in any
                              free operating system.

                              Copyright is currently weighted greatly in favour of copyright
                              holders, but please don't buy into the absolute-power rhetoric more
                              than necessary.

                              --
                              \ "Yesterday I told a chicken to cross the road. It said, 'What |
                              `\ for?'" -- Steven Wright |
                              _o__) |
                              Ben Finney

                              Comment

                              Working...