protecting the python code.

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

    protecting the python code.

    Hi all,
    I've developed a testing application in python, and should supply it in
    a way that no one (lets say they are regular users) will understand it
    and edit it.
    The application source is all python but we expose a UI written in C#
    that go over all our code and expose to user functions (Indicated with
    a special prefix).
    So the problem on one hand is protecting the source and make it less
    accessible ond on the other hand to make it available for the UI.
    10x in advance

  • Steve Holden

    #2
    Re: protecting the python code.

    nell wrote:
    [color=blue]
    > Hi all,
    > I've developed a testing application in python, and should supply it in
    > a way that no one (lets say they are regular users) will understand it
    > and edit it.
    > The application source is all python but we expose a UI written in C#
    > that go over all our code and expose to user functions (Indicated with
    > a special prefix).
    > So the problem on one hand is protecting the source and make it less
    > accessible ond on the other hand to make it available for the UI.
    > 10x in advance
    >[/color]

    Before I spend *any* time explaining why this is probably a bad idea,
    not to mention impossible, I'd need to be convinced that your code is
    worth protecting in the first place :-)

    Why is *your* code so much more valuable than any other commercial
    Python code currently distributed in non-obfuscated form?

    Paranoia can be taken too far.

    What does "10x in advance" mean?

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119

    Comment

    • nell

      #3
      Re: protecting the python code.

      Hi Steve,
      First the "10x in advance" means thanks in advance.
      The main importance of protecting my code is to save headache of
      customers that want to be smart and change it and then complain on bugs
      and problems.

      10x

      Comment

      • Bob Smith

        #4
        Re: protecting the python code.

        nell wrote:[color=blue]
        > Hi Steve,
        > First the "10x in advance" means thanks in advance.
        > The main importance of protecting my code is to save headache of
        > customers that want to be smart and change it and then complain on bugs
        > and problems.
        >
        > 10x
        >[/color]

        I'd say that's more of a policy issue than a technical issue. You have a
        contract or agreement with your customers, right? Just place a cluase in
        it that addresses your concerns. You don't have to support people who
        have altered your code... nor should they expect to be supported.

        Comment

        • Steve Holden

          #5
          Re: protecting the python code.

          nell wrote:
          [color=blue]
          > Hi Steve,
          > First the "10x in advance" means thanks in advance.
          > The main importance of protecting my code is to save headache of
          > customers that want to be smart and change it and then complain on bugs
          > and problems.
          >
          > 10x
          >[/color]
          I'd have understood "tnx", never seens 10x b4 :-)

          Your concerns are what licensing's for. ("No support on modified copies"
          would be a good heading for a section addressing this issue).

          With good enough release controls you can verify the code is unmodified
          using md5 checksums or similar.

          If a customer's good enough at Python to disassemble your .pyc files,
          they will probably tell you they've modified your code when the support
          queries come in :-)

          regards
          Steve
          --
          Steve Holden http://www.holdenweb.com/
          Python Web Programming http://pydish.holdenweb.com/
          Holden Web LLC +1 703 861 4237 +1 800 494 3119

          Comment

          • Andrey Tatarinov

            #6
            Re: protecting the python code.

            nell wrote:[color=blue]
            > First the "10x in advance" means thanks in advance.
            > The main importance of protecting my code is to save headache of
            > customers that want to be smart and change it and then complain on bugs[/color]

            also you can try to use py2exe

            Comment

            • A.B., Khalid

              #7
              Re: protecting the python code.

              nell wrote:[color=blue]
              > Hi all,
              > I've developed a testing application in python, and should supply it[/color]
              in[color=blue]
              > a way that no one (lets say they are regular users) will understand[/color]
              it[color=blue]
              > and edit it.
              > The application source is all python but we expose a UI written in C#
              > that go over all our code and expose to user functions (Indicated[/color]
              with[color=blue]
              > a special prefix).
              > So the problem on one hand is protecting the source and make it less
              > accessible ond on the other hand to make it available for the UI.
              > 10x in advance[/color]



              You basically have two options:

              1. Use Pyrex to compile your application to be used as (a) module(s).
              2. Use Pyrex to compile your application and embed Python in it.

              The first option is probably the easier of the two, and it only
              requires that you install Pyrex
              (http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/) and that you
              study the Docs and the Demos in their respective directories.

              The second option is more involved but is still possible. You need to
              follow this:


              Many people use Pyrex to write Python extensions only. But given the
              obvious absence of competitors to address the issue of the protecting
              of python code, for whatever reason, then I think it is safe to say
              that Pyrex is now in a unique position to address that issue as well.
              Please be kindly reminded that even py2exe-- although a great
              undertaking-- is not AFAIK currrently that protective of your code--
              not that it ever claimed it is so-- as draging the resulting exe file
              to your zip archiever will reveal the python code inside your exe file.
              And so in short: try the Pyrex way.


              Regards,
              Khalid

              Comment

              Working...