Author: 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)

Leave Comment:
Email: (not shown)
Message: (Required)
Math Question: 25 + 15 = ? followed by the letter: F 

About Me
More Blogs
Main Site
Posts: (All)
2024 ( 2 )
2023 (9)
     VB6 Virtual Files
     File handles across dlls
     python abort / script timeout
     VB6 Python embed w/debugger
     python embedding
     VB6 IDE Enhancements
     No Sleep
     A2W no ATL
2022 (4)
     More VB6 - C data passing
     Vb6 Asm listing
     Byte Array C to VB6
     Planet Source Code DVDs
2021 (2)
     Obscure VB
     VB6 IDE SP6
2020 ( 4 )
2019 ( 5 )
2018 ( 6 )
2017 ( 6 )
2016 ( 22 )
2015 ( 15 )
2014 ( 25 )
2013 ( 4 )
2012 ( 10 )
2011 ( 7 )
2010 ( 11 )
2009 ( 3 )