469,600 Members | 2,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

embeded python progam into visual C++ application crash

The C++ application uses a python module which wraps commands set for CVS
checkout, checkin and tag.
We used python2.5.1 and Visual C++ 6.0

The problem we get is:
After a good import and definition of python functions we have a random
unhandled exception (from python25.dll) when calling python interface
function several times.
All the python module has been tested using the python IDLE.
This the C++ sequence code we used:

cvs_init() // cvs view initialisation handled by
python script init()
cvs_set_tag() // cvs commit and tag handled by python
script settag()
// the exception occured here
This is the python script part:

def init(pathBench=None):
global CVSROOT
global BENCH_DIR
ret = 0
str = 'CVS initialization: init() OK'

if os.path.isdir(pathBench):
try :
cvsapi.checkout(CVSROOT, 'bench', destination=pathBench, recursive=False)
except cvsapi.CheckoutError, error:
ret = -1
str = "CVS initialisation %s: %s, init() KO" % (pathBench,error)
ret = -1
str = "CVS initialization: pathBench %s is not a directory, init() KO" %

return ret,str
def settag(tagName, pathBench):
ret = 0
str = 'CVS commit and tag: Warning no bench, settag()'

pathBench = pathBench.rstrip('\\')
pathTest = pathTest.rstrip('\\')
pathStorage = pathStorage.rstrip('\\')

if not os.path.isdir(pathBench) :
ret = -1
return ret, str

ret, str = SettagView(tagName, pathBench)

except cvsapi.PathError,error:
ret = -1
str = "settag(): path error %s" % error
except cvsapi.AddError,error:
ret = -1
str = "settag(): cvs add error %s" % error
ret = -1
str = "settag() unknown error"

return ret,str

Any information will be welcome as the scripts are running under IDLE and
not in embeded C++

thanks for your help

Fabien LYON

Service Informatique ISIS
* fa*********@isismpp.fr
* (+33) 05-61-43-59-04
* (poste interne) 5904
Fax (+33) 05-61-43-58-60
* 6 rue des Frères Boude
ZI Thibaud, BP 70439
31104 Toulouse Cedex 1

May 29 '07 #1
0 857

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.