COM Server crashing when returning large arrays

Alastair Alexander alastair at gotadsl.co.uk
Wed May 24 12:32:03 EDT 2006


Thanks for the replies Tim & Stefan

I'm using Python 2.3.5 on XP and the PythonWin build number seems to be 201 
... I'll see if I can find 207.

The following blows up on both an XP and Win2k box ... both have same build 
of Python and PythonWin:

################################
import sys

class Cache:
    _public_methods_ = ['GoPop']
    _reg_progid_ = 'pyTestCOM.Test'
    _reg_clsid_ = '{F1CC1052-BD44-4980-8EA5-9B29CDDB5955}'

    def GoPop(self):
        return [["spam, eggs and spam" for i in range(0,10)] for i in 
range(1,500)]

if __name__ == '__main__':
    print 'Registering COM Server'
    import win32com.server.register
    win32com.server.register.UseCommandLine(Cache)
################################

I'll check out the other mailing list too. This is my first foray into the 
wider Python community. I've been using the language on and off for the last 
few years as it is the embedded scripting language in the Front Arena 
trading system. I'm now working on a data modelling project that (sadly) 
requires a considerable amount of data processing to take place in 
Excel/VBA. Excel is fine for presentation, but Python is much better for 
many of the data processing tasks. pythoncom would offer an almost 
effortless way of getting VBA and Python to interact ... if I could just 
pass large chunks of data ...





More information about the Python-list mailing list