Script runs in IDLE but not by itself!?

Discussion in 'Python' started by Scott, Jul 18, 2004.

  1. Scott

    Scott Guest

    Hey everyone! I've been working with python for quite a while and
    have been able to fix all my problems by searching... except for this
    one!

    I have a python script that runs *BEAUTIFULLY* when run in windows in
    IDLE. However, if I try to run it in a simple python console (be
    double clicking it) it fails. It uses a DLL that I wrote in another
    language. The part that calls the dll looks like this:

    #### TOP OF PROGRAM ####
    import pythoncom, win32com.client, time
    pythoncom.CoInitialize()
    dll=win32com.client.Dispatch("test_3.KickAssClass")
    dll.testfunc("ooga","booga")
    sleep(10)
    print dll.showstatus()
    #### END OF PROGRAM ####

    The way the DLL is made, it takes in a login and password ("ooga" and
    "booga") and signs on AIM with the names (using the oscar protocol).
    The strange part is that when I run this program in IDLE, everything
    goes just fine. When I run it raw (by double clicking it) it just
    seems to sit there and when I show the status, it was like nothing
    happened in the DLL. No connections were made...

    I know this is too vague to get help on the details of my progra, but
    my question is how does IDLE differ from the raw python console? If I
    can figure that one out, then I can decide where to look to get my
    program working. Thank you for all your help everyone! --Scott
    Scott, Jul 18, 2004
    #1
    1. Advertising

  2. Scott

    klappnase Guest

    (Scott) wrote in message news:<>...
    > Hey everyone! I've been working with python for quite a while and
    > have been able to fix all my problems by searching... except for this
    > one!
    >
    > I have a python script that runs *BEAUTIFULLY* when run in windows in
    > IDLE. However, if I try to run it in a simple python console (be
    > double clicking it) it fails. It uses a DLL that I wrote in another
    > language. The part that calls the dll looks like this:
    >


    Just a shot in the dark, maybe a problem with sys.path, that one of
    your modules is not found when you start the program from explorer?
    Have you tried to call your program from a dos box, the traceback you
    get might be helpful.

    Michael
    klappnase, Jul 18, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ollie
    Replies:
    0
    Views:
    359
    Ollie
    Oct 2, 2003
  2. Replies:
    9
    Views:
    567
  3. Next
    Replies:
    0
    Views:
    152
  4. Otto __
    Replies:
    1
    Views:
    103
    Robert Klemme
    Oct 13, 2008
  5. kpowell10
    Replies:
    4
    Views:
    169
    Ben Morrow
    May 7, 2004
Loading...

Share This Page