Creating a DLL file from Python Code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • macedo.silva@gmail.com

    #1

    Creating a DLL file from Python Code


    Hi,

    I would like to request your attention for this very specific issue:

    I have several classes in Python, and now I want simply re-use it, in
    other language.

    The closest to solution I think I came was with this site:

    but I not able to solve questions related with TLB files and
    __init__.py files.

    So, could anyone give a tip about how to creat a dll file from Python?
    It is possible under any conditions?

    thank in advance

    macedo

  • Laurent Pointal

    #2
    Re: Creating a DLL file from Python Code

    macedo.silva@gm ail.com a écrit :
    Hi,
    >
    I would like to request your attention for this very specific issue:
    >
    I have several classes in Python, and now I want simply re-use it, in
    other language.
    >
    The closest to solution I think I came was with this site:

    but I not able to solve questions related with TLB files and
    __init__.py files.
    >
    So, could anyone give a tip about how to creat a dll file from Python?
    It is possible under any conditions?
    For inter-languages intagration maybe you can use some distributed
    objects protocol like CORBA (see OmniORBpy), or - as you wrote about a
    DLL - COM/DCOM (see pywin32). Or write a simple TCP or UDP layer to
    communicate with your existing classes.
    Note: all that need some work in the Python side to be able to work
    using a client/server model.
    Note2: as long as your interface dont change, you can make modifications
    in both sides without problem.

    A+

    Laurent.

    Comment

    • ici

      #3
      Re: Creating a DLL file from Python Code

      On Mar 9, 2:08 pm, macedo.si...@gm ail.com wrote:
      Hi,
      >
      I would like to request your attention for this very specific issue:
      >
      I have several classes in Python, and now I want simply re-use it, in
      other language.
      >
      The closest to solution I think I came was with this site:http://www.py2exe.org/index.cgi/Py2e...esComDllServer
      but I not able to solve questions related with TLB files and
      __init__.py files.
      >
      So, could anyone give a tip about how to creat a dll file from Python?
      It is possible under any conditions?
      >
      thank in advance
      >
      macedo
      Best way: http://www.python.org/doc/ext/embedding.html , than use your
      modules as py files or string constants.

      Comment

      Working...