469,290 Members | 1,866 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Script runs in IDLE but not by itself!?

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
Jul 18 '05 #1
1 1349
kn**********@cfl.rr.com (Scott) wrote in message news:<9a**************************@posting.google. com>...
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
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Kerry Neilson | last post: by
9 posts views Thread by nephish | last post: by
7 posts views Thread by Patrick Allaire | last post: by
reply views Thread by kaioshin00 | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.