Python 2.3.3 Exceptions

2005-08-03 Thread Saravanan
Hello,

Im using Python 2.3.3 along with Win32all (163).
Currently my python application runs as Windows Service. Im using
Win32all Service Framework to run the Python Code as a Windows Service.

The following error has been reported to event viewer sparadically.
"Reporting queued error: faulting application PythonService.exe,
version 2.3.0.163, faulting module python23.dll, version 2.3.3150.1012,
fault address 0x0005c202."

Due to that, my service does not stops or crashes.

Can anybody guess what is the problem?

I have checked the Python Code, the crash always points to static int
default_3way_compare(PyObject *v, PyObject *w) function in object.c

As of now my project does not allow me to upgrade to higher version of
Python.

Thanks in Advance

Saravanan D

-- 
http://mail.python.org/mailman/listinfo/python-list


Exception in Python 2.3.3 Interpreter

2005-04-25 Thread Saravanan
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:0005B202 C:\WINDOWS\system32\python23.dll

Registers:
EAX:1E0E2EAC
EBX:00732EA8
ECX:1E03E500
EDX:016EC200
ESI:
EDI:00732EA8
CS:EIP:001B:1E05C202
SS:ESP:0023:025FFA3C  EBP:00637470
DS:0023  ES:0023  FS:003B  GS:
Flags:00010246

Call stack:
Address   Frame
1E05C202  00637470  0001:0005B202 C:\WINDOWS\system32\python23.dll
016EC29C  0003  :

The thread which throws the exception is from the Python-Core and not
from the application logic.

The above call stack points to PyObject_Compare function in object.c.

Any clue about the problem?  

Thanks in Advance.

Saravanan D

-- 
http://mail.python.org/mailman/listinfo/python-list


Python23.pdb

2005-04-25 Thread Saravanan
Hello,

1) Is is possible to get the pdb files for the Python version 2.3.3?

Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]
on win32

2) Is there way to enable symptom collection/traces in the Python Core
modules?

Thanks in advance.

- Saravanan D

-- 
http://mail.python.org/mailman/listinfo/python-list


Exception in Python 2.3.3 Interpreter

2005-05-09 Thread Saravanan
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. 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)

# 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

Any clues about the problem ?

- Saravanan D

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Exception in Python 2.3.3 Interpreter

2005-05-09 Thread Saravanan D
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

Re: Exception in Python 2.3.3 Interpreter

2005-05-09 Thread Saravanan D
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

2005-05-09 Thread 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?
>

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

2005-05-09 Thread Saravanan D

"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

2005-05-10 Thread Saravanan D

"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


Lanunching Process from Python Script

2005-05-26 Thread Saravanan D
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


How can I get path/name of the softlink to my python script when executing it

2009-04-19 Thread Saravanan Shanmugham (sarvi)
 
Hi,
I am writiing a script say "wabexec" in python
I will then have softlinks from other softlinks like  ls, waf,hello,
etc that are in the same directory and pointing to wabexec.
 
When some executes ./waf or ./hello and wabexec gets invoked because of
the softlink, how do I find out from within wabexec how it was invoked?
was it throug waf or hello, etc.
 
both __file__ and sys.arg0[] seem to have wabexec not the name of the
softlink.
 
Any ideas?
 
Sarvi
--
http://mail.python.org/mailman/listinfo/python-list


RE: How can I get path/name of the softlink to my python script when executing it

2009-04-19 Thread Saravanan Shanmugham (sarvi)
Sorry. I should have responded earlier to close this thread. It was my 
programming error.
 
Both sys.argv[0] and __file__ do point to the name and path of the softlink and 
not the actual program it is linked to.
 
So. Soryy. My bad programming got in my way.
 
Sarvi



From: Pascal Chambon [mailto:[email protected]] 
Sent: Sunday, April 19, 2009 2:36 PM
To: Saravanan Shanmugham (sarvi)
Cc: [email protected]
Subject: Re: How can I get path/name of the softlink to my python script when 
executing it
Importance: High


Hello

I fear that in this case the whole indirection operations on softlink occur 
only in the shell, and that the final command is only executed as if it were 
called directly on the real file...

Have you tried typing "python ./waf", to see how the resolution occurs in that 
case ?

Regards, 
Pascal



Saravanan Shanmugham (sarvi) a écrit : 

 
Hi,
I am writiing a script say "wabexec" in python
I will then have softlinks from other softlinks like  ls, 
waf,hello, etc that are in the same directory and pointing to wabexec.
 
When some executes ./waf or ./hello and wabexec gets invoked because of 
the softlink, how do I find out from within wabexec how it was invoked? was it 
throug waf or hello, etc.
 
both __file__ and sys.arg0[] seem to have wabexec not the name of the 
softlink.
 
Any ideas?
 
Sarvi




--
http://mail.python.org/mailman/listinfo/python-list
  


--
http://mail.python.org/mailman/listinfo/python-list


Python as a Testing Language - TTCN-3 Comparison

2008-06-11 Thread Saravanan Shanmugham (sarvi)
Hi,
 Is there any work being done to make Python better suited for
writing test cases for any problem space.
 
 I am a huge python fan and one of the things that got me there was
the simplicy and elegance its constructs that allow me to do complex
programming operations in very few lines without compromising on
readability.
 
 When I was looking for an efficient language for describing test
cases for any problem domain, I naturally thought Python would be my
best bet. (Even though Tcl is used extensively, and I have used it).
 
But I found something called TTCN-3 which is a language designed
specifcally for describing test cases. 
I found the following comparison of TTCN-3 with Junit and Tcl
 
http://www.site.uottawa.ca/~bernard/Tutorial_JUnit_tcltk_ttcn-3_animated
.pdf
 
It clearly shows the elegance of the language when it comes to
describing test cases.
 
Questions: 
   1. Does anyone one know of a similar comparison of TTCN-3 with
Python? Or does some one have an idea how it would compare if we
actually did a comparison. 
   2. Two powerfull things that seems to make TTCN-3 suite for testing
is the Template matching mechanism and the concept Alternate matching or
Trees. How best do we do this in Python? Is there room for improvement
language constructs that could make this simpler.
 
Thx,
Sarvi
 
 
--
http://mail.python.org/mailman/listinfo/python-list

RE: Python as a Testing Language - TTCN-3 Comparison

2008-06-19 Thread Saravanan Shanmugham (sarvi)
Well, looks like someone did such a comparison just recently. Just FYI
PDF at the link below
 
http://www.site.uottawa.ca/~bernard/A%20comparison%20between%20ttcn-3%20
and%20python%20v%2011.pdf
 
Comparing TTCN-3 with raw python as they have done is not fair. But even
then some of the comparisons made does not seem to make good use of
python constructs to be fair. 
 
It seems to me with a little bit of a well written python test framework
behind the scenes the comparison wouldn't be as bad as this document
shows. 
 
For example they compare a TTCN-3 structure and template to Python
objects. But I am guessing for these uses a Dictionary would have been a
better way of representing a TTCN-3 template or structure in python.
 
Anyway,  to me what this does point out is that the current python test
frameworks(python the language) are just good enough, compared to
TTCN-3. We just need a better python test framework and may be in that
process we may be able to identify some python language constructs, if
any, that might make it easier to build the test framework or describe
test cases.  
 
Sarvi




From: Saravanan Shanmugham (sarvi) 
Sent: Wednesday, June 11, 2008 1:28 PM
To: '[email protected]'
Subject: Python as a Testing Language - TTCN-3 Comparison


Hi,
 Is there any work being done to make Python better suited
for writing test cases for any problem space.
 
 I am a huge python fan and one of the things that got me
there was the simplicy and elegance its constructs that allow me to do
complex programming operations in very few lines without compromising on
readability.
 
 When I was looking for an efficient language for describing
test cases for any problem domain, I naturally thought Python would be
my best bet. (Even though Tcl is used extensively, and I have used it).
 
But I found something called TTCN-3 which is a language
designed specifcally for describing test cases. 
I found the following comparison of TTCN-3 with Junit and Tcl

http://www.site.uottawa.ca/~bernard/Tutorial_JUnit_tcltk_ttcn-3_animated
.pdf
 
It clearly shows the elegance of the language when it comes to
describing test cases.
 
Questions: 
   1. Does anyone one know of a similar comparison of TTCN-3
with Python? Or does some one have an idea how it would compare if we
actually did a comparison. 
   2. Two powerfull things that seems to make TTCN-3 suite for
testing is the Template matching mechanism and the concept Alternate
matching or Trees. How best do we do this in Python? Is there room for
improvement language constructs that could make this simpler.
 
Thx,
Sarvi
 
 

--
http://mail.python.org/mailman/listinfo/python-list