Lanunching Process from Python Script
Hello, In windows, I am launching Python process to execute python script in the back ground. This Python script which internally launches another windows exe. Here, how do I redirect output of windows.exe to caller process. (python.exe). I would appreciate, if any one provides sample code for the same. thanks. saravanan -- http://mail.python.org/mailman/listinfo/python-list
Re: Exception in Python 2.3.3 Interpreter
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Saravanan D" wrote: > > > > > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int > > op > > > > = 88026108, struct _object * v = 0x0001, struct _object * w = > > > > 0x)+0xa9 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3880] > > > > 04 023ffb18 1e016ba4 014f3318 0002 0099f170 > > python23!eval_frame(struct > > > > _frame * f = 0x053f2bfc)+0x542 > > [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c > > > > @ 1965] > > > > 05 023ffb30 1e016a69 0099f170 023ffb7c 0002 > > > > python23!fast_function(struct _object * func = , > > struct > > > > _object *** pp_stack = , int n = > error>, > > > > int na = , int nk = )+0x94 > > > > > > the above doesn't look very healthy. does your application involve > > > non-standard extensions (including extensions you've written your- > > > self)? does the extensions contain callbacks into Python code? > > > > > > > My application uses extension modules which devliers the callbacks to Python > > Code. Im using SWIG 1.3.19 version to generate relevant python interfaces > > for the C++ code. > > how are you accessing the callbacks? if you're doing that from threads > created at the C++ level, you must make sure that the thread state is > properly set up. see: Callbacks have been called from the threads which are created in C++ code. Before calling the callback, the thread state has been properly set (as per python documentation). The application runs 3 to 4 days continuously with out having any issues. But, crash happens sparadically. (once in a week / once in 4 days ) > do you keep track of the thread state, so that callbacks run in the > same state as they were registered in? > > > > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Exception in Python 2.3.3 Interpreter
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Saravanan" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Im running Python Application as a Windows Service (using windows > > extensions). But, sporadically the application crashes (crash in > > Python23.dll) and this stops the service. This problem cann't be > > reproduced easily in my system and the call stack generated by the > > application is given below. Please note that the call stack generation > > is taken from crash dump file. > > > > The crash occured at the following line: > > c = strcmp(vname, wname) (object.c) > > I am puzzled by this line. I can't see how it could execute. > Is this C or Python code? from the distribution or your code? > How is the result of strcmp (-1, 0, 1 ?) supposed to be callable? > Is this guarded by a rarely triggered condition? > > Terry J. Reedy The above one is C Code. The same line is present in object.c file of Python Interpreter Source and the function name is default_3way_compare(). Windows debugger points to above line in the event of crash of my application. Saravanan D -- http://mail.python.org/mailman/listinfo/python-list
Re: Exception in Python 2.3.3 Interpreter
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Saravanan D" <[EMAIL PROTECTED]> wrote: > > > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int op > > = 88026108, struct _object * v = 0x0001, struct _object * w = > > 0x)+0xa9 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3880] > > 04 023ffb18 1e016ba4 014f3318 0002 0099f170 python23!eval_frame(struct > > _frame * f = 0x053f2bfc)+0x542 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c > > @ 1965] > > 05 023ffb30 1e016a69 0099f170 023ffb7c 0002 > > python23!fast_function(struct _object * func = , struct > > _object *** pp_stack = , int n = , > > int na = , int nk = )+0x94 > > the above doesn't look very healthy. does your application involve > non-standard extensions (including extensions you've written your- > self)? does the extensions contain callbacks into Python code? > My application uses extension modules which devliers the callbacks to Python Code. Im using SWIG 1.3.19 version to generate relevant python interfaces for the C++ code. In addition to that, the application uses Win32 extensions APIs. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list
Re: Exception in Python 2.3.3 Interpreter
Hello, Component which uses only windows extension modules and callback from C++ to Python. - Saravanan D "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Saravanan D" <[EMAIL PROTECTED]> wrote: > > > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int op > > = 88026108, struct _object * v = 0x0001, struct _object * w = > > 0x)+0xa9 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3880] > > 04 023ffb18 1e016ba4 014f3318 0002 0099f170 python23!eval_frame(struct > > _frame * f = 0x053f2bfc)+0x542 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c > > @ 1965] > > 05 023ffb30 1e016a69 0099f170 023ffb7c 0002 > > python23!fast_function(struct _object * func = , struct > > _object *** pp_stack = , int n = , > > int na = , int nk = )+0x94 > > the above doesn't look very healthy. does your application involve > non-standard extensions (including extensions you've written your- > self)? does the extensions contain callbacks into Python code? > > > > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Exception in Python 2.3.3 Interpreter
Hello, The crash occured at the following line : c = strcmp(vname, wname) (object.c) Please note that the dump has been taken with the help of adplus. # ChildEBP RetAddr Args to Child 00 023ffa58 1e05c6da 055b1250 00637470 python23!default_3way_compare(struct _object * v = 0x053f2bfc, struct _object * w = 0x0001)+0x102 [F:\Python-2.3.3\Python-2.3.3\Objects\object.c @ 689] 01 023ffa74 1e05c5ee 055b1250 00637470 python23!do_richcmp(struct _object * v = 0x1e0b9fb8, struct _object * w = 0x, int op = 0)+0x4a 02 023ffa94 1e0174d9 055b1250 00637470 python23!PyObject_RichCompare(struct _object * v = 0x053f2bfc, struct _object * w = 0x0001, int op = 0)+0x1ae [F:\Python-2.3.3\Python-2.3.3\Objects\object.c @ 1044] 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int op = 88026108, struct _object * v = 0x0001, struct _object * w = 0x)+0xa9 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3880] 04 023ffb18 1e016ba4 014f3318 0002 0099f170 python23!eval_frame(struct _frame * f = 0x053f2bfc)+0x542 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 1965] 05 023ffb30 1e016a69 0099f170 023ffb7c 0002 python23!fast_function(struct _object * func = , struct _object *** pp_stack = , int n = , int na = , int nk = )+0x94 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3520] 06 023ffb5c 1e014b65 00a280d0 0002 0008 python23!call_function(struct _object *** pp_stack = 0x0001, int oparg = 0)+0x159 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3458] 07 023ffbcc 1e016ba4 006ea160 0001 0099f1b0 python23!eval_frame(struct _frame * f = )+0x1f25 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 2117] 08 023ffbe4 1e016a69 0099f1b0 023ffc30 0001 python23!fast_function(struct _object * func = , struct _object *** pp_stack = , int n = , int na = , int nk = )+0x94 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3520] 09 023ffc10 1e014b65 00a280d0 0001 python23!call_function(struct _object *** pp_stack = 0x, int oparg = 0)+0x159 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3458] 0a 023ffc80 1e015b6f 006cf6d0 00a1df9c python23!eval_frame(struct _frame * f = )+0x1f25 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 2117] 0b 023ffcac 1e040978 0096b720 0001 006cf6d0 python23!PyEval_EvalCodeEx(struct PyCodeObject * co = , struct _object * globals = , struct _object * locals = , struct _object ** args = , int argcount = , struct _object ** kws = , int kwcount = , struct _object ** defs = , int defcount = , struct _object * closure = )+0x70f [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 2663] 0c 023ffcf0 1e0078ec 009788b0 00a1df90 python23!function_call(struct _object * func = 0x1e0baa50, struct _object * arg = 0x0096b720, struct _object * kw = 0x00954390)+0x138 [F:\Python-2.3.3\Python-2.3.3\Objects\funcobject.c @ 512] 0d 023ffd04 1e01be03 009788b0 00a1df90 python23!PyObject_Call(struct _object * func = 0x1e0d7608, struct _object * arg = 0x0001, struct _object * kw = 0x00a280d0)+0x1c [F:\Python-2.3.3\Python-2.3.3\Objects\abstract.c @ 1755] 0e 023fff24 1e0078ec 00a20f08 00671030 python23!instancemethod_call(struct _object * func = 0x1e0d7608, struct _object * arg = 0x0001, struct _object * kw = 0x00a280d0)+0x133 [F:\Python-2.3.3\Python-2.3.3\Objects\classobject.c @ 2433] 0f 023fff38 1e016827 00a20f08 00671030 python23!PyObject_Call(struct _object * func = 0x77e4a990, struct _object * arg = 0x01415bd8, struct _object * kw = 0x)+0x1c [F:\Python-2.3.3\Python-2.3.3\Objects\abstract.c @ 1755] 10 023fff50 1e080c77 00a20f08 00671030 python23!PyEval_CallObjectWithKeywords(struct _object * func = 0x77e4a990, struct _object * arg = 0x01415bd8, struct _object * kw = 0x)+0xa7 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3346] 11 023fff70 1e080675 013d8ba0 014161a8 python23!t_bootstrap(void * boot_raw = 0x77e4a990)+0x37 [F:\Python-2.3.3\Python-2.3.3\Modules\threadmodule.c @ 183] 12 023fff84 77bc90a2 0086f32c python23!PyThread_get_thread_ident(void)+0x5 [F:\Python-2.3.3\Python-2.3.3\Python\thread_nt.h @ 213] 13 023fffb8 77e4a990 01415bd8 msvcrt!_endthread+0xa6 14 023fffec 77bc9032 01415bd8 kernel32!BaseThreadStart+0x34 - Saravanan D "Saravanan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > Im running Python Application as a Windows Service (using windows > extensions). But, sporadically the application crashes (crash in > Python23.dll) and this stops the service. This problem cann't be > reproduced easily in my system and the call stack generated by the > application is given below. > > > Occurrence: 2005/4/22 23:24:57 > Process Id: 3072 > Process Name : D:\Python23\lib\site-packages\win32\PythonService.exe > Thread Id: 292 > Exception code: C005 ACCESS_VIOLATION > Fault address: 1E05C202 01:0005B