win32com, generating the cache programaticaly?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Markebo

    #1

    win32com, generating the cache programaticaly?


    Hello!

    I am messing around with communicating between LabVIEW and Python, got
    it to work by a small 'fix' (grabbing the generated file, and
    importing it by hand)

    What I might want to do, is to automatically generate the data done by
    executing makepy.py and run by it.

    What I select in makepy.py is a library "LabVIEW data 7.1", I would
    like to do this from my program. Any hints?

    Then, is it possible making this on a minor mode, basically I have
    only to dig out the CLSID of "LabVIEW data 7.1" and put it into the
    generated file.. sort of??

    /Andy

    --
    "I do not agree with what you say, but I will defend to the death
    your right to say it."

    -- Francois Marie Arouet Voltaire (1694-1778), French philosopher,
    writer, "Candide"
  • Roger Upole

    #2
    Re: win32com, generating the cache programaticaly?


    "Andrew Markebo" wrote:[color=blue]
    >
    > Hello!
    >
    > I am messing around with communicating between LabVIEW and Python, got
    > it to work by a small 'fix' (grabbing the generated file, and
    > importing it by hand)
    >
    > What I might want to do, is to automatically generate the data done by
    > executing makepy.py and run by it.
    >
    > What I select in makepy.py is a library "LabVIEW data 7.1", I would
    > like to do this from my program. Any hints?
    >
    > Then, is it possible making this on a minor mode, basically I have
    > only to dig out the CLSID of "LabVIEW data 7.1" and put it into the
    > generated file.. sort of??
    >[/color]

    You can use win32com.client .gencache.Ensur eDispatch
    to automatically generate the makepy file for an object's library
    when the object is created. Use the bForDemand option to
    only generate the code for objects as needed.

    Roger





    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----

    Comment

    • Andrew Markebo

      #3
      Re: win32com, generating the cache programaticaly?


      | You can use win32com.client .gencache.Ensur eDispatch
      | to automatically generate the makepy file for an object's library
      | when the object is created. Use the bForDemand option to
      | only generate the code for objects as needed.

      Drats, I get an:

      raise TypeError, "This COM object can not automate the makepy process
      - please run makepy manually for this object"

      Thanx anyway!

      /Andy

      --
      Feet up, heads down - keyboard still in the middle

      Comment

      Working...