[issue12232] embedded python import cmath

2019-10-22 Thread STINNER Victor


STINNER Victor  added the comment:

No activity since 2011, I close the issue.

--
nosy: +vstinner
resolution:  -> out of date
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-06 Thread Thanh Ly

Thanh Ly than...@ntlworld.com added the comment:

Hi Terry

With BB 6 I import python26.dll and embed and extend Python in the same 
project (sent) fairly successfully. I converted the DLL to a BB format lib 
file and manage to extend Python successfully but could not link when trying 
to embed Python with the Lib file.

I would like to try with 2.7 and 3.1 however, I'm hard against it, time wise 
and not sure when I can verify the issue.

I did manage to try with 2.4 (as lib file was readily available for BB) and 
it worked.

Thank you for your advice and recommendations.

Thanh.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-06 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Is it possible that the problem is related to floating point exceptions?
A quick Google search showed similar issue in another embedded library:
http://www.softintegration.com/support/faq/embed.html#borland

It seems important to add this instruction:
   _control87(MCW_EM, MCW_EM);
Can you try and modify your program accordingly?

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 Is it possible that the problem is related to floating point exceptions?

Hmm.  It's possible, but it's still a bit surprising that the crash occurs at 
import time rather than when calling one of the cmath functions.  But it's very 
possible that there are some missing PyFPE_START_PROTECT macros in the cmath 
source.

BTW, if the problem *is* in cmath, it's likely to also occur with Python 2.7:  
that module changed very little between 2.6 and 2.7.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-06 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Looking at the cmath source, I'd be a bit suspicious that either the Py_NAN or 
the Py_HUGE_VAL macro (or both) is triggering an FPE.  Both those values are 
used during module initialization.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-06 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-04 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

{It you reply by mail, please snip off the message you are replying to.}

From what I have read, Windows is not a very pleasant environment for 
extending and embedding.

1. It works best if both Python and the extender or embedder are compiled with 
the same version (of Microsoft VC). Does Borland Builder 6 claim compatibility 
with any particular versions of MS C++?

2. Problems like this probably need a debug build of Python, which you would 
have to make yourself, and unlike *nux, Windows does not come with a system 
compiler. (There is now, however, a free VC Express, but I believe the one 
needed to go with 2.6 is no longer available ;-(.

I am inclined to close this both because it does not involve current Python and 
because it appears to be an issue with BB or the interface that is out of our 
control (as you said, Python by itself works fine). I am only leaving this open 
to give you a chance to provide evidence otherwise with 2.7 or 3.2.

I recommend that you might try the trivial 'import cmath\n' with other Python 
versions. Which versions would depend on what BB6 claims to be compatible with.

I also recommend that you ask for help on python-list or other forums
(such a Stackoverflow). Use a subject like Embedding Python 2.6 with Borland 
Builder 6 This might catch the attention of someone who knows something about 
BB.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-06-03 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Hanging is different from crashing.
2.6 and 3.1 (soon) are only open for security issues.
Perhaps your system is missing something needed for the import.

If you want this to stay open, retest with 2.7 or 3.2 and give much more 
information: your system/OS, C/C++ compiler, your Python binary (copy the 
startup line in the interactive interpreter), and a minimal code that shows the 
problem.

--
nosy: +terry.reedy
stage:  - test needed
type: crash - behavior
versions:  -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12232] embedded python import cmath

2011-05-31 Thread Thanh Ly

New submission from Thanh Ly than...@ntlworld.com:

Calling Python script from C/C++ seems to work fine until using 'import cmath' 
causing the C/C++ application to hang. Other modules can be imported such as 
'math'.

--
messages: 137408
nosy: Thanh Ly
priority: normal
severity: normal
status: open
title: embedded python import cmath
type: crash
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com