Re: Build and runtime dependencies

2012-12-21 Thread Chen Qi
? 2012?12?21? 06:11, Jack Silver ??: I have two Linux From Scratch machine. On the first one (the server), I want to build install python 3.3.0 in a shared filesystem and access it from the second one (the client). These machines are fairly minimal in term of the number of software installed.

Re: Python 2.7.3, C++ embed memory leak?

2012-06-02 Thread Qi
On 2012-6-2 18:53, Diez B. Roggisch wrote: Python does some special things that confuse valgrind. Don't bother. http://svn.python.org/projects/python/trunk/Misc/README.valgrind Thanks for the link. It clears a lot of my confusing, such as uninitialized reading... -- WQ -- http://mail.python.

Re: How to suppress exception printing to console?

2012-06-01 Thread Qi
On 2012-6-1 15:46, Ulrich Eckhardt wrote: Don't use PyRun_SimpleString() or catch the exception there. The point is that it runs the whole string as a module, like running a script from the commandline, and a pending exception on exit is then reported to stdout. Good hint, thanks. -- WQ -- h

Re: How to suppress exception printing to console?

2012-05-31 Thread Qi
On 2012-5-31 23:01, Ulrich Eckhardt wrote: Am 31.05.2012 09:57, schrieb Qi: The first sentence is clear. The second sentence rather sounds as if you were implementing a Python module in C++. This is the opposite to embedding Python in C++, it's rather embedding C++ in Python. Or is i

Re: How to suppress exception printing to console?

2012-05-31 Thread Qi
On 2012-5-31 21:31, Steven D'Aprano wrote: The problem is, some unit tests trigger exception on intention. I'm sorry, I don't understand what you mean by "on intention". I mean the exception is expected. The test will only pass if the embedded Python code raise certain exception. Are you us

How to suppress exception printing to console?

2012-05-31 Thread Qi
Hi guys, I have an application that embedding Python into C++. When any exception occurred in C++ code, PyErr_SetString will be called to propagate the exception to Python. The problem is, some unit tests trigger exception on intention. So it's OK to have the exceptions. But Python will still pr

Re: Python 2.7.3, C++ embed memory leak?

2012-05-29 Thread Qi
On 2012-5-29 23:29, Ulrich Eckhardt wrote: Call the pair of functions twice, if the reported memory leak doesn't increase, there is no problem. I personally wouldn't even call this a leak then, but that depends a bit on the precise definition. I should still call it a memory leak though it see

Python 2.7.3, C++ embed memory leak?

2012-05-29 Thread Qi
Hi guys, Is there any known memory leak problems, when embed Python 2.7.3 in C++? I Googled but only found some old posts. I tried to only call Py_Initialize() and Py_Finalize(), nothing else between those functions, Valgrind still reports memory leaks on Ubuntu? Is that a know problem? Did Pyt