473,554 Members | 3,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:

Py_Import("modu leName")
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(p athBench):
try :
cvsapi.checkout (CVSROOT, 'bench', destination=pat hBench, recursive=False )
except cvsapi.Checkout Error, error:
ret = -1
str = "CVS initialisation %s: %s, init() KO" % (pathBench,erro r)
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.rstri p('\\')
pathTest = pathTest.rstrip ('\\')
pathStorage = pathStorage.rst rip('\\')

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

ret, str = SettagView(tagN ame, pathBench)

except cvsapi.PathErro r,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*********@isi smpp.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 990

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

Similar topics

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) of the time. Sometimes it crashes on startup, and sometimes at exit, sometimes not at all. I haven't seen it crash with non-debug builds of my app...
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 2000, but in Office 2003 crash at line: "wbc = workbook.VBProject.VBComponents.Add(1)" Please help me :-( the code of the module that crash is...
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 compiled with Visual Studio 2005 - I hope you had no problems with VC++ 6.0?
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 closes unexpectedly and without any error message being displayed, or error messages written to the system logs. Visual Studio closes when I attempt...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
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 we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.