473,568 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python extensions on Win32

For various sundry reasons, I find myself needing to deliver a
Windows-based Python app. I also chose Python 2.5 for this platform.

The app has several requirements, all of which are available for Python
2.5/Win32 except one: pycurl. So I decided to try building the source
but as it turns out, building C programs on Windows isn't nearly as
straightforward as on Linux, so I'm a bit lost.

I've downloaded the free Visual C++ Studio 2005, the pycurl sources (and
the requisite curl libs, etc), but pycurl insists I don't have a C
compiler compatible with VC++ 2003 (which I'm assuming is what Python
2.5 is built with).

So, for anyone who might know:

1) Is VC++ 2005 compatible with VC++ 2003? If not, how can someone
acquire VC++ 2003 (aside from thepiratebay.or g)? The Microsoft site
seems to be a dead end here unless you've put out for a spendy MSDN
subscription.

2) If it is compatible, is there some specific incantation needed (env
variables, etc) to make pycurl use it?

3) If this is a dead-end, will mingw32 work instead (the error message
from pycurl implies it might, but I have doubts)? Or will this only
work with the cygwin version of Python?

4) How much alcohol will be required to forget all this when I'm done?
Thanks,
Cliff

--

Sep 26 '06 #1
2 1586
Cliff Wells schrieb:
1) Is VC++ 2005 compatible with VC++ 2003?
No. If you know very well how the extension module is written,
and what precisely the incompatibiliti es are, you may get away
with linking to msvcr8.dll, anyway.
If not, how can someone
acquire VC++ 2003 (aside from thepiratebay.or g)? The Microsoft site
seems to be a dead end here unless you've put out for a spendy MSDN
subscription.
As you say, getting it from MSDN is one option; another is to get
a used copy from Ebay. There used to be a free (as in beer) version
of the compiler binaries; some people use that.
2) If it is compatible, is there some specific incantation needed (env
variables, etc) to make pycurl use it?
If you set the environment variables MSSdk and DISTUTILS_USE_S DK,
the distutils will use the compiler "cl.exe" in the PATH, regardless
of whether the resulting binary would work.
3) If this is a dead-end, will mingw32 work instead (the error message
from pycurl implies it might, but I have doubts)? Or will this only
work with the cygwin version of Python?
No, the mingw binaries work fine with the pydotorg binaries of Python
2.5.
4) How much alcohol will be required to forget all this when I'm done?
You shouldn't forget it. Instead, you should write your experience
into "the Web", so that others have a flatter learning curve.

Regards,
Martin
Sep 26 '06 #2
Martin v. Löwis wrote:
Cliff Wells schrieb:
[...]
>>4) How much alcohol will be required to forget all this when I'm done?


You shouldn't forget it. Instead, you should write your experience
into "the Web", so that others have a flatter learning curve.
After which worthy effort I'll be happy to provide enough beer to erase
the experience from your mind, at least temporarily. The other way to
forget it is to turn 50 ...

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 26 '06 #3

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

Similar topics

4
1951
by: Tony Steward | last post by:
Hello All, I am looking for a programming language to use to write a database type application to run on windows machines. Is python for me or pls suggest what is. Is there a page that explains in simple terms what Python can do on windows? Is there an IDE? Is the windows api pre wrapped? Thanks
3
4505
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,...
0
2082
by: Phil Schmidt | last post by:
I'm attempting to follow the instructions at http://sebsauvage.net/python/mingw.html, without luck. I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19. I get an export error on "initexample" when attempting the example. Do I need some extra switches to get SWIG to create that function? Or is it something else? Here's my example build:
11
3478
by: Christian Wilcox | last post by:
Does anyone know of any existing Python implementations of an XForms viewer? Christian
0
1378
by: Axel Diener | last post by:
I embed python interpreters in a C++ program. For each script to execute I create a new interpreter. In this environment I can use the win32 extensions only one time. Here is a little piece of code to illustrate the problem: int main(int argc, char **argv) { Py_Initialize(); Py_SetProgramName(argv);
1
1672
by: Matthew | last post by:
Hi: I recently installed Python 2.4 and the Win 32 extensions on Windows XP. I had some problems with the COM makepy utility for the Excel COM libraries. I reported this problem to the sourceforge bug tracker. My question is , is python 2.3 and the win32 extensions more stable than Python 2.4?
0
4531
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 349 open ( +7) / 3737 closed (+25) / 4086 total (+32) Bugs : 939 open (-12) / 6648 closed (+60) / 7587 total (+48) RFE : 249 open ( -8) / 278 closed (+12) / 527 total ( +4) New / Reopened Patches ______________________
4
2516
by: vedrandekovic | last post by:
Hi, I have already install Microsoft visual studio .NET 2003 and MinGw, when I try to build a extension: python my_extension_setup.py build ( or install ) , I get an error: LINK : fatal error LNK1141: failure during build of exports file error: command '"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe"' failed with...
9
2086
by: pythonewbie | last post by:
Hi all, I am newbie in Python, my wish would be to create python applications for both Linux/Win32. I am stucked on creating a function to get the Python install directory (and site-packages directory) with a 100% reliable method... My goal is to verify if an/several extension(s) are installed and to automatically install the missing...
7
2356
by: W. eWatson | last post by:
I copied the following code from a matplotlib tutorial, and it fails. I'm using python 2.4 on Win XP. It's matplotlib-0.98.3.win32-py2.4exe. It fails in IDLE with a small window showing a runtime error. Clicking the OK on it kills IDLE and the shell. If I double-click on the py file, the console briefly appears too quickly to notice any...
0
7605
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...
0
7917
Oralloy
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. ...
0
7962
tracyyun
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...
1
5501
isladogs
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...
0
5217
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...
0
3651
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...
1
2105
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
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
bsmnconsultancy
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.