|
by: Wenning Qiu |
last post by:
I am researching issues related to emdedding Python in C++ for a
project.
My project will be running on an SMP box and requires scalability.
However, my test shows that Python threading has very poor performance
in terms of scaling. In fact it doesn't scale at all.
I wrote a simple test program to complete given number of iterations
of a simple loop. The total number of iterations can be divided evenly
among a number of threads. My...
|
by: Jesper Nilsson |
last post by:
I've embedded python in a threaded app which contains two threads that may
call into Python. The threads are created via the "C" api. If I can
guarantee (1) that no python API is ever called at the same time from the
two threads, is it necessary to init threads/aquire locks etc
(PyEval_InitThreads, PyEval_AcquireThread and friends)?
The reason (2) I ask this is that I'm afraid that the locking takes some
time. Is this concern justified?...
|
by: Atul Kshirsagar |
last post by:
I am embedding python in my C++ application. I am using Python *2.3.2* with
a C++ extention DLL in multi-threaded environment. I am using SWIG-1.3.19 to
generate C++ to Python interface.
Now to explain it in details,
1. Python initialization and finalization
is done in the *main* thread.
2. For each new thread I create a separate sub-interpreter
.
3. Using PyRun_String("import myModule"...) before execution of python
|
by: Steve Menard |
last post by:
Here is my problem.
I have this library thats hosts another language within python, and
allows that language to call back INTO python.
All is good as long as the other languages calls back on the same
thread. If the callback arrives on a different thread, all hell break
loose and the program dies horribly.
looking at the C api documentation, I came upon the following block of
|
by: Martin |
last post by:
Greetings,
I am new to python and wish to embed python in an 3D graphics
application to provide application automation. The high level goal is to
be able to drive my app from a script for batch job like behavior rather
than via the GUI (ie. I would like to run a script and see those changes
reflected in the GUI as if the user had clicked buttons, etc.) The
application is written in C++ and uses QT for the GUI.
I have read the python...
|
|
by: Andrew Dalke |
last post by:
Is there an author index for the new version of the
Python cookbook? As a contributor I got my comp version
delivered today and my ego wanted some gratification.
I couldn't find my entries.
Andrew
dalke@dalkescientific.com
|
by: amit |
last post by:
Hello,
I am embedding a python script in a C++ application. The script can be
called simultaneously from multiple threads.
What is the correct way to implement this situation:
1) Have unique python interpreter instantiations ( Py_Initialize() ) for
each thread.
|
by: Richard |
last post by:
I've tried embedding Python in a C app so that Threading is done in the
Python side.
In the simple example below, unless I uncomment the ALLOW_THREADS macros,
the Python thread does nothing until the C for-loop finishes.
My real-world example is a large C/Motif application - apart from scattering
the ALLOW_THREADS macros everywhere (and what do you do while the Motif
event loop is idling?), is there a better way to get the Python...
|
by: otr2 |
last post by:
Hi :)
I want to run Python in my app. That works still fine. But my app
supports now Threads and I would like to know what to do, that it runs
without problems.
PyGILState_Release and PyGILState_Ensure should solve the problem
right? Where do I have to put this two commands around? between each
Command that increase, decrease a reference?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|