Python Binary and Windows

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

    #1

    Python Binary and Windows

    Hi.

    I'd like to compile (?) the DiffLib Python code into a binary form that can
    be called by other Windows apps - like, I'd like to compile it into a DLL.

    Is this possible?

    Many thanks!


  • Diez B. Roggisch

    #2
    Re: Python Binary and Windows

    peetm wrote:
    [color=blue]
    > Hi.
    >
    > I'd like to compile (?) the DiffLib Python code into a binary form that
    > can be called by other Windows apps - like, I'd like to compile it into a
    > DLL.
    >
    > Is this possible?[/color]

    Not so easy. Better install WinDiff. If you really have to do it, elmer will
    be of use for you.

    The official home of the Python Programming Language


    But it will still be far from being trivial.

    --
    Regards,

    Diez B. Roggisch

    Comment

    • aurora

      #3
      Re: Python Binary and Windows

      Thanks for making me aware of the difflib module. I don't know there is
      such cool module exists.

      You can make it available to other Windows program as a COM object. The
      win32 api should be all you need. It might be slightly challenging because
      some parameters are list of strings which might need a little work to
      translate into COM parameters.
      [color=blue]
      > Hi.
      >
      > I'd like to compile (?) the DiffLib Python code into a binary form that
      > can
      > be called by other Windows apps - like, I'd like to compile it into a
      > DLL.
      >
      > Is this possible?
      >
      > Many thanks!
      >
      >[/color]

      Comment

      • Fredrik Lundh

        #4
        Re: Python Binary and Windows

        "peetm" <peet.morris@co mlab.ox.ac.uk> wrote:
        [color=blue]
        > I'd like to compile (?) the DiffLib Python code into a binary form that can
        > be called by other Windows apps - like, I'd like to compile it into a DLL.
        >
        > Is this possible?[/color]

        you can link your DLL (or application) against the Python DLL, and use
        the Python API to pass data from C/C++ to Python, and back again.

        for details, see the "embedding" sections in



        </F>



        Comment

        Working...