py4vbAuthor: Dave Date: 09.23.23 - 10:22am Ok, so the py4vb project is probably already surpassed the ms script control. We can directly add vb objects for free use, call functions by using the loadcode to eval individual lines The killer feature is we have a full debugger interface to set breakpoints view values etc But..if you want to delve into some more complexity, we also have the ability to work directly with the python types. With the MS script control we can eval() and get a simple return value. We can have the script get/set a textbox for large amounts of data or data with embedded quotes, but we can not say go from a javascript array to vb6 array. With py4vb we can. The direct inclusion of the pywin32 code actually gives us some powerful features at our fingertips. Mark included an awesome function called PyCom_VariantFromPyObject which we can directly use since vb6 is all COM based itself. His code is sophisticated enough that it automatically handles the following without a problem: h = ["embedded", [1,2] , b"types"] His code would return a VB6 usable array with 3 elements,first a string, second being an embedded variant array, and the 3rd being a vb byte array. I am pretty pleased where this project is going. We will have basic use available just like the MS script control, a complete debugger GUI if you want to use it, and the capability to pull out complex types directly for use in vb compatible types. Note: dicts look like they will have to be case to string representations since there is no COM type that mirrors them. I will update the download with a types_example at the end of this weekend. Comments: (0) |
About Me More Blogs Main Site
|
|||||||||||||||||||||||||||||||