473,466 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

embeded python progam into visual C++ application crash

hello,
The C++ application uses a python module which wraps commands set for CVS
management:
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:

Py_initialize()
Py_Import("moduleName")
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)
else:
ret = -1
str = "CVS initialization: pathBench %s is not a directory, init() KO" %
pathBench

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

try:
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
except:
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 982

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Adam Tomjack | last post by:
I'm trying to embed Python 2.3.5 into a C++ application on Windows XP. When I build my app with debug symbols and link to a debug build of Python, then my program seems to crash most (but not all)...
3
by: dan_roman | last post by:
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros within it. The script runs perfectlly in Office...
0
by: fabien.lyon | last post by:
-----Message d'origine----- De : fabien.lyon Envoyé : mercredi 30 mai 2007 20:16 À : 'python-list@python.org' Objet : RE: embeded python progam into visual C++ application crash 2.5.1 is...
3
by: Johnson | last post by:
I'm not sure if this is an IIS 5.1 issue or ASP.NET issue, or Visual Studio 2008 issue -- thus posting to 3 groups. Please don't be offended. The problem I'm encountering is that Visual Studio...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.