Re: Embedding Python in other programs
http://www.python.org/windows/win32com/QuickStartServerCom.html If you are using ActivePython, that tutorial is included (PyWin32 documentation - Python COM - Overviews) along with the needed win32all module. -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Thanks Ravi, I'll take a look On 27 Aug 2005 22:55:40 -0700, Ravi Teja [EMAIL PROTECTED] wrote: http://www.python.org/windows/win32com/QuickStartServerCom.html If you are using ActivePython, that tutorial is included (PyWin32 documentation - Python COM - Overviews) along with the needed win32all module. -- http://mail.python.org/mailman/listinfo/python-list -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Guys, I am so lost. I followed the instructions exactly at http://www.python.org/windows/win32com/QuickStartServerCom.html But then when I opened up Visual Basic 6 and went to projectreferences, It is not listing anything like the helloworld com thingy I just registered? What do I need to do to use this com server thingy from within VB? I'd really appriciate any help. Thanks, Greg On 8/28/05, Gregory Piñero [EMAIL PROTECTED] wrote: Thanks Ravi, I'll take a look On 27 Aug 2005 22:55:40 -0700, Ravi Teja [EMAIL PROTECTED] wrote: http://www.python.org/windows/win32com/QuickStartServerCom.html If you are using ActivePython, that tutorial is included (PyWin32 documentation - Python COM - Overviews) along with the needed win32all module. -- http://mail.python.org/mailman/listinfo/python-list -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Greg, I don't recall touching VB6 in 4 years. From whatever I remember, you are trying to do early binding (trying to find a registered type library). You need to do late binding instead (use CreateObject) to dynamically instantiate the COM object. Ravi Teja. -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Steve, He said VB6 not VB.NET Greg, Just write COM servers in Python and call them from VB6. No need to embed. Lot easier too. -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
see below On 27 Aug 2005 02:18:14 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Steve, He said VB6 not VB.NET Greg, Just write COM servers in Python and call them from VB6. No need to embed. Lot easier too. Any idea how I would get started on this? I'll do a search later today. -- http://mail.python.org/mailman/listinfo/python-list -- Gregory Piñero Chief Innovation Officer Blended Technologies (www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Thomas Bartkus wrote: Name: lib64python2.4-devel Summary: The libraries and header files needed for Python development Description: The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. -- *** The Python programming language's interpreter ... can be embedded in other programs. *** That's very intriguing! But I can't seem to locate much information about this. Can anyone direct me to greater enlightenment? Thomas Bartkus There is a section of the official documentation devoted to extending and embedding python: http://docs.python.org/ext/ext.html There are a few articles on this topics on the web, as well. Search embedding python with Google. --- Alessandro Bottoni -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
How do I get it into VB6? Now that's an answer that would save my life many times over. -GregOn 8/26/05, Alessandro Bottoni [EMAIL PROTECTED] wrote: Thomas Bartkus wrote: Name: lib64python2.4-devel Summary: The libraries and header files needed for Python development Description: The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. -- *** The Python programming language's interpreter ... can be embedded in other programs. *** That's very intriguing! But I can't seem to locate much information about this. Can anyone direct me to greater enlightenment? Thomas BartkusThere is a section of the official documentation devoted to extending andembedding python: http://docs.python.org/ext/ext.html There are a few articles on this topics on the web, as well. Searchembedding python with Google.---Alessandro Bottoni --http://mail.python.org/mailman/listinfo/python-list -- Gregory PiñeroChief Innovation Officer Blended Technologies(www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Hey guys, This question inpsired me to try this in VB6. I did a search and copied what I saw at http://forums.devshed.com/t158692/s.html However I'm running into the same problem they are. When I try to run: res = Python.PyRun_SimpleString(5+7) I get the error message: Bad DLL calling convention (Error 49) Which VB help describes as: Arguments passed to a dynamic-link library (DLL) must exactly match those expected by the routine. Calling conventions deal with number, type, and order of arguments. This error has the following causes and solutions: Your program is calling a routine in a DLL that's being passed the wrong type of arguments. Make sure all argument types agree with those specified in the declaration of the routine you are calling. Your program is calling a routine in a DLL that's being passed the wrong number of arguments. Make sure you are passing the same number of arguments indicated in the declaration of the routine you are calling. Your program is calling a routine in a DLL, but isn't using the StdCall calling convention. If the DLL routine expects arguments by value, then make sure ByVal is specified for those arguments in the declaration for the routine. Your Declare statement for a Windows DLL includes CDecl. Any ideas? -Greg On 8/26/05, Gregory Piñero [EMAIL PROTECTED] wrote: How do I get it into VB6? Now that's an answer that would save my life many times over. -GregOn 8/26/05, Alessandro Bottoni [EMAIL PROTECTED] wrote: Thomas Bartkus wrote: Name: lib64python2.4-devel Summary: The libraries and header files needed for Python development Description: The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. -- *** The Python programming language's interpreter ... can be embedded in other programs. *** That's very intriguing! But I can't seem to locate much information about this. Can anyone direct me to greater enlightenment? Thomas BartkusThere is a section of the official documentation devoted to extending andembedding python: http://docs.python.org/ext/ext.html There are a few articles on this topics on the web, as well. Searchembedding python with Google. ---Alessandro Bottoni --http://mail.python.org/mailman/listinfo/python-list -- Gregory PiñeroChief Innovation Officer Blended Technologies(www.blendedtechnologies.com ) -- Gregory PiñeroChief Innovation OfficerBlended Technologies(www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Oh, by the way, here's the VB code I'm using: a href='' title='Help me do this!'http://www.blendedtechnologies.com/wp-content/VB_uses_Python.zip/a I wonder if this question should go to some kind of VB list instead? -Greg On 8/26/05, Gregory Piñero [EMAIL PROTECTED] wrote: Hey guys, This question inpsired me to try this in VB6. I did a search and copied what I saw at http://forums.devshed.com/t158692/s.html However I'm running into the same problem they are. When I try to run: res = Python.PyRun_SimpleString(5+7) I get the error message: Bad DLL calling convention (Error 49) Which VB help describes as: Arguments passed to a dynamic-link library (DLL) must exactly match those expected by the routine. Calling conventions deal with number, type, and order of arguments. This error has the following causes and solutions: Your program is calling a routine in a DLL that's being passed the wrong type of arguments. Make sure all argument types agree with those specified in the declaration of the routine you are calling. Your program is calling a routine in a DLL that's being passed the wrong number of arguments. Make sure you are passing the same number of arguments indicated in the declaration of the routine you are calling. Your program is calling a routine in a DLL, but isn't using the StdCall calling convention. If the DLL routine expects arguments by value, then make sure ByVal is specified for those arguments in the declaration for the routine. Your Declare statement for a Windows DLL includes CDecl. Any ideas? -Greg On 8/26/05, Gregory Piñero [EMAIL PROTECTED] wrote: How do I get it into VB6? Now that's an answer that would save my life many times over. -GregOn 8/26/05, Alessandro Bottoni [EMAIL PROTECTED] wrote: Thomas Bartkus wrote: Name: lib64python2.4-devel Summary: The libraries and header files needed for Python development Description: The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. -- *** The Python programming language's interpreter ... can be embedded in other programs. *** That's very intriguing! But I can't seem to locate much information about this. Can anyone direct me to greater enlightenment? Thomas BartkusThere is a section of the official documentation devoted to extending andembedding python: http://docs.python.org/ext/ext.html There are a few articles on this topics on the web, as well. Searchembedding python with Google. ---Alessandro Bottoni --http://mail.python.org/mailman/listinfo/python-list -- Gregory PiñeroChief Innovation Officer Blended Technologies(www.blendedtechnologies.com ) -- Gregory PiñeroChief Innovation OfficerBlended Technologies( www.blendedtechnologies.com) -- Gregory PiñeroChief Innovation OfficerBlended Technologies(www.blendedtechnologies.com) -- http://mail.python.org/mailman/listinfo/python-list
Re: Embedding Python in other programs
Gregory Piñero wrote: How do I get it into VB6? Now that's an answer that would save my life many times over. Use IronPython? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
Embedding Python in other programs
Name: lib64python2.4-devel Summary: The libraries and header files needed for Python development Description: The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. -- *** The Python programming language's interpreter ... can be embedded in other programs. *** That's very intriguing! But I can't seem to locate much information about this. Can anyone direct me to greater enlightenment? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list