VB to Python

Aleksandar Cikota alexci at web.de
Sat Apr 15 04:49:17 EDT 2006


Vielen Dank. Es funktioniert.


Mit freundlichen gruessen,
Aleksandar Cikota


"Gregor Horvath" <g.horvath at gmx.at> wrote in message 
news:e1ptt3$4tb$1 at newsreader1.utanet.at...
> Aleksandar Cikota schrieb:
>
>> Can someone translate the VB code to Python?
>>
>> VB code:
>>
>> Dim chsr as New DriverHelper.Chooser
>> chsr.DeviceType = "Telescope"
>> scopeProgID = chsr.Choose(scopeProgID)
>> Set scope = CreateObject(scopeProgID)
>> scope.Connected = True
>>
>
> (untested; late binding):
>
> import win32com.client
>
> chsr = win32com.client.Dispatch("DriverHelper.Chooser") #you may have to
> choose the ProdID of the class from the registry here
>
> chsr.DeviceType = "Telescope"
> scopeProgID = chsr.Choose(scopeProgID)
> scope = win32com.client.Dispatch(scopeProgID)
> scope.Connected = True
>
>
> -- 
> Mit freundlichen Grüßen,
>  Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
>  Mobil: +43(0)69910879004
>  Fax: +43(0)1/25330333931       http://www.gregor-horvath.com
>
>
>
>
> -- 
> Mit freundlichen Grüßen,
>  Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung
>  http://www.gregor-horvath.com 





More information about the Python-list mailing list