Script runs in IDLE but not by itself!?

S

Scott

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
 
K

klappnase

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top