FAQ
Hallo,

I've a problem getting makepy running. When I start the tool on my
machine with doubleclick everything is fine.
But when I try this in my Code:

makepy.py -i "Microsoft Excel 11.0 Object Library(1.5)"

I am getting an Syntax Error and command:

makepy.py

bring me this message on the screen:

Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
NameError: name 'makepy' is not defined

Any ideas what I am doing wrong?

Search Discussions

  • Konstantin Veretennicov at Apr 8, 2008 at 10:22 pm

    On Tue, Apr 8, 2008 at 4:18 PM, wrote:
    Hallo,

    I've a problem getting makepy running. When I start the tool on my
    machine with doubleclick everything is fine.
    But when I try this in my Code:

    makepy.py -i "Microsoft Excel 11.0 Object Library(1.5)"
    This syntax is used to run makepy.py script from command line.
    I am getting an Syntax Error and command:

    makepy.py

    bring me this message on the screen:

    Traceback (most recent call last):
    File "<interactive input>", line 1, in <module>
    NameError: name 'makepy' is not defined

    Any ideas what I am doing wrong?
    Python interpreter obviously accepts only valid python code, like this:

    import win32com.client.makepy
    win32com.client.makepy.ShowInfo("Microsoft Excel 11.0 Object Library(1.5)")

    --
    kv
  • Gabriel Genellina at Apr 9, 2008 at 6:36 am

    En Tue, 08 Apr 2008 10:18:48 -0300, <suzhi18 at googlemail.com> escribi?:

    I've a problem getting makepy running. When I start the tool on my
    machine with doubleclick everything is fine.
    But when I try this in my Code:

    makepy.py -i "Microsoft Excel 11.0 Object Library(1.5)"
    The above is supposed to be executed as a command, in a CMD console. It's
    not pyton code.
    I am getting an Syntax Error and command:

    makepy.py

    bring me this message on the screen:

    Traceback (most recent call last):
    File "<interactive input>", line 1, in <module>
    NameError: name 'makepy' is not defined
    Same as above: makepy.py is a filename, not a Python expression.
    Any ideas what I am doing wrong?
    What do you actually want to do?
    The documentation for makepy and win32com.client.gencache is in the
    pywin32 help files, section Quick-Starts to Python and COM.

    --
    Gabriel Genellina
  • Suzhi18 at Apr 9, 2008 at 7:01 am
    Ok, thanks for your help. After looking into the makepy.py file it was
    clear that this is only a command for the CMD console.

    I want to write a function which generates this .py file of the excel
    objects. I will now send the command to the CMD threw my python code.

    thanks again.

    suzhi
  • Suzhi18 at Apr 9, 2008 at 7:14 am
    Ok, thanks for your help. After looking into the makepy.py file it was
    clear that this is only a command for the CMD console.

    I want to write a function which generates this .py file of the excel
    objects. I will now send the command to the CMD threw my python code.

    thanks again.

    suzhi
  • Suzhi18 at Apr 9, 2008 at 7:38 am
    Ok, thanks for your help. After looking into the makepy.py file it was
    clear that this is only a command for the CMD console.

    I want to write a function which generates this .py file of the excel
    objects. I will now send the command to the CMD threw my python code.

    thanks again.

    suzhi

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 8, '08 at 1:18p
activeApr 9, '08 at 7:38a
posts6
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase