Can I use python23_d and python23 to develop an extension for a
commercial application uses python22.dll? (Providing that I do not use
any new features found only in 2.3.)
I would bulld version 2.2 but I am having trouble doing this with
Visual Studio .NET Standard. (There is a well documented problem with
version 2.2 (involving largeint.h) and VS.NET but none of the
solutions that I found have worked.)
On the other hand, I have successfully built release and debug
versions of pythoncore with VS.NET.
Thanks 10 2517
John Underwood wrote: Can I use python23_d and python23 to develop an extension for a commercial application uses python22.dll? (Providing that I do not use any new features found only in 2.3.)
I would bulld version 2.2 but I am having trouble doing this with Visual Studio .NET Standard. (There is a well documented problem with version 2.2 (involving largeint.h) and VS.NET but none of the solutions that I found have worked.)
On the other hand, I have successfully built release and debug versions of pythoncore with VS.NET.
Why don't you just install the binary version of 2.2? That would be easier.
You can have 2.2 and 2.3 installed on the same machine with no problem. http://www.python.org/2.2.3/
If 2.3 is the version you use most often, you may want to reinstall it after
installing 2.2, so that your Windows file associations point to it. You can
just reinstall 2.3 on top of your previous 2.3 installation. (Or maybe
there's an easier way to do this.)
-Mike
On Mon, 5 Apr 2004 12:56:14 -0700, "Michael Geary"
<Mi**@DeleteThi s.Geary.com> wrote: John Underwood wrote: Can I use python23_d and python23 to develop an extension for a commercial application uses python22.dll? (Providing that I do not use any new features found only in 2.3.)
I would bulld version 2.2 but I am having trouble doing this with Visual Studio .NET Standard. (There is a well documented problem with version 2.2 (involving largeint.h) and VS.NET but none of the solutions that I found have worked.)
On the other hand, I have successfully built release and debug versions of pythoncore with VS.NET.
Why don't you just install the binary version of 2.2? That would be easier. You can have 2.2 and 2.3 installed on the same machine with no problem.
http://www.python.org/2.2.3/
If 2.3 is the version you use most often, you may want to reinstall it after installing 2.2, so that your Windows file associations point to it. You can just reinstall 2.3 on top of your previous 2.3 installation. (Or maybe there's an easier way to do this.)
-Mike
I have both 2.2 and 2.3 installed on my computer. My problem has to do
with Visual Studio .NET which will build 2.3 but will not build 2.2.
(MS removed largeint.h which is required by pythoncore in 2.2 when
they went from Visual C++ 6 to VS.NET. I tried supplying largeint.h to
VS.NET but that did not work.)
Since I cannot build 2.2, I do not have python22.dll or python22_d.dll
(the debug version). (They are not shipped with python you have to
produce them yourself.)
The commercial application to which I need to add an extension has
python22.dll in its runtime folder. I have no control over this
application and have to use whichever version they have chosen.
Since I do have python23.dll and python23_d.dll (from a successful
build of 2.3), can I use these to develop an extension for the
aforementioned commercial application if I stay away from any new
features in 2.3 (but not in 2.2)?
-John
John Underwood wrote: I have both 2.2 and 2.3 installed on my computer. My problem has to do with Visual Studio .NET which will build 2.3 but will not build 2.2. (MS removed largeint.h which is required by pythoncore in 2.2 when they went from Visual C++ 6 to VS.NET. I tried supplying largeint.h to VS.NET but that did not work.)
Since I cannot build 2.2, I do not have python22.dll or python22_d.dll (the debug version). (They are not shipped with python you have to produce them yourself.)
The executable Python installer for Windows does install pythonXX.dll. You
should find python22.dll and python23.dll in your Windows system32
directory.
Do you need python22_d.dll at all? I would think you'd need it only if you
were actually debugging the Python interpreter itself. I've never needed a
debug version of the Python DLL to debug ordinary Python code.
The commercial application to which I need to add an extension has python22.dll in its runtime folder. I have no control over this application and have to use whichever version they have chosen.
Paint Shop Pro?
Since I do have python23.dll and python23_d.dll (from a successful build of 2.3), can I use these to develop an extension for the aforementioned commercial application if I stay away from any new features in 2.3 (but not in 2.2)?
Are you talking about source code compatibility only? Sure, as long as you
use only language features available in both the old and new versions. You
can't use .pyc bytecode files from one version with a different version.
Anyway, I must be missing something here, because I would think you could
simply develop with your installed Python 2.2 and run the code under your
target application. You shouldn't have to be worrying about any of the stuff
you're dealing with.
-Mike
On Mon, 5 Apr 2004 17:44:55 -0700, "Michael Geary"
<Mi**@DeleteThi s.Geary.com> wrote: John Underwood wrote: I have both 2.2 and 2.3 installed on my computer. My problem has to do with Visual Studio .NET which will build 2.3 but will not build 2.2. (MS removed largeint.h which is required by pythoncore in 2.2 when they went from Visual C++ 6 to VS.NET. I tried supplying largeint.h to VS.NET but that did not work.)
Since I cannot build 2.2, I do not have python22.dll or python22_d.dll (the debug version). (They are not shipped with python you have to produce them yourself.) The executable Python installer for Windows does install pythonXX.dll. You should find python22.dll and python23.dll in your Windows system32 directory.
Do you need python22_d.dll at all? I would think you'd need it only if you were actually debugging the Python interpreter itself. I've never needed a debug version of the Python DLL to debug ordinary Python code.
The commercial application to which I need to add an extension has python22.dll in its runtime folder. I have no control over this application and have to use whichever version they have chosen.
Paint Shop Pro?
Curious Labs - Poser 5 Since I do have python23.dll and python23_d.dll (from a successful build of 2.3), can I use these to develop an extension for the aforementioned commercial application if I stay away from any new features in 2.3 (but not in 2.2)? Are you talking about source code compatibility only? Sure, as long as you use only language features available in both the old and new versions. You can't use .pyc bytecode files from one version with a different version.
Yes, although I'll have to check into the .pyc bytecode issue - which
I don't think is a problem.
Anyway, I must be missing something here, because I would think you could simply develop with your installed Python 2.2 and run the code under your target application. You shouldn't have to be worrying about any of the stuff you're dealing with.
May be it comes down to the approach taken to debug an extension. (I'm
new to Python - as you've probably guessed - and debugging mixed
language situations.)
To use the dubugging features of Visual Studio to debug my extension
code, I thought I needed to use python22_d.dll (the debug version fo
python22.dll). Is this correct? If so, I have not been able to produce
it with Visual Studio .NET because of the problems VS has with 2.2.
On the other hand, would it be better to debug the extension without
the Python interface (in other words, debug the internals of the
extension that are not dependent on Python) before attempting to test
the Python interface (which could be performed with python22.dll)?
-John
On Mon, 5 Apr 2004, John Underwood wrote: Since I do have python23.dll and python23_d.dll (from a successful build of 2.3), can I use these to develop an extension for the aforementioned commercial application if I stay away from any new features in 2.3 (but not in 2.2)?
You can do the development, but you won't be able to directly distribute
the resulting extension because it will have been linked with python23.dll
when it needs to be linked with python22.dll.
To make things easier to fudge later, you make sure that your extension is
Distutils'ified from the beginning.
You can then use another compiler supported by the Distutils (MS CL
non-optimising compiler, MinGW, Borland etc) to build the distributable
extension in either a Python 2.2 or 2.3 installation, without risking
mixing C runtime library mismatches (VS.NET uses a different CRT than
VS6 I understand). If using a 2.3 installation, you'll need to substitute
a 2.2 import library when building the final distributable version.
The Distutils setup.py script can then provide the installation harness.
--
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullsey e.apana.org.au (pref) | Snail: PO Box 370 an*****@pcug.or g.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
> Michael Geary wrote: Anyway, I must be missing something here, because I would think you could simply develop with your installed Python 2.2 and run the code under your target application. You shouldn't have to be worrying about any of the stuff you're dealing with.
John Underwood wrote: May be it comes down to the approach taken to debug an extension. (I'm new to Python - as you've probably guessed - and debugging mixed language situations.)
To use the dubugging features of Visual Studio to debug my extension code, I thought I needed to use python22_d.dll (the debug version fo python22.dll). Is this correct? If so, I have not been able to produce it with Visual Studio .NET because of the problems VS has with 2.2.
On the other hand, would it be better to debug the extension without the Python interface (in other words, debug the internals of the extension that are not dependent on Python) before attempting to test the Python interface (which could be performed with python22.dll)?
Oh! I think I just realized what I was missing. Is your Poser extension part
Python and part C/C++? I was assuming it was pure Python.
If it was pure Python, then of course it wouldn't matter if you had the
debug version of python22.dll. You'd use the debugging facilities that the
Python interpreter provides for Python code, which don't depend on having
the debug version of the interpreter.
If you were debugging code in the Python interpreter itself, then you would
certainly need the debug version of python22.dll.
But are you are developing both some Python code and an extension DLL
written in C/C++? In that case, it still wouldn't be necessary to have the
debug version of python22.dll, any more than you need a debug version of the
Windows DLLs such as kernel32.dll and user32.dll. You would just build a
debug version of *your* DLL. Set the Debugging options in your VS.NET
project properties to run Poser, and you'll be good to go. You can set
breakpoints in your DLL, trace through the code, etc. The only limitation
will be that you can't trace through the code inside python22.dll. Only if
you need to do that would you need a debug version of that DLL.
-Mike
On Tue, 6 Apr 2004 08:40:57 -0700, "Michael Geary"
<Mi**@DeleteThi s.Geary.com> wrote: Michael Geary wrote: > Anyway, I must be missing something here, because I would think > you could simply develop with your installed Python 2.2 and run > the code under your target application. You shouldn't have to be > worrying about any of the stuff you're dealing with. John Underwood wrote: May be it comes down to the approach taken to debug an extension. (I'm new to Python - as you've probably guessed - and debugging mixed language situations.)
To use the dubugging features of Visual Studio to debug my extension code, I thought I needed to use python22_d.dll (the debug version fo python22.dll). Is this correct? If so, I have not been able to produce it with Visual Studio .NET because of the problems VS has with 2.2.
On the other hand, would it be better to debug the extension without the Python interface (in other words, debug the internals of the extension that are not dependent on Python) before attempting to test the Python interface (which could be performed with python22.dll)?
Oh! I think I just realized what I was missing. Is your Poser extension part Python and part C/C++? I was assuming it was pure Python.
There is a Python front-end (using tkinter). This is not implemented
as an extension but is simply a script that runs in Poser. It imports
the extension part (which is coded in C/C++). If it was pure Python, then of course it wouldn't matter if you had the debug version of python22.dll. You'd use the debugging facilities that the Python interpreter provides for Python code, which don't depend on having the debug version of the interpreter.
If you were debugging code in the Python interpreter itself, then you would certainly need the debug version of python22.dll.
But are you are developing both some Python code and an extension DLL written in C/C++? In that case, it still wouldn't be necessary to have the debug version of python22.dll, any more than you need a debug version of the Windows DLLs such as kernel32.dll and user32.dll. You would just build a debug version of *your* DLL. Set the Debugging options in your VS.NET project properties to run Poser, and you'll be good to go. You can set breakpoints in your DLL, trace through the code, etc. The only limitation will be that you can't trace through the code inside python22.dll. Only if you need to do that would you need a debug version of that DLL.
I tried a small extension DLL as a test using your suggestion. I could
debug in VS.NET without the need of python22_d.dll which is all I
need.
Many thanks for the help.
Regards,
-John
John Underwood wrote: I tried a small extension DLL as a test using your suggestion. I could debug in VS.NET without the need of python22_d.dll which is all I need.
Many thanks for the help.
Great! Glad it worked out.
Talk with you later,
Mike
On Tue, 6 Apr 2004 22:02:49 +1000 (EST), Andrew MacIntyre
<an*****@bullse ye.apana.org.au > wrote: On Mon, 5 Apr 2004, John Underwood wrote:
Since I do have python23.dll and python23_d.dll (from a successful build of 2.3), can I use these to develop an extension for the aforementioned commercial application if I stay away from any new features in 2.3 (but not in 2.2)?
You can do the development, but you won't be able to directly distribute the resulting extension because it will have been linked with python23.dll when it needs to be linked with python22.dll.
To make things easier to fudge later, you make sure that your extension is Distutils'ifie d from the beginning.
You can then use another compiler supported by the Distutils (MS CL non-optimising compiler, MinGW, Borland etc) to build the distributable extension in either a Python 2.2 or 2.3 installation, without risking mixing C runtime library mismatches (VS.NET uses a different CRT than VS6 I understand). If using a 2.3 installation, you'll need to substitute a 2.2 import library when building the final distributable version.
The Distutils setup.py script can then provide the installation harness.
Thanks for the advice. I have a Borland compiler that I'll try with
Disutils. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Isal |
last post by:
hi all,
i'm new to python and i'm trying to build a python extension on win98,
written in c++, with cygwin.
but i keep having the same error message, and i didnt't find much
resources on the web about it:
>g++ -I/cygdrive/c/python22/include -c demomodule.cpp -o demomodule.o
In file included from /cygdrive/c/python22/include/Python.h:62,
from demomodule.cpp:1:
/cygdrive/c/python22/include/pyport.h:480:2: #error "LONG_BIT definition
|
by: Carl Waldbieser |
last post by:
I tried to adapt the instructions for building the M2Crypto module
(http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version
compatible with Python2.3, but I've had some mixed results. I actually got
everything to build and install, but when I try to import M2Crypto-- well,
here is a sample session:
>>> import M2Crypto
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File...
|
by: Anand |
last post by:
I have a unexpected issue with python modules (well i kind of know
why, but i am trying to find if there is a way around)
Intro:
I am allowing an external application to actually run python scripts.
The external application i am taking about is a test sequencer with a
lots of functionality. So the external application has a lot of gui
and all the testing logic is done in python. Things work fine when i
run regular code and i have been...
|
by: Dan Williams |
last post by:
Hi people
I'm getting a little annoyed with the way the print function always adds a
space character between print statements unless there has been a new line.
The manual mentions that "In some cases it may be functional to write an
empty string to standard output for this reason." Am I the only the who
thinks that this sucks? It's the first thing I've come across in Python that
I really think is a design flaw.
Is there a good way to...
|
by: C. Barnes |
last post by:
Normally, one uses the following procedure to build
and install a C/C++
extension:
python setup.py build --compiler=your_compiler
python setup.py install
For Python 2.3.3 on Windows, with the Mingw
(Minimalist GNU) compiler,
the following steps must be taken:
| |
by: James Stroud |
last post by:
Hello,
My department has switched from vmware to wine/cxoffice. I have been playing with this all morning, and I've gotten this far. If someone has done this, could you point me in the right direction
euler 65% winpy
Enthought Edition build 1057
Python 2.3.3 (#51, Feb 16 2004, 04:07:52) on win32
Type "help", "copyright", "credits" or "license" for more information.
py> from distutils.core import setup
|
by: justsee |
last post by:
Hi,
I'm using Python 2.3 on Windows for the first time, and am doing
something wrong in using urllib to retrieve images from urls embedded
in a csv file. If I explicitly specify a url and image name it works
fine(commented example in the code), but if I pass in variables in this
for loop it throws errors:
--- The script:
import csv, urllib
|
by: Chris Fink |
last post by:
I have walked through all of the WSE 3 Hands on Labs and got everything
working fine. When I create my own certificate and install it in the stores,
my client application that is consuming my WSE enabled webservice receives
the following error (noted at the very bottom of this post).
My objective here is to create and secure a service application (webservice)
using an x509 test cert that requests a client certificate; and to create a...
|
by: Martin Schneider |
last post by:
Hi!
I'd like to use the numpy library (which runs on Python 2.5) in the same
project with another (mandatory) library which needs python22.dll. When
I try to compile I get an error similar to "python22.dll not compatible
with the current Python version."
Has anybody an idea how to solve this?
Thanks for your ideas.
|
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: 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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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...
| |