开发者

Calling Script from Command line not working

We created a DLL using cygwin and have written a class based python module for the same. We have created a sample script for the class based python module, that creates an object of the class and calls various methods in the class. This Test script works fine while I run it from IDLE. However when I run it from command prompt it eithe开发者_StackOverflowr hangs or just returns without executing the functions. When it returns I do not get a error trace.

When I tried to findout where exactly the issue is happening. the issue occurs when I try to call the cygwin_dll_init method of the cygwin1.dll . This cygwin1.dll is actualy a dependency to the DLL we have built. So we have to load this DLL and call this cygwin_dll_init method before loading my DLL.

cyg = cdll.LoadLibrary("cygwin1.dll")

cyg.cygwin_dll_init() #hangs or returns here

mydll=cdll.LoadLibrary("my.dll")
mydll.func1()

I'm trying to understand what exactly is the difference, when we call it IDLE and when we call it from command prompt using the python command. I will have to get the script working from command prompt as well.

Thanks, Sathish

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜